Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local mainbp = getuseroption('mainbp')
  2.  
  3. if $level >= 50 then
  4.     local CapForPots = math.ceil((30 - itemcount("strong mana potion", mainbp)) * 2.9)
  5. else
  6.     local CapForPots = math.ceil((30 - itemcount("mana potion", mainbp)) * 2.7)
  7. end
  8.  
  9. local CAP = $cap - 50
  10.  
  11. local RsToBuy = math.floor((CAP - CapForPits) / 25)
  12.  
  13. if not islocation(1) then
  14.     gotolabel(0)
  15. else
  16.     waitping()
  17.     if RsToBuy > 0 then
  18.         say("hi")
  19.         wait(1500,1800)
  20.         npcsay("trade")
  21.         wait(500,600)
  22.         buyitems("royal spear", RsToBuy)
  23.         waitping()
  24.     end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement