Test. I do not know whether it will work. Only Master Dehan to respond.
@Dehan
I'm just not sure the use of ( if itemproperty(i.id, 5) then )
local Ring = true
local Amulet = true
local MP = true
local HP = true
local ItemMaxRing = 3
local ItemMaxAmulet = 3
local ItemMaxMP = 100
local ItemMaxHP = 100
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
foreach supplyitem s category do
while moveTry < 10 then
if itemproperty(i.id, 5) then
if Ring and (ItemMaxRing - itemcount(s.id,BptoMove) > 0) and (itemcount(s.id, BpFrom) > 0) and getcontainer(BptoMove).emptycount > 1 do
moveitems(s.id, BptoMove, BpFrom,ItemMaxRing - itemcount(s.id,BptoMove))
wait(200)
moveTry = moveTry + 1
elseif Amulet and (ItemMaxAmulet - itemcount(s.id,BptoMove) > 0) and (itemcount(s.id, BpFrom) > 0) and getcontainer(BptoMove).emptycount > 1 do
moveitems(s.id, BptoMove, BpFrom,ItemMaxAmulet - itemcount(s.id,BptoMove))
wait(200)
moveTry = moveTry + 1
elseif MP and (ItemMaxMP - itemcount(s.id,BptoMove) > 0) and (itemcount(s.id, BpFrom) > 0) and getcontainer(BptoMove).emptycount > 1 do
moveitems(s.id, BptoMove, BpFrom,ItemMaxMP - itemcount(s.id,BptoMove))
wait(200)
moveTry = moveTry + 1
elseif HP and (ItemMaxHP - itemcount(s.id,BptoMove) > 0) and (itemcount(s.id, BpFrom) > 0) and getcontainer(BptoMove).emptycount > 1 do
moveitems(s.id, BptoMove, BpFrom,ItemMaxHP - itemcount(s.id,BptoMove))
wait(200)
moveTry = moveTry + 1
end
end
if getcontainer("depot chest").itemcount > 32 then
nextpage("depot chest")
wait(200,400)
end
end
end
end