im trying to make a macro that steals an item from a certain container when it spawns. problem is im trying to steal the item when it spawns, and i get it to the point where i try and use event macro 22 last target it doesnt target the item and then it doesnt let me use skills after that to saying im busy. here is my noob code for that section, pretty sure im doing alot wrong lol.
sub steal
set #lobjectid JAACOMD ;id of container spawn is in
event macro 17
wait 20
finditem EGG C_JAACOMD ; item ids c_spawning container id
if #findkind -1
{ event macro 17
finditem EGG C_JAACOMD ; item ids c_spawning container id
}
set #ltargetid #findid
event macro 13 33
target
event macro 22 0
wait 10
set #ltargetid MEFQYMD ;recall rune set here
event macro 15 31
target
event macro 22 0
wait 10
event macro 4 4 BANK
finditem EGG C_KNFHLMD ;item ids c_backpackid
gosub moveitem #findid KNFHLMD EPIPUMD ; call sub (itemid) (fromcontainredID) (tocontainerID)
halt
return
any help would be greatly appreciated