Results 1 to 5 of 5

Thread: spear buyer

  1. #1
    Normal User
    Join Date
    May 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Angry spear buyer

    Hello,
    it is posible to do something like that for spear refiller : {(currentCAP-20<freeCAP>/20<spearweight>)}*9<spearprice>)


    If anyone knows how to do this action please share with us. Many people need that for low-level paladins. It's sick when you must change this action many times in one day.
    -- Ammo Setup:
    Ammoname = "spear" -- Name of ammo you use.
    Ammoprice = 9 -- Price of ammo
    Ammotobuy = 10 -- How much ammo to buy
    Ammotoleave = 1 -- This many potions will make character refill Pots.

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Code:
    npcsay("withdraw "..math.floor(cap - (20))/(20)*(Ammoprice))
    buyitems("spear",math.floor(cap - (20))/(20)*(Ammoprice))

  3. #3
    Normal User
    Join Date
    May 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Need to rounding of numbers in LUA.
    and maybe put this action to this one:
    closewindows()
    wait(500, 1000)
    openitem(MainBP, 'back')
    wait(500, 1000)
    resizewindows()

    local mana = positive(MPtobuy - itemcount(MPname)) * MPprice
    local health = positive(HPtobuy - itemcount(HPname)) * HPprice
    local Total = mana + health

    depositall()
    wait(500,900)
    npcsay("hi")

    if Total > 0 then
    npcsay("withdraw "..Total)
    wait(200,300)
    npcsay("yes")
    wait(200,300)
    end
    npcsay("Balance")

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Code:
    local mana = positive(MPtobuy - itemcount(MPname)) * MPprice
    local health = positive(HPtobuy - itemcount(HPname)) * HPprice
    local spears = math.floor(cap - (20))/(20)*(Ammoprice)
    local Total = mana + health + spears

  5. #5
    iBot User
    Join Date
    Aug 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    7 Post(s)
    Reputation
    10
    Rep Power
    5
    Bug Scripts withdraw 418.5 ....

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •