Can macro spells change depending on spec?

So here is an example of a macro i use on my holy priest
#showtooltip
/cast [mod:alt,@mouseover,nodead,help][mod:alt,@target,nodead,help][mod:alt,@player]Prayer of Healing;[mod:ctrl,@mouseover,nodead,help][mod:ctrl,@target,nodead,help][mod:ctrl,@player]Heal;Smite

Here is an example of a macro i use on my shadow spec
#showtooltip
/cast [mod:alt,@mouseover,nodead,harm][mod:alt,@target,nodead,harm][mod:alt,@player]Void Eruption;[mod:ctrl,@mouseover,nodead,harm][mod:ctrl,@target,nodead,harm][mod:ctrl,@player]Void Torrent;Mind Flay

Is it possible to combine the macros into one macro and the spells change according to holy/shadow spec?

The resulting macro will likely be too long but you can get around that with any number of “longer macro” addons.

From a language perspective this would do it:

#showtooltip
/cast [spec:2,mod:alt,@mouseover,nodead,help][spec:2,mod:alt,nodead,help][spec:2,mod:alt,@player]Prayer of Healing;[spec:2,mod:ctrl,@mouseover,nodead,help][spec:2,mod:ctrl,nodead,help][spec:2,mod:ctrl,@player]Heal;[spec:2]Smite;[spec:3,mod:alt,@mouseover,nodead,harm][spec:3,mod:alt,nodead,harm][spec:3,mod:alt,@player]Void Eruption;[spec:3,mod:ctrl,@mouseover,nodead,harm][spec:3,mod:ctrl,nodead,harm][spec:3,mod:ctrl,@player]Void Torrent;[spec:3]Mind Flay

That’s 471 characters and will fit in just about any of the “longer macros” addons out there.

I pulled out some unneeded @target conditionals.

If you want the same EFFECT but with the normal macro system you can use macro chaining like this:

/click [spec:2]SomeFullyQualifiedButtonFrameName;[spec:3]SomeOtherFullyQualifiedButtonFrameName

Then put your existing macros on the two buttons you’ve named. You won’t get dynamic icons on the actual use button, but it’ll save you from having to use a “longer macros” addon if that’s a sticking point.

Also, you’re not using the “shift” modifier, so you could cut some length out of that by changing all occurrences of “mod:ctrl” to just “mod” (if it’s a modifier and it’s not alt and you’re not using shift, it pretty much has to be ctrl).

2 Likes

Enable auto-self casting in Interface > Combat and you can optimize it to 325 chars:

#showtooltip
/cast [spec:2,mod:alt,@mouseover,nodead,help][spec:2,mod:alt]Prayer of Healing;[spec:2,mod:ctrl,@mouseover,nodead,help][spec:2,mod:ctrl]Heal;[spec:2]Smite;[spec:3,mod:alt,@mouseover,nodead,harm][spec:3,mod:alt]Void Eruption;[spec:3,mod:ctrl,@mouseover,nodead,harm][spec:3,mod:ctrl]Void Torrent;[spec:3]Mind Flay

Rearrange things to set Shadow as the “default” and you land at 299 chars (same if you set Holy as the default).

#showtooltip
/cast [spec:2,mod:alt,@mouseover,nodead,help][spec:2,mod:alt]Prayer of Healing;[mod:alt,@mouseover,nodead,harm][mod:alt]Void Eruption;[spec:2,mod:ctrl,@mouseover,nodead,help][spec:2,mod:ctrl]Heal;[mod:ctrl,@mouseover,nodead,harm][mod:ctrl]Void Torrent;[spec:2]Smite;Mind Flay

Strip out the nodead checks from the mouseover tests (not ideal but that’s the next step if ur trying to fit it in 255) and you land at 261:

#showtooltip
/cast [spec:2,mod:alt,@mouseover,help][spec:2,mod:alt]Prayer of Healing;[mod:alt,@mouseover,harm][mod:alt]Void Eruption;[spec:2,mod:ctrl,@mouseover,help][spec:2,mod:ctrl]Heal;[mod:ctrl,@mouseover,harm][mod:ctrl]Void Torrent;[spec:2]Smite;Mind Flay

Unfortunately there’s not really a way to optimize past this point without losing overall functionality.

My personal macros in this style can be found here:

Ha!

I took your last one and changed all the mod:ctrl to just mod (see my note to the OP on this).

#showtooltip
/cast [spec:2,mod:alt,@mouseover,help][spec:2,mod:alt]Prayer of Healing;[mod:alt,@mouseover,harm][mod:alt]Void Eruption;[spec:2,mod,@mouseover,help][spec:2,mod]Heal;[mod,@mouseover,harm][mod]Void Torrent;[spec:2]Smite;Mind Flay

241 characters.

1 Like

Thanks for the fast replies. I have redone all my macros on my priest using your layout and so far they all work great. :heart_eyes:

Smite automatically switches to Mind Flay for shadow so you can save another 18 characters there.
That’s enough to put [nodead] back on the mouseovers.

#showtooltip
/cast [spec:2,mod:alt,@mouseover,nodead,help][spec:2,mod:alt]Prayer of Healing;[mod:alt,@mouseover,nodead,harm][mod:alt]Void Eruption;[spec:2,mod,@mouseover,nodead,help][spec:2,mod]Heal;[mod,@mouseover,nodead,harm][mod]Void Torrent;Smite
1 Like