Is there a way to macro target switch if targ

UI and Macro
Is there a way to macro target switch if target is dead?

I just want a macro command, to use my spells and skills, on the target until the target is defeated, and allow for auto target nearest enemy once target is defeated.

how do I go about doing this?

so far my macro has been

/target
/cast <insert spell/skill>


but problem is that it doesnt switch target if the target is defeated.
You'll want this instead:

/targetenemy [dead][noharm]
/cast Blah blah
You'll want this instead:
/targetenemy [dead][noharm]
/cast Blah blah

You can add [noexists] to that to target the nearest enemy if you don't have a target selected at all. I find it annoying that this is not the default behavior with spells, despite the fact that it's how melee abilities work.

/targetenemy [dead][noharm][noexists]
/cast Blah blah


I don't know if that's being redundant, though. I know [harm] implies [exists] but I don't remember if that translates properly with the negation.
You'll want this instead:
/targetenemy [dead][noharm]
/cast Blah blah

You can add [noexists] to that to target the nearest enemy if you don't have a target selected at all. I find it annoying that this is not the default behavior with spells, despite the fact that it's how melee abilities work.

/targetenemy [dead][noharm][noexists]
/cast Blah blah


I don't know if that's being redundant, though. I know [harm] implies [exists] but I don't remember if that translates properly with the negation.


It's being redundant. Tacking no to the front of any condition will make it return the opposite of the base value. [harm] returns false if the specified target does not exist. [noharm] in this case, would return true. So your [noexists] condition is already covered by [noharm].

Join the Conversation

Return to Forum