Sometimes it loots... sometimes it does not.... What have am I missing?
Trying to get this sub to work all the time rather than 50/50ish. Would love any input!
sub lootrock
finditem YFM G_2
if #finditem = -1
return
wait 20
set #lobjectid #findid
wait 20
set %lootContainer #findid
wait 20
event macro 17 0
gosub wfcontainer container_gump 144_212
if ! #result
{
ignoreitem %dead
goto start
}
wait 10
if #contsize <> 144_212
{
ignoreitem %dead
goto start
}
wait 60
finditem POF C_ , %lootContainer
exevent drag #findid #findstack
wait 20
exevent DropC #backpackid
wait 12
hideitem %lootContainer
wait 12
return
;===============================
;Waiting for Container to open
;===============================
sub wfcontainer
set %waittime 120
set %wfgump #sCnt2 + %waittime
gosub wfopen contname %1 contsize %2
return #result
sub wfopen
wfo:
if # . %1 = %2 && # . %3 = %4
return #true
if %wfgump < #scnt2
return #false
goto wfo