This is my script to get items from depot. Can anyone tell me what's frong and how to repair that?
It opens all, but doesn't move items from dp to my backpack.
please help ASAP.
-- Potions from Depot
init start
local potionDpBp = 'Depot Box III'
local potionsFromDepot = true
local ringsFromDepot = true
local mainbp = getlootingdestination('mainbp')
init end
if potionsFromDepot or ringsFromDepot then
closewindows()
openitem(mainbp,'back')
wait(222,333)
if windowcount(mainbp)<1 then
return
end
while (windowcount('locker') == 0) do
openitem('depot')
wait(222,333)
end
while windowcount("Depot Chest") == 0 do
openitem(3502)
wait(222, 333)
end
openitem(potionDpBp, "Depot Chest")
wait(222,333)
if windowcount(potionDpBp)<1 then
return
end
if potionsFromDepot then
foreach supplyitem s 'p' do
local maxPot = tonumber(getsetting('Supplies/Items/'..s.name..'/UpTo'))
if (itemcount(s.id, mainBp) < maxPot) and (itemcount(s.id, 'Depot Box III') > 0) then
moveitemsupto(s.id, maxPot, mainBp, 'Depot Box III')
end
wait(222, 333)
end
end
waitping()
if ringsFromDepot then
local maxRings = 4
if (itemcount("stealth ring", mainBp) < maxRings) and (itemcount("stealth ring", 'Depot Box III') > 0) then
moveitemsupto("stealth ring", maxRings, mainBp, 'Depot Box III')
end
end
end