Debugging Macro

I’m trying to make a macro that will cast a spell at a specific target if present, or selected target if not.

#showtooltip Beacon of faith
/cast [@ZULUDEAD] Beacon of Faith
/cast Beacon of Faith

This is what I have so far. If i replace the @zuludead with @kaldorath (which is my character’s name) it works fine. It casts the spell on me regardless of target. But any time I try to put another player’s name in the @, it doesn’t work. The above will cast it on the selected target only, not the specified target.

@name only works for players in your group and only works for players.
Try this:

#showtooltip
/cast [@Zuludead,help,nodead] [] Beacon of Faith

Worst case you could easily rework it into a focus macro.