Macros are powerful tools. They don't demand memory like addons, are legal in any tournament, and can easily be rewritten if the needs should change.
For quite a while, I've macroed all my usually used buttons to use one spells on friendly targets ([help]) and another spell on unfriendly targets ([harm]). A simple macro like that would be:
#showtooltip
/cast [help] Lifebloom; [harm] Moonfire
Until recently, I've also depended on the addon
Clique for healing. It has not yet failed me, but I saw another available option, using the macro for mouseover-actions. Basically, while the mouse is hovering over a target, press a keyboard button and it casts a spell at the target. My former macro above changed to this:
#showtooltip
/cast [target=mouseover, help] Lifebloom; [target=mouseover, harm] Moonfire; [help] Lifebloom; [harm] Moonfire
It didn't take long to discover the disadvangate; It is very easy to have your mouse the wrong place when want to target your... target, and target that target instead. Bummer. The biggest problem was with enemy targets, thus I changed the macro:
#showtooltip
#showtooltip
/cast [target=mouseover, help][help] Lifebloom; [harm] Moonfire
Still not happy. Often when I intend to heal a party member my mouse is hovering over, it's slightly off target, and I end up either casting moonfire on my enemy target (thus dropping out of Tree of Life), or Lifebloom on my friendly target. The latter isn't really a big problem. I avoided the problem of targetting myself with a different macro, bound to shift-(same button). Lifebloom/Moonfire is on 2, thus shift-2 is lifebloom myself:
#showtooltip
/cast [target=player] Lifebloom
But hey, I can include that in the macro! Just need to unbind the button on my keybindings. Less buttons that take up my screen = better.
#showtooltip
/cast [modifier:shift, target=player][target=mouseover, help][help] Lifebloom; [harm] Moonfire
Still doesn't fix the original problem.
Now, yesterday I had another thought. I want my buttons/macros to be reliable, and at the same time easy to use. I thought something in the lines of: I can use the focus. The macros can react differently depending on whether my focus is friendly or unfriendly. But with much thought back and forth, I found that it's slightly a bit unpredictable. I don't want my macros to react differently than what I expect, and I can't always expect that I remember to set focus and for that matter remember what my focus is. Thus, I tried to make macros that were easy to use and reliable.
Idea, evaluate in this order:
- If I'm my mouse is hovering any friendly target and I press the button, I heal that target.
- If my target is friendly, heal that.
- If my target is unfriendly, heal the target's target.
Harmful spells can be fixed with a modifier. Of course it's not as easily accessible as it was before. I'll have to play around and see if I like it.
- Ctrl: Hurt the current target if it's harmable, otherwise hurt the target's target.
- Shift: Still heal myself
- Alt: Heal or hurt the focus, depending on whether it's healable or harmable.
Ideally, I want to set my target as focus if a focus doesn't already exist when I press alt. Unfortunately, I can't. I'm easily breaking the 255-character limit already without it, so I'll try to save space where I can. Especially after commas.
#showtooltip
/cast[modifier:ctrl,harm][modifier:ctrl,target=targettarget,harm][modifier:alt,target=focus,harm]Moonfire;[modifier:shift,target=player][modifier:alt,target=focus,help][target=mouseover,help][help][target=targettarget,help]Lifebloom
There's a solution, though. Move the focus-macro to a different macro/button, namely alt+button. In that case, the main macro can be reduced to:
#showtooltip
/cast[modifier:ctrl,harm][modifier:ctrl,target=targettarget,harm]Moonfire;[modifier:shift,target=player][target=mouseover,help][help][target=targettarget,help]Lifebloom
However, it isn't needed. As far as I have noticed: If WoW finds a keybinding to alt-#, it triggers that button whether or not there's any spell bound to the button. If there's no such keybinding, it triggers the #-button instead, thus possibly triggering a macro. If it's no macro there, it just triggers #. So if you've got no key bound to shift-3 and lifebloom bound to 3, I'll cast lifebloom when I press shift-3.
The alt-macro-thingy could be like this:
#showtooltip
/clearfocus [target=focus,dead]
/clearfocus [target=focus,noexists]
/focus
/cast [target=focus, help] Lifebloom; [target=focus, harm] Moonfire
The only "problem" is that you may not always want to loose your focus since you can cast rebirth on him/her! ... But until further, that's not actually something I'd consider a problem. Besides, I've got my smart Rebirth macro already:
#showtooltip
/cast [target=mouseover, dead, help][dead, help][target=focus, dead, help] Rebirth; Hurricane
/stopmacro [nodead][nohelp]
/script SendChatMessage("Prepare to accept Rebirth.","WHISPER",nil, UnitName("target"))
Basically, cast rebirth if the mouseover, target or focus is dead and helpable and whispers them that they'll be ressed. If there's no such target available, cast Hurricane.
I'll post the rest of my macros later.