Help with a target macro for PoM please?

Priest
Hello,

I want (if possible) to make a macro for Prayer of Mending, which does the following:

If I'm targeting a valid target, cast PoM on them; if I'm not targeting anything, targeting a hostile, or targeting a friendly NPC/player who isn't a valid target, then cast PoM on myself.

The basic idea is that it'll always cast PoM on me unless I'm targeting someone in my raid/party.

Any help will be appreciated.
/use [help,raid][@player]Prayer of Mending
The problem is that PoM will give you Gray Hand of Doom if you use [help] and target someone outside your party/raid.

it will never reach the [player] portion because it sees you have a 'helpful' target and doesn't contemplate whether or not they're actually valid for the spell.

I am actually not sure if macros can do what the OP wants. Macro experts, assemble!
This is the macro I use for Prayer of Mending

#showtooltip Prayer of Mending
/cast [@mouseover,help,nodead][@target,help, nodead][help,nodead][@player] Prayer of Mending
/script UIErrorsFrame:Clear()


The first part means that it will first try to cast Prayer of Mending on my current mouse target. If that target is invalid (not friendly or dead), it will them try to cast Prayer of Mending on my current target. If that is not a viable target, it will instead cast Prayer of Mending on myself.
The problem is that PoM will give you Gray Hand of Doom if you use [help] and target someone outside your party/raid.

it will never reach the [player] portion because it sees you have a 'helpful' target and doesn't contemplate whether or not they're actually valid for the spell.

I am actually not sure if macros can do what the OP wants. Macro experts, assemble!

Oh, I didn't think of that. It turns out that there is a conditional for checking if the target is in your group, though; see edited macro above.

#showtooltip Prayer of Mending
/cast [@mouseover,help,nodead][@target,help, nodead][help,nodead][@player] Prayer of Mending
/script UIErrorsFrame:Clear()

You don't need the spell name in the first line, "@target,help,nodead" does the same thing as just "help,nodead", and instead of clearing the whole error frame you can just make it not show errors from this particular macro like so:
#showtooltip
/run UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
/use [@mouseover,help,nodead,raid][help,nodead,raid][@player]Prayer of Mending
/run UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE")
Using #showtooltip Prayer of Mending means that if I decide to macro a trinket, or something else to the macro, it will show Prayer of Mending.

I used to have issues in the past when I didn't put the last line in. There are also some cases when I don't want error messages hidden, so I just stick to clearing them.
10/06/2012 11:42 AMPosted by Aygeepie
I used to have issues in the past when I didn't put the last line in. There are also some cases when I don't want error messages hidden, so I just stick to clearing them.

Yes, but unregistering and re-registering does the same thing, only without also clearing any error messages that were there before you pressed the button. It's basically just better unless you're hitting the character limit.
Yep, my friend, who is good at macro stuff, came online and we tested this out and the one in the first response works perfectly.

Thanks a lot - it's very helpful for shadow as it means I can keep my PoM bouncing around without having mess about navigating to my healbot every time.

Much appreciated!

Join the Conversation

Return to Forum