Advertisement
ppgab

Untitled

Apr 30th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. Cavebot.Stop()
  2.     wMP = 0
  3.     wHP = 0
  4.     wRune = 0
  5.     wAmmo = 0
  6.     wVial = 0
  7.     extra = extra or 0
  8.     if useMP then
  9.         wMP = math.max((priceMP*(maxMP-Self.ItemCount(MP))),0)
  10.     end
  11.     if useHP then
  12.         wHP = math.max((priceHP*(maxHP-Self.ItemCount(HP))),0)
  13.     end
  14.     if useRune then
  15.         wRune = math.max((priceRune*(maxRune-Self.ItemCount(rune))),0)
  16.     end
  17.     if useAmmo then
  18.         wAmmo = math.max((priceAmmo*(maxAmmo-Self.ItemCount(ammo))),0)
  19.     end
  20.         wVial = math.max((5*Self.Flasks()),0)
  21.         if wVial <= 1000 then wVial=0 end  
  22.    
  23.     withdraw = ((math.ceil((wMP+wHP+wRune+wAmmo-wVial)/1000))*1000)+extra
  24.     wait(600,800)
  25.    
  26.     if withdraw > 0 then
  27.         print("Withdrawing : "..withdraw)
  28.         Self.SayToNpc({"hi", "deposit all", "yes", "withdraw "..withdraw, "yes"},math.random(55,70))
  29.     else Self.SayToNpc({"hi", "deposit all", "yes"},math.random(55,70))    
  30.     end
  31.     wait(1000,1200)
  32.     if Self.Money() < withdraw then print('You don't have enough money in bank, stoping script')
  33.     Cavebot.Start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement