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(0mainbpwaitping()
        
openitem(stacksbpfalse)  waitping()
        
resizewindows(0stacksbpwaitping()
    
end
end

function opendepobps()
    
setsetting('Looting/OpenNextBP''no')
    while 
windowcount(lootbp) ~= 1  do
        
openitem(mainbp"back"waitping()
        
resizewindows(0mainbpwaitping()
        
openitem(lootbpfalse)  waitping()
        
resizewindows(0lootbpwaitping()
    
end
end
______________________________________

-- Action

depotId 
22796
stackableId 
depotId stackdp
nonstackableId 
depotId raredp

if ($posz ~= $wpt.zthen
    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") == 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.idnonstackableId) > and $cap 100 and getcontainer(lootbp).emptycount do
                if 
itemproperty(i.id5) == false then
                    moveitemsonto
(i.idlootbp1lootbpnonstackableId100)
                
end
            end
        end
        
if (itemcount(lootbplootbp) > 0then
            openitem
(lootbplootbpfalse
        
waitcontainer(lootbpfalse)
        else
            break
        
end
        wait
(100,200)
    
end
end