How to Make Macros in World of Warcraft
I wrote this guide because every time I wanted to write a macro for World of Warcraft, I would have to spend hours searching multiple websites and databases to find what I was looking for. In this article, I will go over how to make very simple to very complex macros that allow you to almost cast your entire rotation using one button, a combination of the WoW macro system, and an add-on. GSE: Advanced Macro Compiler.
Type /macro in-game.
​
In the window that appears, you can select a general macro that will be shared across your account or a macro for that specific character.

Then click on New at the bottom right of that window. In the window that shows up, you will name the macro and choose the one you want to use. In most cases, it is best to select the question mark icon. Use #showtooltip at the top of any macro to display spell icons when the question mark icon is selected. Once you name your macro, you can write it

For example, I use a very simple macro to make my monk roll.

Wow Target Macros
​
Target macros in World of Warcraft allow you to automate targeting actions, making gameplay more efficient and streamlined.
​
-
/target [@mouseover] = targets mouse over
-
/targetenemy = targets only enemy targets
-
/targetenemyplayer = targets an enemy PVP-flagged player
-
/targetexact = must be followed by a NPC’s or players name and will only target it if it matches exactly
-
/targetfriend = targets only friendly NPCs or players
-
/targetfriendplayer = targets only friendly players
-
/targetparty = only target players in your party
-
/targetraid = only targets players in your raid group.
Macro Conditionals
​
Macro conditionals are used to add specific criteria to your macros, allowing you to create more complex and versatile commands. They are generally surrounded by brackets [ ] and are placed after the target or cast command and before the spell or target name.
​
Basic Examples
​
-
/cast [@focus] Flash of Light: This will cast Flash of Light on your Focus target.
-
/cast [@focus,combat,dead] Rebirth: This will cast Rebirth on your focused target only if they are dead and you are in combat
-
[exists] will cast only if specific criteria exist; for example, the following macro will cast Flash of Light at your mouseover target if you have moused over a target. If not, it will cast Judgment on your current target.
​
​​
#showtooltip
/cast [@mouseover,exists] Flash of Light
/cast Judgment
Help and harm conditionals are helpful when limiting the number of buttons on your action bar. You can combine the two so that if the target is friendly, you will cast a helpful spell if it is unfriendly, you will cast a harmful spell; in the example below, if your target is an enemy target, you will cast Hammer of Justice. If your target is friendly, you will cast Lay on Hands
#showtooltip
/cast [harm] Hammer of Justice
/cast [help] Lay on Hands
Side note: you can put the word no in front of almost any modifier, and it will now mean the opposite. For example, [nodead] implies the target is alive, and [noharm] means only targets you can't harm.
• [help] will only cast the spell if you can help the target
• [harm] will only cast the spell if you can harm the target
• [dead] will only cast the spell if your target is dead
• [nodead] will only cast the spell if your target is alive.
• [party] will only cast a spell if the target is in your party
• [raid] will only cast a spell if the party is in your raid group
• [advflyable] Only cast the spell if you are in an area where you can dragonfly.
• [combat] Wil only cast a spell if you are in combat
• [form;0] has to have a form number combined with it but will only cast if you are in a certain form or stance
• [stance:0] works the same as the form
• [known:name of spell] will only try to cast the spell if it is known
• [mounted] will only cast a spell if you are mounted
• [pet:name] or [pet:family] fill in the name of the pet or the family of the pet, and it will not cast the spell unless the pet or type of pet is active
• [pvpcombat] works only if you are engaged in PVP
• [Stealth] works only if you are in stealth
• [Swimming] works only if you are swimming
Modifiers
​
You can use [mod] conditions in macros to specify actions based on which modifier key is being held when the macro is activated.
/cast [mod:shift] Spell1; [mod:alt] Spell2; [mod:ctrl] Spell3; Spell4
Holding Shift → Casts Spell1
Holding Alt → Casts Spell2
Holding Ctrl → Casts Spell3
No Modifier Pressed → Casts Spell4
Examples of Modifier Macros
1. A Simple Spell Swap Macro
This macro changes the spell depending on the modifier:
/cast [mod:shift] Fireball; [mod:alt] Frostbolt; [mod:ctrl] Arcane Missiles; Fire Blast
Shift → Fireball
Alt → Frostbolt
Ctrl → Arcane Missiles
No modifier → Fire Blast
2. Modifier for Self-Casting
This macro heals your target normally but heals yourself if Alt is held:
/cast [mod:alt,@player] Flash Heal; Flash Heal
Holding Alt → Casts Flash Heal on yourself
No modifier → Casts Flash Heal on your targe
t
3. Using Modifiers with Items
This macro uses different health potions depending on the modifier key:
/use [mod:shift] Healthstone; [mod:alt] Healing Potion; [mod:ctrl] Warlock Cookie; Health Potion
Shift → Uses Healthstone
Alt → Uses a Healing Potion
Ctrl → Uses Warlock Healthstone
No Modifier → Uses a standard Healing Potion
4. Modifier with Pet Abilities
This macro commands your pet to attack normally but uses a special ability if a modifier is pressed:
/petattack
/cast [mod:shift] Intimidation; Kill Command
Shift → Uses Intimidation (stun)
No Modifier → Uses Kill Command
Using Multiple Modifiers
You can combine multiple modifiers:
/cast [mod:shift,mod:ctrl] Polymorph; [mod:shift] Fireball; [mod:ctrl] Frostbolt; Arcane Missiles
Shift + Ctrl → Casts Polymorph
Shift (alone) → Casts Fireball
Ctrl (alone) → Casts Frostbolt
No Modifier → Casts Arcane Missiles
Keybinding and UI Considerations
Some WoW keybind settings may interfere with macros (e.g., Shift+1 might be bound to an action bar).
If a modifier key isn’t working, check your Key Bindings in WoW settings.
Macros should be short (255-character limit), so optimize them.
• [mod:shift] requires the shift button to be pressed
• [mod: alt] requires the alt button to be pressed
• [mod:ctrl] requires the control button to be pressed
Temporary Target Conditionals
​
You can use temporary target conditionals to cast a spell at something other than your current target.
• [@player] will only cast the spell at you without having to target yourself
• [@targettarget] will cast the spell at your target’s target
• [@focus] will cast it at your focused target
• [@focustarget] will cast the spell at your focused target’s target
• [@mouseover] Cast at a target you have your cursor at.
• [@cursor] Cast an area affect spell at the location of your cursor.
• [@none] will not allow a spell to auto-self-cast and will only cast if you have a target
Other helpful target macros​
• assist - Targets a player's target.
• clearfocus - Clears the current focus target.
• cleartarget - Clears the current target.
• focus - Set a focus target
• target - Target the given unit by name.
• targetexact - Target the unit by exact name match.
• targetenemy - Cycle through nearby hostile units (no name matching).
• targetenemyplayer - Cycle through nearby hostile players (no name matching).
• targetfriend - Cycle through nearby friendly units (no name matching).
• targetfriendplayer - Cycle through nearby friendly players (no name matching).
• targetparty - Cycle through nearby party members (no name matching).
• targetraid - Cycle through nearby raid members (no name matching).
• targetlastenemy - Target the last attackable unit you had selected.
• targetlastfriend - Target the last friendly unit you had selected.
• targetlasttarget - Sets your current target to the last unit you had selected.
Combat commands
​
Combat commands help stop casting so you can immediately cast another spell, stop attacking, etc.
• cancelaura: Cancels (turns off) an aura you have.
• cancelqueuedspell: Cancels casting of the spell you have in the queue.
• cancelform: Cancels your current shapeshift form.
• cast: Uses the stated spell or item (conflict in names goes to spell on "cast").
• castrandom: Casts a random spell or uses a random item from the given list.
• castsequence: Casts the given spells in sequential order.
• changeactionbar: Changes your current action bar page.
• startattack: Turns on auto-attack.
• stopattack: Turns off auto-attack.
• stopcasting: Stops casting or channeling.
• stopspelltarget: Cancels the spell or ability currently being targeted.
• swapactionbar: Swaps between two given action bars.
• use: Uses the stated item or spell (conflict in names goes to item on "use").
• usetoy: Uses a toy.
• userandom: Casts a random spell or uses a random item from the given list.
Pet Commands
It is excellent for hunters and warlocks to direct their pets to use their pets' abilities when desired rather than letting them auto-cast the abilities. You can also direct your pets to attack one target while you attack another.
​
-
petassist: Sets pet to assist mode.
-
petattack: Sends pet to attack currently selected target.
-
petautocastoff: Turns off autocast for a pet spell.
-
petautocaston: Turns on autocast for a pet spell.
-
petautocasttoggle: Toggles autocast for a pet spell.
-
petdefensive: Sets pet to defensive.
-
petdismiss: Dismisses your pet.
-
petfollow: Sets pet to follow you.
-
petmoveto: Sets pet to move to and stay at a hover-targeted location.
-
petpassive: Sets pet to passive mode.
-
petstay: Sets pet to stay where it is.