Help with multi-spec help/harm macro

/cast [help][known:Power Word: Radiance][mod:ctrl,@player][@mouseover][@target] Power Word: Radiance; [help][known:Prayer of Mending][mod:ctrl,@player][@mouseover][@target] Prayer of Mending; [@target,harm] Shadow Word: Pain;

This is the kind of macro I’m trying to make work. By not supplying showtooltip I’m trying to have it switch to the icon automatically. In holy I want the help to use PoM and in disc I want the help to use Radiance. Then both specs can use SW: Pain, and it should auto switch to PtW if SW: Pain has been replaced via talents. Right now it doesn’t seem to work.

I also was trying to remove the litter of help conditions I had. Does anyone know if you can convert:

[@mouseover,help][@target,help] to just [help][@mouseover][@target]?

My reasoning is that because the conditions are checked in order, [help] should short circuit and execute the next ; command int the sequence. But that doesn’t appear to be the case based on my testing.

#showtooltip
/cast [mod:ctrl,known:194509,@player][known:194509,@mouseover,help]Power Word: Radiance;[mod:ctrl,@player][@mouseover,help]Prayer of Mending;[@mouseover,harm][harm]Shadow Word: Pain;[known:194509]Power Word: Radiance;Prayer of Mending

[this, and this]
[this] [or this]
; else this

If you don’t include an existence check (exists, help, or harm) then @unit assumes the unit exists.

In this case that means it will never move past the @mouseover and you’ll get invalid unit errors when you don’t have a mouseover but do have a target. You can drop @target though as it’s the default @unit.

Which leaves you with:
[@mouseover,help] [help]

Thanks,

/cast [@player,known:194509,mod:ctrl][@mouseover,known:194509,help][known:194509,help] Power Word: Radiance; [@player,mod:ctrl][@mouseover,help][help] Prayer of Mending; [@mouseover,harm][harm] Shadow Word: Pain;

This works for me! And after reading the secure command syntax and your explanation, I understand my error. Thank you.

Use the one I posted. The one you’ve written makes it impossible to cast SWP on a mouseover enemy while you have a friendly target.

So if I use your template, I will be able to SWP a mouseover enemy with a friendly target, but not PoM a mouseover friendly with an enemy target?

You’ll be able to do both.

CTRL: Cast helpful spell @player
Mouseover Friendly: Cast helpful spell @mouseover
Mouseover Enemy: Cast harmful spell @mouseover
Target Enemy: Cast harmful spell @target
Default: Cast helpful spell @target, falling back to @player when target doesn’t exist

If you want to see the macros I use that are similar to what you’re building, you can find them here: