Hello guys,
i want to move itens from the depot to my character backpack but it's moving the itens for the lootbp inside my lootbp. Is there any way to move the itens to the already opened bp?
PHP Code:
-- Persistent
function openstacksbps()
setsetting('Looting/OpenNextBP', 'no')
while windowcount(stacksbp) ~= 1 do
openitem(mainbp, "back") waitping()
resizewindows(0, mainbp) waitping()
openitem(stacksbp, false) waitping()
resizewindows(0, stacksbp) waitping()
end
end
function opendepobps()
setsetting('Looting/OpenNextBP', 'no')
while windowcount(lootbp) ~= 1 do
openitem(mainbp, "back") waitping()
resizewindows(0, mainbp) waitping()
openitem(lootbp, false) waitping()
resizewindows(0, lootbp) waitping()
end
end
______________________________________
-- Action
depotId = 22796
stackableId = depotId + stackdp
nonstackableId = depotId + raredp
if ($posz ~= $wpt.z) then
gotolabel($wptid-2)
else
closewindows() waitping(1,2)
openstacksbps() waitping(1,2)
opendepobps() waitping(1,2)
reachgrounditem("depot") waitping(2,3)
waitping()
while windowcount("Depot Chest") == 0 do
opendepot(true)
waitping(2,3)
openitem(3502)
waitping(2,3)
openitem(nonstackableId)
waitping(2,3)
end
while (true) do
foreach lootingitem i do
while itemcount(i.id, nonstackableId) > 0 and $cap > 100 and getcontainer(lootbp).emptycount > 0 do
if itemproperty(i.id, 5) == false then
moveitemsonto(i.id, lootbp, 1, lootbp, nonstackableId, 100)
end
end
end
if (itemcount(lootbp, lootbp) > 0) then
openitem(lootbp, lootbp, false)
waitcontainer(lootbp, false)
else
break
end
wait(100,200)
end
end