Friday, April 29, 2005

Healer Macro

This macro tests if you have a friendly player selected. If yes, it casts the heal on that player, and sends a party chat message that it is casting. If a friendly player is not selected (nothing is selected or a mob is selected) then it casts the heal on yourself and sends no message. After the cast is initiated, it re-selects the previously selected enemy (if any.)
/script if(UnitName("target")~=nil and
UnitIsFriend("player","target"))then
CastSpellByName("Healing Wave(Rank 9)")
SendChatMessage("Healing %T","Party")else
TargetUnit("player")CastSpellByName("Healing
Wave(Rank 9)")TargetLastEnemy();end
There is a space at the end of the last word "and" in the first line, after "then" in the second line, after "else" in the fourth line, and after "Healing" in the fifth line. Blizzard limits macros to 255 characters, so I have eliminated spaces that would normally exist but do not impact functionality of the macro. Do not insert any character returns in this macro. Note that the command "end" is case sensitive.

Big thanx to Muppet for giving me his code to work from.

No comments: