In Brief
- A macro with
#showtooltip+/cast Ability Namealways uses the highest rank of the ability you know, so you don’t need to replace abilities on your action bar as you level up. - The
#symbol sets a meta-command (how the macro appears on your action bar),/sets a command (such as/cast,/say), and[ ]set conditions for choosing an action. - Conditions usually have two parts separated by a colon (for example,
[worn:Bows],[stance:1]); most conditions can be inverted by adding thenoprefix ([noharm]). - The numbers in the
[stance:N]condition depend on your class: for example, 1 is Battle Stance for a warrior or Bear Form for a druid. - This guide covers examples including a universal ranged weapon macro, a set of warrior macros for stances, and two druid macros (Bear Form with ring equipment and buffs with
/castsequence). - This guide was originally written for Classic, so some of the syntax may have changed.
The Most Important Leveling Macro Trick
Let’s start with a little-known trick: a macro ensures you won’t forget to replace an ability on your action bar with a higher-rank version when you level up!
Type “/macro” in chat to open the macro window, then select the character-specific macros tab. Then click “New” and either press the space bar or enter the name of the key you use for the first ability you want to set up this way while leveling, then click “Okay” (leave the icon as a question mark).
Now open your spellbook, click in the macro text box, and enter the following:
#showtooltip
/cast
Then, without leaving the text box, Shift-click the first ability you want to use. You should end up with something like this:
#showtooltip
/cast Lightning Bolt (Rank 1)
Finally, delete “(Rank X)” so only this remains:
#showtooltip
/cast Lightning Bolt
Click “Save” and drag the macro onto your action bar in place of the regular ability! DONE! It will now always use the highest rank of the ability you know. Easy, right?
A Brief Overview of How Macros Work
# — Everything after the hash is a meta-command. Meta-commands determine how the macro appears on your action bar. (Examples: #show and #showtooltip)
/ — Everything after the slash is a command. The word you use determines the type of action performed. (Examples: /say, /cast, /target, /castsequence)
[ ] — Everything inside these brackets is a condition that determines which action will be performed. Usually (but not always), a condition has two parts separated by a colon (:). The part before the colon indicates the type of condition that must be met. (Examples: [worn:] [stance:])
The part after the colon specifies the condition. (Examples: [worn:Bows] checks whether you have a bow equipped, while [worn:Firearms] works if you have a firearm equipped; [stance:1] and [stance:2] are warrior stances—more on that below.)
There are some conditions that don’t have two parts. (Examples: [harm] works if you can harm your target; [mounted] works if you’re mounted.)
Most conditions can be inverted by adding “no” before them. (Example: [noharm] works on a target you can’t harm.)
The action comes after the command (or after the condition, if you’re using one). (Example: You can cast Frost Nova like this: /cast Frost Nova or /cast [harm] Frost Nova.)
Stance and Form Conditions: What the Numbers Mean
- [stance:0] — No stance.
- [stance:1] — Battle Stance (warrior), Bear Form / Dire Bear Form (druid), Stealth (rogue), Shadowform / Spirit of Redemption (priest), or Ghost Wolf (shaman).
- [stance:2] — Vanish (rogue), Defensive Stance (warrior), or Aquatic Form (druid).
- [stance:3] — Berserker Stance (warrior), Cat Form (druid).
- [stance:4] — Travel Form (druid).
- [stance:5] — Moonkin Form (druid).
The words “stance” and “form” are interchangeable.
Useful Macro Examples and How They Work
Some of these macros are class-specific, but they show how macros are written, so they’re easy to modify for your own needs and class!
This macro eliminates the need to switch abilities for each type of ranged weapon, and the ability icon changes according to the type of weapon you’re using! It’s great for warriors, rogues, and hunters!
#showtooltip
/cast [worn:Bows] Shoot Bow; [worn:Crossbows] Shoot Crossbow; [worn:Guns] Shoot Gun; [worn:Thrown] Throw
#showtooltip— the icon shows what will be used when you press it, including its cooldown./cast— tells the game to use an ability based on the following conditions.[worn:-weapon type-]— performs the following action based on the type of weapon you’re wearing.Shoot -weapon type-— specifies which ability to use.
Here are two macros I wrote for my warrior back in Classic—they work great together. The first one is very simple and works especially well for protection warriors. IF you’re in Defensive Stance, pressing it switches you to Battle Stance, and if you’re in Battle Stance, it switches you to Defensive Stance!
#showtooltip
/cast [stance:1] Defensive Stance; [stance:2] Battle Stance
#showtooltip— the icon shows what will be used when you press it, including its cooldown./cast— tells the game to use an ability based on the following conditions.[stance:1/2]— performs the following action based on your stance: 1 — Battle Stance, 2 — Defensive Stance, 3 — Berserker Stance.Battle/Defensive Stance— specifies which ability to use.
It pairs perfectly with the second macro, which uses three different abilities:
Out of combat, it uses Charge (which can ONLY be used in Battle Stance), while in combat it uses Execute in Battle Stance or Mocking Blow in Defensive Stance! Together, these two macros make it easy to use stance-specific abilities without any extra hassle.
#showtooltip
/cast [nocombat] Charge
/cast [stance:1] Execute; [stance:2] Mocking Blow
#showtooltip— the icon shows what will be used when you press it, including its cooldown./cast— tells the game to use an ability based on the following conditions.[nocombat]— performs the following action only if you’re out of combat; if you’re in combat, it moves on to the next line.[stance:1/2]— performs the following action based on your stance: 1 — Battle Stance, 2 — Defensive Stance, 3 — Berserker Stance.Charge/Execute/Mocking Blow— specifies which ability to use based on which condition is met.
Here’s a macro for druids: it removes any form you’re currently in and shifts you into Dire Bear Form (remove the word Dire if you haven’t learned Dire Bear Form and use regular Bear Form instead), while also equipping your tanking rings.
#showtooltip Dire Bear Form
/cancelform [stance:2][stance:3][stance:4]
/cast Dire Bear Form
/equipslot 11 First Ring
/equipslot 12 Second Ring
#showtooltip Dire Bear Form— the icon shows Dire Bear Form, replacing all other tooltips used in the macro./cancelform [stance:2][stance:3][stance:4]— cancels any other active form./cast Dire Bear Form— shifts the druid into Dire Bear Form./equipslot 11/12 (ring names)— these two lines equip rings in two different ring slots; if you don’t specify the slots, both rings will try to occupy the same slot. Replace the ring names with the rings you use for tanking.
Need to apply buffs quickly and conveniently, but running out of space on your action bar? Here’s another macro for druids. It will help with that and also demonstrate how to use a modifier condition and the sequential cast command!
/cancelform
/cast [mod:shift] Gift of the Wild
/castsequence reset=10/target Mark of the Wild, Thorns
/cancelform— cancels any active form./cast [mod:shift] Gift of the Wild— uses Gift of the Wild ONLY if you’re holding Shift at that moment./castsequence reset=10/target Mark of the Wild, Thorns— uses Mark of the Wild and Thorns when you press the macro twice in a row;reset=10makes the macro return to the beginning of the sequence after 10 seconds.
Conclusion
I hope this guide helps. It wasn’t intended to be a list of macros to copy and paste (although feel free to use any of the examples), but rather to show how macros are written and how they work so you can create your own. Almost all of the examples are easy to adapt for different classes by simply changing the names of the abilities and items.
Ultimately, macros are a process of trial and error, and now you should know enough not to feel completely lost when you decide to write your first macros.
Note. This guide was originally created for Classic, so macro syntax may have changed.
Frequently Asked Questions
How do I make a macro always use the highest rank of an ability?
Create a macro with #showtooltip and /cast Ability Name, without specifying a rank like “(Rank X),” and drag it to your action bar in place of the ability. It will then use the highest rank you know.
What do the symbols #, /, and [ ] mean in a macro?
The # symbol sets a meta command (how the macro appears on your action bar), the / symbol sets a command (such as /cast or /say), and conditions for choosing an action go in brackets [ ].
How do I invert a condition in a macro?
Add “no” before the condition. For example, [noharm] will work on a target you can’t harm.
What do the numbers in the [stance:N] condition mean?
They indicate a stance or form, depending on your class. For example, [stance:1] means Battle Stance for a warrior or Bear Form for a druid; [stance:2] means Defensive Stance for a warrior; [stance:3] means Berserker Stance for a warrior or Cat Form for a druid.