How to setup a macro
1. Type /macro
2. Press New
3. Enter a Name
4. Select an icon
5. If you have this thread open, you can highlight a template below and copy-paste to the macro text box and replace the variables. Else typing would be the other option.
Once your macro is made, you can either drag the icon to a toolbar or access it by typing /macro <name> from the command line.
Key
Spell_Name = Actual Spell Name e.g. Healing Touch, Regrowth, Abolish Poison
Spell_Rank = Highest rank # of the spell you have in your Spellbook
name = Your name
Moonfire
/script r=Spell_Rank; if (UnitName(“target”) ~=nil) and (string.find(UnitName(“target”),”Totem“))~=nil then CastSpellByName(“Moonfire(Rank 1)”) else CastSpellByName(“Moonfire(Rank “..r..”)”); end
Example for a Level 60 Druid:
/script r=10; if (UnitName(“target”) ~=nil) and (string.find(UnitName(“target”),”Totemf”))~=nil then CastSpellByName(“Moonfire(Rank 1)”) else CastSpellByName(“Moonfire(Rank “..r..”)”); end
Another macro for Moonfire (Totem Destroyer)
/target First 5-10 characters of Totem name
/target First 5-10 characters of Totem name
/target First 5-10 characters of Totem name
/target First 5-10 characters of Totem name
/cast Moonfire(Rank 1)
List the totems in the order you want to destroy them, from least important to most important. Spamming the button will simply start at the bottom of the list and target totems, drop Rank 1 Moonfires on them, and work its way up until everything that fits the criteria is gone.
This macro has a couple drawbacks. Since it is based on the name of the totem, rather than just targeting any ‘totem’, it is possible, though highly unlikely, that you will inadvertantly target a PC with it if their name also fits the criteria. Also, due to character limitations, it is probably not possible to get every totem on the list.
I didn’t consider the second to be a real issue since some totems just aren’t worth destroying and some it won’t work on (pay attention to which totems have MORE than 5HP).
Mark of The Wild
/script r=Spell_Rank;l={1,10,20,30,40,50,60};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Mark of The Wild(Rank “..i..”)”);break;end;end
Example for a Level 60 Druid:
/script r=7;l={1,10,20,30,40,50,60};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Mark of The Wild(Rank “..i..”)”);break;end;end
Thorns
/script r=Spell_Rank;l={6,14,24,34,44,54};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Thorns(Rank “..i..”)”);break;end;end
Example for a Level 60 Druid:
/script r=6;l={6,14,24,34,44,54};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Thorns(Rank “..i..”)”);break;end;end
Regrowth
/script r=Spell_Rank;l={12,18,24,30,36,42,48,54,60};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Regrowth(Rank “..i..”)”);break;end;end;TargetLastEnemy();
Example for a Level 60 Druid:
/script r=9;l={12,18,24,30,36,42,48,54,60};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Regrowth(Rank “..i..”)”);break;end;end;TargetLastEnemy();
Rejuvenation
/script r=Spell_Rank;l={4,10,16,22,28,34,40,46,52,58};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Rejuvenation(Rank “..i..”)”);break;end;end;TargetLastEnemy();
Example for a Level 60 Druid:
/script r=10;l={4,10,16,22,28,34,40,46,52,58};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-do if (t>=l[i]-10) then CastSpellByName(“Rejuvenation(Rank “..i..”)”);break;end;end;TargetLastEnemy();
Innervate
/script x=UnitClass(“target”);if (not UnitIsFriend(“player”,”target”) or (UnitManaMax(“target”)<200 and x~=”Druid”)) then TargetUnit(“player”);end;CastSpellByName(“Innervate”);TargetLastEnemy();
This macro checks your current target, and if it is an enemy, or a friendly character that does not have a mana bar, it will target yourself, otherwise it will cast Innervate on that character. This will keep you from accidentally casting Innervate on a warrior or rogue or pet, and also can act as a self-cast when fighting solo. Also, it will target the last enemy you had targeted after casting so you can get right back in the fray.
Healing Touch (Will work correctly only for members in a party) EXPERIMENTAL This spell is not affected by level caps but mana management is nice and important.
Without ‘Gift of Nature’ talent (pulled from Thottbot)
/script r=Spell_Rank;H=UnitHealthMax(“target”)-UnitHealth(“target”);S=”Healing Touch(Rank “;SR={0,87,194,362,571,741,935,1198,1515,1889};for i=r,1,-1 do if (H>SR[i]) then CastSpellByName(S..i..”)”);break;end;end;TargetLastEnemy();
With ‘Gift of Nature’ talent (Only for level 46 Druid)
/script r=Spell_Rank;H=UnitHealthMax(“target”)-UnitHealth(“target”);S=”Healing Touch(Rank “;SR={41,98,213,394,617,799,1005,1269};for i=r,1,-1 do if (H>SR[i]) then CastSpellByName(S..i..”)”);break;end;end;TargetLastEnemy();
Macro for Self-Casting Spells
/script r=Spell_Rank;TargetByName(“name”);CastSpellByName(“Spell_Name
(Rank “..r..”)”);TargetLastEnemy();
For Cure Poison, Abolish Poison, Remove Curse
/script TargetByName(“name”);CastSpellByName
(“Spell_Name”)”);TargetLastEnemy();
Little lesson on how the above macros work
/script r=7; -> The letter ‘r’ is being assigned your highest ranked spell # for whatever spell this macro is being used for
l={1,10,20,30,40,50,60}; -> These are the character levels you receive a higher rank of the same spell. This is basically caled an array’.
if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end; -> This checks if there is a target or if the target selected is a friend. If there is no target selected or the target is not a friend then it selects you as the target.
t=UnitLevel(“target”); -> The letter t is being assigned your targets character
level i.e. say he/she is level 35, then t=35.
for i=r,1,-1 -> To explain what the letter i is doing, heres the syntax
i=(Highest Ranked Spell#),(Lowest Ranked Spell#),(What value should be decreased from the Highest Ranked Spell# to reach the Lowest Ranked Spell#)
do if (t>=l[i]-10) -> This is dependent on the letter ‘i’. To explain what ‘l[i]-10′ is doing -
l={1,10,20,30,40,50,60}
i=7,1,-1
If you count the number of values after ‘l’, from left to right, there are 7 of them. So what this does is
- When i=7 -> l=60
- When i=3 -> l=20
So if ‘t’ is greater than or equal to ‘l’-10 then it picks whatever the value of ‘i’ is at that point. So say t=25 then it is greater than l=20 and this corresponds to i=3
(based on example above)
then CastSpellByName(“Mark of The Wild(Rank “..i..”)”);break;end;end -> This is basically casts the spell and the rank is decided from what the value of ‘i’ is from the above equation.
So basically, the player is targeting the recipient, then hitting the hot key that determines what level the player is, chooses the right level spell, and casts it. Also if there is no target selected it will cast the spell on you. So no need to select yourself and then hit the key, just hit the key and boom, its cast on you.
Related posts:




You must log in to post a comment.