Help with PI macro

I am trying to get a macro to cast PI based on the following rules. priority is to cast on focused player. if focus player is dead or not in range then cast it on targeted player. if the focus player is dead or out of range and there is no player targeted, then cast it on myself.

/cast [@focus,exists,help,nodead] Power Infusion; [@player] Power Infusion

that macro PI’s the focus, and then myself if there’s not a focus. but doesn’t PI targeted players

1 Like

You want to leverage the fact that PI is off the GCD and put the @player version on it’s own line. That way if your focus (or whatever other units you set on the first line) are out of range/los/or your can’t cast PI on them for some reason, it’ll still cast it on you.

#showtooltip
/cast [@focus,help,nodead] Power Infusion
/cast [@player] Power Infusion
2 Likes

yes, this works. but I am trying to also incorporate PI’ing a targeted player. with this macro If I try to PI a targeted player it will simply cast it on myself only. the first priority is to cast on the person I set focus to. if no focus then I want it to go onto my target. if not target then simply cast it on myself.

I am not knowledgeable about what’s possible with macros so apologies if I am asking for too much.

#showtooltip
/cast [@focus,help,nodead] [help] Power Infusion
/cast [@player] Power Infusion

You could also add in mouseover support, @name support (if you’re always casting it on the same person in raids) etc. Just add them to the first line in whatever priority order you want them to execute in (left to right).

#showtooltip
/cast [@focus,help,nodead] [target,help] Power Infusion
/cast [@player] Power Infusion

I just tested this and it seems to do what I am looking for. good to know that it prio’s left to right.

[target,help] either needs to be [@target,help] or simply [help] because @target is implied if you don’t provide a unit.

1 Like

yep I forgot to type that in my comment, but I had it in game