Credits continue to Dehan for doing this great deed. I just simplified it to be used in a cavebot action (if you put the function in the persistent cavebot action will be very simple).
Function information:
DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, DepositPlatinumCoins)
Option DepositPlatinumCoins, default false (If you do not write in the DepositPlatinumCoins part or write false, the action will not deposit the platinum coins.)
DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack) --No deposit platinum coins in depot box
--==Options 1 ==--
--All in 1 action cavebot--
1- create action cavebot then paste all action in action cavebot.
Example in use, line 48 in action.
getlootingdestination('Destination Name'), Looting > Seetings > Looting Destinations...
example:
-Destination Name: lootbp
+
Destination: green backpack
=
getlootingdestination('mainbp'), will move all items from the green backpack to the chosen depot boxes.
function DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, DepositPlatinumCoins)
local DepositPlatinumCoins = DepositPlatinumCoins or false
lootingBp = NameLootBp
nonstackableNumber = NumberDpItemsNoStack
stackableNumber = NumberDpItemsStack
--[[DO NOT EDIT BELOW THIS LINE]]--
waitping()
closewindows() wait(1500)
while windowcount(lootingBp) == 0 do
closewindows() wait(1000)
openitem($back.id,'back') wait(1000)
openitem(lootingBp,itemname($back.id),true) wait(1000)
resizewindows()
end
while windowcount("Depot Chest") == 0 do
opendepot(true)
wait(300)
openitem(3502)
wait(500)
end
while (true) do
foreach lootingitem i do
while itemcount(i.id, lootingBp) > 0 and (DepositPlatinumCoins or not DepositPlatinumCoins and i.id ~= 3035) do
if itemproperty(i.id, 5) then
moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
else
moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
end
end
end
if (itemcount(lootingBp, lootingBp) > 0) then
openitem(lootingBp, lootingBp, false)
waitcontainer(lootingBp, false)
else
break
end
wait(100)
end
end
function DepotBox(NameLootBp, NumberDpItemsStack, NumberDpItemsNoStack, DepositPlatinumCoins)
local DepositPlatinumCoins = DepositPlatinumCoins or false
lootingBp = NameLootBp
nonstackableNumber = NumberDpItemsNoStack
stackableNumber = NumberDpItemsStack
--[[DO NOT EDIT BELOW THIS LINE]]--
waitping()
closewindows() wait(1500)
while windowcount(lootingBp) == 0 do
closewindows() wait(1000)
openitem($back.id,'back') wait(1000)
openitem(lootingBp,itemname($back.id),true) wait(1000)
resizewindows()
end
while windowcount("Depot Chest") == 0 do
opendepot(true)
wait(300)
openitem(3502)
wait(500)
end
while (true) do
foreach lootingitem i do
while itemcount(i.id, lootingBp) > 0 and (DepositPlatinumCoins or not DepositPlatinumCoins and i.id ~= 3035) do
if itemproperty(i.id, 5) then
moveitemsonto(i.id, stackableId, 1, 'depot chest', lootingBp, 100)
else
moveitemsonto(i.id, nonstackableId, 1, 'depot chest', lootingBp, 100)
end
end
end
if (itemcount(lootingBp, lootingBp) > 0) then
openitem(lootingBp, lootingBp, false)
waitcontainer(lootingBp, false)
else
break
end
wait(100)
end
end