First, how is made a macro?
1) Ingame, type “/macro” or “/m” to open up the macro menu. Now you have 2 macro tabs. “General” and “YourCharacterName” macro. You can have up to 36 general macros that are shared between all your characters on the server and up to 18 macros only for your character.
2) Select the appropriate tab and click on “New” button at bottom right of the window.
3) Now you you must enter a name for your macro and choose an icon. You can select a colorful icon that will always show up or the “?” icon that will change depending of the “active” spell.
4) Click on “Okay” button.
5) Select the new macro in the list and click in the text area at bottom of the window. Macros can be up to 255 characters long (but there is a way to bypass this, see /click command).
Now, how does a macro work?
Macros are fairly simple. They are made of 3 parts:
– Object (Spells/Abilities/Items)
It starst with a “/” followed by a command, then conditions (separated by a “,”) in between “[ ]”, then the name of the spell. If there is more than one spell you want to cast with the same command, you separate their conditions/spell with a “;”.
You can have more than one set of conditions for each spell, so if the first set of conditions are not true, it will check the 2nd set, then third, etc. If none are true, it will then go the next spell (if there is one) and check conditions the same way.
Do not add a “;” at the end of the macro, it would just cause bugs.
Might sound complicated, so here is a pattern and an example:
/command [condition1_1,condition1_2,condition1_3][condition2_1][condition2_2] Spell1; [condition1_1,condition1_2][condition2_1] Spell2
/cast [harm,nodead] Smite; [help,nodead][@player] Renew
(will cast Smite if your target is hostile and alive else will cast Renew if your target is friendly and alive, else will cast it on you)
Note: A macro will always read condition set in order. If the first spell condition is met, it will cast that spell, no matter what conditions are after.
Comon mistake made by people is to break down their conditions.
/cast [mod:shift][@mouseover] Power Word: Shield; [@mouseover] Renew
This is bad because now PW:S and Renew both have same condition (@mouseover), so PW:S will always be cast and Renew will never.
What he wanted to do was
/cast [mod:shift,@mouseover] Power Word: Shield; [@mouseover] Renew
– Macro can’t pause.
– Macro can’t check for buff/debuff.
– Macro can’t check for rage/energy/mana/focus/runic.
– Macro can’t check for cooldowns.
– Macro can’t play the game for you.
You can add a “!” in front of a spell name to prevent it from toggling off.
Example: /cast !Ice Block (will prevent you from turning off Ice Block if it is already active).
By default a macro will cast the last rank of a spell. But you can add “Spell(Rank X)” to cast rank X of a spell.
Exception: Spell with “()” in their name require you to add “()” after the name.
Example: “Faerie Fire(Feral)()” because “Faerie Fire(Feral)” would confuse the game and it would try to cast “Faerie Fire” of rank “Feral” /duh.
This is using some API functions used by addons as macro. This is more advanced programming and I wont talk about it in this guide. The command is either /run or /script
Example: /run if(ShowingHelm()) then ShowHelm(0) else ShowHelm(1) end
This script will hide your helm if it is displayed, else will make it to show up.