; Purpose: to open up a container
; usage: gosub open_container ID
; gosub open_container %storage
sub open_container
set #lobjectid %1
while #contID <> %1
{
event macro 17
wait 20
}
return
; Purpose: unload stuff from specific container to specific container
; usage: gosub unload Type ID ID
; gosub unload %loot #backpackid %storage
; gosub unload %loot %lootbag %storage
sub unload
finditem %1 C_ , %2
while #findcnt > 0
{
Exevent Drag #findid #findstack
Exevent Dropc %3
wait 20
finditem %1 C_ , %2
}
return
; Purpose: grab stuff from specific container
; usage: gosub get type ID ammount
; gosub get %pickaxe %storage 10
; gosub get %bandages %storage 100
sub get
for %i 1 %3
{
finditem %1 C_ , %2
if #findcnt > 0
{
if #findstack > 1
{
Exevent Drag #findid %3
Exevent Dropc #backpackid
wait 20
return
}
else
{
Exevent Drag #findid #findstack
Exevent Dropc #backpackid
wait 20
}
}
}
return