Wither/Immolate Macro Help Request

Hello!

I have a mouseover macro with a shift Curse of Exhaustion that needs help. My macro is:

#showtooltip
/use [mod:shift, @mouseover, exists, harm, nodead][mod:shift, @target] Curse of Exhaustion;
/cast [@mouseover, exists, harm, nodead][@target] [Known: Wither] Wither, [Known: Immolate] Immolate

The problem is in the last line of “[Known: Wither] Wither, [Known: Immolate] Immolate” . If I use a comma after Wither, it keeps Wither; but if I used a semi-colon, it uses Immolate. The spell itself will not change to Wither when specced into Hellcaller unless I have a comma there, but when I spec into Diabolist, I need to change the comma into a semi-colon to be able to cast Immolate.

Anyone able to help out so that it automatically changes to Wither when I spec into Hellcaller and reverses into Immolate when I spec back into Diabolist?

I don’t know if I’ve perfectly optimized it, but the following works for me:

#showtooltip
/use [mod:shift,@mouseover,harm,nodead][mod:shift,harm]Curse of Exhaustion;[known:Wither,@mouseover,harm,nodead][known:Wither,harm,nodead][known:Wither]Wither;[@mouseover,harm,nodead][harm,nodead][]Immolate

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

That said, to make Immolate automatically become Wither when spec’d into it and Immolate when not, you just need to use Corruption instead!

#showtooltip
/cast [mod:shift,@mouseover,harm,nodead] [mod:shift] Curse of Exhaustion; [@mouseover,harm,nodead] [] Corruption

:trophy:

I figured I was looking past something when it wasn’t auto switching with my first (shorter) edit attempts.