Help/Harm Main Target w/hard-coded Focus Mod

Hello! I have been scouring the internet looking for how to make this sort of help/harm and focus mod macro. Essentially what I want to accomplish is this.

If I am targeting a friendly and not pressing a modifier, cast Purify.
If I am targeting an enemy and not pressing a modifier, cast Dispel Magic.
Regardless of my main target, if I hold ctrl, cast Dispel Magic at my focus target.

I have made several variations of this and all of them seem to bug out in some way. Any advice is appreciated!

#showtooltip
/cast [mod:ctrl,@focus,harm,nodead][harm] Dispel Magic; Purify
1 Like

This worked like a charm! I really was overcomplicating it. Thank you so much

1 Like

If you don’t want it to default to purify when holding control while the conditions aren’t met (no focus, focus on an ally, or somehow your focus target is dead), just add a [nomod] to the purify cast.