finditem %items g_ , %distance
if #findcnt > 0
{
set %ItemsCount #findcnt ; keep the value for the %items #findcnt value
for %ItemsIndex 1 %ItemsCount
{
finditem %items %ItemsIndex g_ , %distance ; This has 4 parameters!
if #findcnt = 0
break ; this means an item was moved while we are processing the whole routine after the outer finditem above!
if #findtype = %doDad
{
finditem %stuff c_ , #backpackid
if #findcnt > 0
{
for #findindex 1 #findcnt
{
exevent drag #findid
exevent dropc %secureBox
wait 15
}
}
}
if #findtype = %thingaMajig
{
exevent drag #findid
exevent dropc #backpackid
wait 15
}
}
}