Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mojimi_refill(where_at,rock_hard)
- Cavebot.Stop()
- local tries = 3
- rock_hard = rock_hard or false
- if rock_hard then rkh = "magic stuff" else rkh = '' end
- if where_at == "pot" then
- if Self.Flasks() > 0 then
- Self.SayToNpc({"hi","vials","yes","trade",rkh},math.random(55,70))
- else Self.SayToNpc({"hi","trade",rkh},math.random(55,70))
- end
- wait(1200,1200+Ping_Compensation)
- while ((useHP and Self.ItemCount(HP)<maxHP) and tries > 0)
- or ((useMP and Self.ItemCount(MP)<maxMP) and tries > 0)
- or ((useRune and Self.ItemCount(rune)<maxRune) and tries > 0)
- do
- wait(500,500+Ping_Compensation)
- if (useHP and Self.ItemCount(HP)<maxHP) then
- wait(500,500+Ping_Compensation) Self.ShopBuyItemsUpTo(HP,maxHP)
- end
- if (useMP and Self.ItemCount(MP)<maxMP) then
- wait(500,500+Ping_Compensation) Self.ShopBuyItemsUpTo(MP,maxMP)
- end
- if (useRune and Self.ItemCount(rune)<maxRune) then
- wait(500,500+Ping_Compensation) Self.ShopBuyItemsUpTo(rune,maxRune)
- end
- tries = tries-1
- end
- elseif where_at == "ammo" then
- Self.SayToNpc({"hi","trade"},math.random(55,70))
- while (not(wtAmmo) and useAmmo and Self.ItemCount(ammo)<maxAmmo)
- do
- Self.ShopBuyItemsUpTo(HP,maxHP) wait(500,500+Ping_Compensation)
- tries = tries-1
- end
- end
- if tries <= 0 then
- print("You don't have enough cap, Stoping Cavebot") Cavebot.Stop()
- else Cavebot.Start()
- end
- end
Add Comment
Please, Sign In to add comment