Multi-target macros

UI and Macro
So this is my template macro:
#showtooltip
/cast [@mouseover,help,nodead] [@focus,help,nodead] [@target,help,nodead] [@player] Spellname

It works well for heals. I'm having trouble, though, adapting it to offensive/defensive skills like Penance and Intercept.

My latest iteration...
#showtooltip
/cast [@mouseover,nodead][@target,nodead] [@focus,nodead] Intercept
... only works on mouseover. With no mouseover, it simply says I need a target.

What am I messing up this time?
I use this macro for penance, you may be able to adapt it to suit what you are looking for.

On mouse-over, it will cast offensive penance against an enemy, or healing penance against a friendly character.
When neither enemy or friendly targets are near, it will cast healing penance on yourself.

#showtooltip Penance
/cast [@mouseover,help][@target,help][@mouseover,harm][@target,harm][@player] Penance

Regards,
Yissy.
The correct way for dual-target spells (ie: spells that affect both hostile and friendly targets) is;

#showtooltip
/cast [@mouseover,exists,nodead][@focus,exists,nodead][exists,nodead][@player] Penance


This will cast Penance on any target, prioritising your mouseover, then your focus, then your target, then yourself.

Note that you never need to specify [@target] since you're already targeting your target.

A small tip:

#showtooltip
/cast [mod:alt,@player][@mouseover,exists,nodead][@focus,exists,nodead][exists,nodead][] Penance


This is the same as the above macro, but you can hold Alt while using the macro to force Penance to cast on yourself.
The reason your macro is breaking is because you're not checking if a valid target exists for mouseover and focus. Mouseover and focus conditions must always include one of: exists, help, or harm; otherwise those conditions always return true even if a mouseover/focus target doesn't exist.
Not only good examples, but the "why" explains so much. Thank you all once again!

Join the Conversation

Return to Forum