MrSmallie wrote:Code: Select all
/varset MainTarget $target(id)
......
/target @MainTarget
..........
/if n $target(id)!=@MainTarget /call ResetEvents
Grin, posted it right initially:
One tidbit about this code, you're going to be hangnig out in the event queue and will be able to take no other actions from it; recommend doing the assist as a event and your combat loop still under Main or another sub, and have /doevents still in the loop for various other things.
Also if using $target(id)!=@MasterTarget, if the script winds up on a corpse it's going to keep executing through the code. Haven't found a way to reliably check circumstances with a single comparison anyway =/.
Code: Select all
/if $target()==FALSE
/if $target(state)==DEAD
/if $target(type)!=NPC
...
Etc. Still need the reliable pet check which I never finished

Maybe could do it in two comparisons with the !=@MasterTarget and target(state)==DEAD.
G