I guess the question is what are you trying to achieve here?
Is it an alt box that is picking up corpses?
If you have it looping to pick up corpses, do you want to reactivate it after each pull, loot, then once there are no corpses nearby end the macro?
The fun thing about programming is there are usually dozens or hundreds of ways of building solutions. That said, I have a couple ideas that might be sub-par, use at your own risk.
If you want it to end after it has looted all nearby corpses, put a wait in or a check for nearby corpses or something.
up above your :mainloop use a:
Code: Select all
/declare waitAfterLastLoot timer global 10s
then in your section of code where you found a corpse use:
then at the end of your loop before /goto :mainloop use something like this:
Code: Select all
/if (${waitAfterLastLoot}<=0) {
/bcaa Hey you... I finished looting. Now ready for combat!
/endmacro
}
you could use that or use something that checks for nearby corpses at the end of your main loop, something like:
Code: Select all
/tar corpse
/if (${Target.Distance}>50) {
/bcaa Hey you... I finished looting. Now ready for combat!
/endmacro
}
...replace 50 with whatever distance you want to be outside your nominal moveto/loot range
Just doing these off the top of my head, forgive me for any horrible mistakes!