Depot Box Withdrawer
Description:
It will withdraw any item (runes, potions, rings, amulets, ...) from your depot box
How to setup:
ItemName = item name or ID to withdraw
ItemMax = amount of items to withdraw
BptoMove = backpack to move the items on
depotBoxNumber = depot box where the items are located
Code:
local ItemName = "life ring"
local ItemMax = 3
local BptoMove = "jewelled backpack"
local depotBoxNumber = 4
--[[DO NOT EDIT BELOW THIS LINE]]--
setsetting('Looting/OpenNextBP', 'no')
while windowcount("Depot Chest") == 0 do
opendepot(true)
wait(1000)
openitem(3502)
wait(1000)
end
local BpFrom = "depot chest"
local depotId = 22796
local itemDepotId = depotId + depotBoxNumber
while itemcount(22797) > 0 do
openitem(itemDepotId, "depot chest", false)
wait(1000)
end
for i = 1, getcontainer("depot chest").lastpage do
moveTry = 0
while moveTry < 10 and (ItemMax - itemcount(ItemName,BptoMove) > 0) and (itemcount(ItemName, BpFrom) > 0) and getcontainer(BptoMove).emptycount > 1 do
moveitems(ItemName, BptoMove, BpFrom,ItemMax - itemcount(ItemName,BptoMove))
wait(200)
moveTry = moveTry + 1
end
if getcontainer("depot chest").itemcount > 32 then
nextpage("depot chest")
wait(200,400)
end
end