Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MainBP = getuseroption('MainBP')
- local AmmoBP = getuseroption('AmmoBP')
- local BuyHealth = getuseroption('BuyHealth')
- local UseGHP = getuseroption('UseGHP')
- local BuyUtHealth = getuseroption('BuyUtHealth')
- local SuppDPBP = getuseroption('SuppDPBP')
- local TakeSupp = getuseroption('TakeSupp')
- local TakeFood = getuseroption('TakeFood')
- local ValueFood = getuseroption('ValueFood')
- setsetting('Looting/OpenNextBP', 'no')
- while windowcount(MainBP) ~= 1 or windowcount(AmmoBP) ~= 1 or windowcount() ~= 2 do
- closewindows()
- openitem(MainBP, "back")
- wait(200,300)
- resizewindows()
- openitem(AmmoBP, MainBP, true)
- wait(200,300)
- resizewindows()
- wait(200,300)
- end
- if TakeSupp then
- if itemcount("ultimate health potion") < BuyUtHealth or (UseGHP and itemcount("great health potion") < BuyHealth) or (TakeFood and itemcount("brown mushroom") < ValueFood) then
- local function freeslots(c)
- local tmp = getcontainer(c)
- return tmp.maxcount - tmp.itemcount
- end
- wait(200,300)
- reachgrounditem('depot')
- wait(200,300)
- while windowcount(SuppDPBP) == 0 do
- opendepot()
- wait(200,300)
- openitem(SuppDPBP, "Depot Chest", false)
- wait(200,300)
- resizewindows()
- wait(200,300)
- end
- while true do
- waitping(1,2)
- wait(1000,1200)
- while UseGHP and ((itemcount("great health potion", AmmoBP) + itemcount("great health potion", MainBP)) < BuyHealth) and itemcount("great health potion", SuppDPBP) > 0 and (freeslots(MainBP) > 1 or freeslots(AmmoBP) > 0) do
- waitping(1,2)
- wait(1000,1200)
- if freeslots(MainBP) > 1 then
- moveitems("great health potion", MainBP, SuppDPBP, BuyHealth - (itemcount("great health potion", MainBP) + itemcount("great health potion", AmmoBP)))
- waitping(1,2)
- elseif freeslots(AmmoBP) > 0 then
- moveitems("great health potion", AmmoBP, SuppDPBP, BuyHealth - (itemcount("great health potion", MainBP) + itemcount("great health potion", AmmoBP)))
- waitping(1,2)
- end
- end
- while (itemcount("ultimate health potion", MainBP) + itemcount("ultimate health potion", AmmoBP)) < BuyUtHealth and itemcount("ultimate health potion", SuppDPBP) > 0 and (freeslots(MainBP) > 1 or freeslots(AmmoBP) > 0) do
- waitping(1,2)
- wait(1000,1200)
- if freeslots(MainBP) > 1 then
- moveitems("ultimate health potion", MainBP, SuppDPBP, BuyUtHealth - (itemcount("ultimate health potion", MainBP) + itemcount("ultimate health potion", AmmoBP)))
- waitping(1,2)
- elseif freeslots(AmmoBP) > 0 then
- moveitems("ultimate health potion", AmmoBP, SuppDPBP, BuyUtHealth - (itemcount("ultimate health potion", MainBP) + itemcount("ultimate health potion", AmmoBP)))
- waitping(1,2)
- end
- end
- while TakeFood and (itemcount("brown mushroom") - itemcount("brown mushroom", SuppDPBP) < ValueFood) and itemcount("brown mushroom", SuppDPBP) > 0 and (freeslots(MainBP) > 1 or freeslots(AmmoBP) > 0) do
- waitping(1,2)
- wait(1000,1200)
- if freeslots(MainBP) > 1 then
- moveitems("brown mushroom", MainBP, SuppDPBP, ValueFood - (itemcount("brown mushroom", MainBP) + itemcount("brown mushroom", AmmoBP)))
- waitping(1,2)
- elseif freeslots(AmmoBP) > 0 then
- moveitems("brown mushroom", AmmoBP, SuppDPBP, ValueFood - (itemcount("brown mushroom", MainBP) + itemcount("brown mushroom", AmmoBP)))
- waitping(1,2)
- end
- end
- if ((UseGHP and itemcount("great health potion") < BuyHealth) or (TakeFood and itemcount("brown mushroom") < ValueFood) or (itemcount("ultimate health potion") < BuyUtHealth)) and itemcount(SuppDPBP, SuppDPBP) > 0 then
- openitem(SuppDPBP, SuppDPBP, false)
- waitping(1,2)
- else
- break
- end
- end
- end
- else
- gotolabel("bank")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement