Currency:USD $
Notifications
WoW Macro Guide: Commands, Conditions, and Examples

WoW Macro Guide: Commands, Conditions, and Examples

Create safer Retail WoW macros with targeting, modifiers, focus, cursor placement, item use, castsequence limits, chat rules, and current troubleshooting.

How WoW Macros Work in Patch 12.1

A WoW macro turns one action-bar button into a short list of slash commands. Open Blizzard's Macro interface with /macro or /m, choose where the macro is stored, write its commands, and drag the saved icon to a bound action slot. In Patch 12.1 Curse of Ula'tek, macros may evaluate supported secure conditionals such as [combat], but they cannot inspect cooldowns, auras, resources, or priority to choose a rotation for you.

Key Takeaways

  • Retail Patch 12.1 provides 120 General macro slots and 30 character-specific slots, replacing the older 18-character-slot figure still repeated in some guides.
  • Blizzard's question-mark icon follows #showtooltip, so one macro button can display the spell or item selected by its first matching condition.
  • Secure command options evaluate left to right: commas mean every condition in one bracket must pass, separate bracket groups provide fallbacks, and semicolons begin the next action clause.
  • WoW unit tokens such as @mouseover, @focus, @player, and @cursor redirect one permitted action without selecting a new target.
  • The /castsequence command advances one successful entry per press and cannot skip a spell because its cooldown, resource cost, or buff state is inconvenient.
  • Midnight limits macros that set target markers on more than three units in a very short time. Active encounters separately restrict macro chat and whispers, while the Patch 12.1 Ping System provides a safer short signal for immediate group calls.

Build the smallest macro that removes one repeated targeting or modifier step, test it on a training target, and keep the unmodified action available until its behavior is predictable.

Create, Name, and Store a Macro

The Macro interface has General and character-specific tabs. General macros are shared by characters on the account, so they suit universal item, targeting, and interface commands. Character-specific macros belong to the current character and suit class spells or a personal equipment setup. The current Retail macro slot range is 1 through 120 for General macros and 121 through 150 for character macros. That means Patch 12.1 exposes 30 character slots, even though older references still list 18.

  1. Type /macro and choose General or the current character tab.
  2. Select New, give the macro a distinctive name, and choose the question-mark icon when you want dynamic feedback.
  3. Enter the macro text with one slash command per line.
  4. Save it, drag the macro icon to an action bar, and bind that slot like any other action.
  5. Test every condition with valid, invalid, friendly, hostile, living, and dead targets as applicable.

The current CreateMacro limits are 16 characters for the displayed name and 255 characters for the body. Text beyond the body limit is truncated, which can remove a fallback or the end of a spell name. Duplicate names are allowed in the interface, but API lookups by name can resolve unpredictably, so keep names unique.

📌 Macro library mistake: Put a class-only spell in the character tab, not in a General slot with the same name on several characters. Distinct names prevent action bars and macro tools from binding to the wrong copy.

The icon chosen during creation is only a starting point. The question mark plus #showtooltip gives more useful cooldown, range, and item feedback once the macro has real actions.

Understand Commands, Conditions, and Evaluation Order

A secure macro line has a command, optional bracketed conditions, and a parameter such as a spell, item, unit, or equipment set. Secure command options are evaluated from left to right. The first satisfied clause supplies the action and temporary unit target. A clause without conditions is always true, which makes it a useful final fallback and a common source of accidental casts.

#showtooltip
/cast [@mouseover,help,nodead][help,nodead][@player] FRIENDLY SPELL

Replace FRIENDLY SPELL with the exact Spellbook name. The first bracket uses a living friendly mouseover. If that fails, the second uses a living friendly current target. The final bracket casts on the player. Commas inside one bracket mean AND; consecutive bracket groups mean OR; the parser stops at the first group that passes.

#showtooltip
/cast [mod:shift,@player] FRIENDLY SPELL; [@mouseover,help,nodead][help,nodead] FRIENDLY SPELL

The semicolon begins a new clause. Holding Shift chooses the self-cast clause; without Shift, the parser tries mouseover and current-target fallbacks. Write conditions in lowercase and spell or item names exactly as the current client displays them. A localized client needs its localized names unless a documented numeric identifier is accepted.

ConditionTrue whenSafe useBoundary
help / harmThe tested unit can be helped or attackedChoose a friendly or hostile spell branchNeither condition is true for every existing unit
exists / noexistsThe tested unit exists or does notRequire a mouseover or focus before actingExistence does not prove friendly, hostile, or alive
dead / nodeadThe tested unit is dead or livingSeparate resurrection and living-target actionsAdd help when the spell also needs a friendly unit
mod:shift, mod:ctrl, mod:altThe named modifier is heldGive one key a deliberate alternate target or itemA self-cast key or another bind can consume the modifier
spec:nThe nth specialization is activeSelect a tooltip, item, or saved set by specThe index is class-specific; verify it in the current client
group, group:party, group:raidThe player is grouped in the requested typeStop a group-only macro when soloThis does not bypass encounter chat restrictions
form:n / stance:nThe numbered form or stance is activeChoose an action appropriate to the current formNumbers vary by class and learned forms; test after talent changes

The current macro condition list includes these visible player, unit, and interface states. It does not include “lowest health,” “spell off cooldown,” “buff missing,” “enough resource,” or “best target.” If an idea depends on that judgment, the player must make the judgment.

Use Player, Cursor, Mouseover, and Focus Targets

A target token beginning with @ temporarily directs one macro command. It does not change the selected target. @player uses the action on your character when the action supports self-targeting. @mouseover uses the unit or supported unit frame under the pointer. @focus uses the saved focus. @cursor places a reticle-based ground spell at the world position under the cursor.

GoalTemplateVerification
Friendly mouseover, target, then self/cast [@mouseover,help,nodead][help,nodead][@player] FRIENDLY SPELLTest a friendly frame, friendly target, empty mouseover, and dead unit
Hostile mouseover, then target/cast [@mouseover,harm,nodead][harm,nodead] HOSTILE SPELLWith no valid hostile unit, the macro should do nothing
Ground spell at cursor/cast [@cursor] GROUND SPELLOnly a spell that normally opens a ground reticle can use this
Ground spell centered on player/cast [@player] GROUND SPELLConfirm the spell permits player-centered placement
Focus first, current target second/cast [@focus,harm,nodead][] HOSTILE SPELLClear focus and confirm the empty bracket falls back to current target

Use a template only after replacing every uppercase placeholder with one exact current-client name. @cursor removes the confirmation click, so the result follows the pointer position at keypress. @player removes placement choice. Keep the normal reticle version available when exact ground placement matters.

Set and Clear the Focus Target Without Retargeting

The focus acts as a second remembered unit. This setup macro stores a living mouseover when one exists, otherwise a living current target:

/focus [@mouseover,exists,nodead][@target,exists,nodead]

Use /clearfocus to remove it, or require a deliberate modifier:

/clearfocus [mod:alt]

A focus cast still needs its own help or harm and nodead checks. Focus remembers a unit; it does not decide whether that unit is the right recipient.

✏️ Focus technique: Set focus before the pull, then test the macro once while targeting something else. If the focus frame, tooltip, and cast target disagree, clear the focus instead of adding more fallback branches.

Players refining frames and modifier binds can review the Midnight PvP UI after the basic focus macro works with Blizzard frames.

Use /stopcasting Without Hiding the Cost

The /stopcasting command cancels the current cast or channel when its condition passes. It does not check whether an enemy is casting, whether an interrupt will land, or whether cancelling the current spell is worth the lost cast time.

#showtooltip
/stopcasting
/cast [@focus,harm,nodead][] INTERRUPT SPELL

After replacing INTERRUPT SPELL, one press always stops the player's current cast and then attempts the interrupt on a living hostile focus, falling back to the current target. If the interrupt is out of range, on cooldown, or aimed at a non-interruptible cast, the original cast is still gone. A safer version requires a modifier on the cancellation:

#showtooltip
/stopcasting [mod:shift]
/cast [@focus,harm,nodead][] INTERRUPT SPELL

Without Shift, this macro attempts the interrupt without cancelling the current cast. With Shift, it cancels first. Test both paths on a training target and keep the plain Spellbook action nearby until the modifier is familiar.

Know Where Castsequence Stops Helping

The /castsequence command stores an ordered list and attempts one current entry each time the player presses the macro. It advances only after the entry succeeds. It cannot skip an unavailable spell, choose a higher-priority action, inspect cooldowns, or react to a proc.

#showtooltip
/castsequence reset=target/combat SPELL ONE, SPELL TWO

Replace both placeholders with exact names and test each step. reset=target returns to the first entry when the selected target changes. reset=combat returns when combat state changes. A numeric reset such as reset=8 counts inactivity since the macro was last pressed, not time since the first spell and not the cooldown of either entry.

ResetReturns to first entry whenDoes not mean
reset=targetThe selected target changesThe previous target dies or becomes invalid without a target change
reset=combatThe player enters or leaves combatEvery encounter event or enemy cast starts a new sequence
reset=8Eight seconds pass without pressing that sequenceEight seconds after the first successful spell
reset=target/combat/8Any listed reset condition occursThe sequence skips a blocked entry after eight seconds of repeated presses

A sequence is useful for a fixed non-urgent setup where every entry remains valid. It is a poor rotation button because a miss, range error, cooldown, resource shortage, immunity, or changed target can leave it parked on the wrong step.

⚠️ Castsequence warning: Repeatedly pressing a stuck sequence refreshes its numeric inactivity timer. Stop pressing, diagnose the blocked entry, or use the stated target or combat reset instead of expecting the macro to repair itself.

The macro continues to require one deliberate press for each protected action. It cannot add waits, queue a multi-GCD plan, or turn one input into a combat rotation.

Use Items, Trinkets, and Equipment Safely

The /use command accepts an item name, item link, bag and slot pair, or equipped inventory slot. Slot 13 is the upper trinket and slot 14 is the lower trinket. This exact macro uses the current item in slot 13 and lets the button show its tooltip:

#showtooltip 13
/use 13

A modifier can choose between the two equipped trinket slots:

#showtooltip
/use [mod:shift] 13; 14

This does not guarantee both trinkets are usable, off the global cooldown, or free of a shared cooldown. It attempts slot 13 with Shift and slot 14 otherwise. Test the actual items equipped in the current patch.

The /equipslot command uses a numbered inventory position, while /equipset uses a saved Equipment Manager set. These are syntax templates, not ready-made set names:

/equipslot 16 ITEM NAME
/equipset [spec:1] RAID SET; DUNGEON SET

Replace every uppercase value exactly. Equipment-set changes can fail after combat begins, and weapon swaps follow current combat restrictions. Do not place a required defensive or interrupt behind a set swap that might not happen.

Keep Chat and Ping Macros Current

Chat lines are useful for a short pull status, but they are not secure commands and do not evaluate bracket conditions by themselves. Use /stopmacro when a group-only message needs a guard:

/stopmacro [nogroup]
/p Ready for the next pull.

Blizzard's April 17, 2026 cumulative hotfix ledger records the macro restrictions under its March 1, 2026 entry. The target-marker throttle is general: a macro cannot set markers on more than three units in a very short time. The entry separately limits macro chat during an active encounter. Non-group-exclusive channels, including guild, community, and custom channels, are blocked. Party, raid, and raid-warning messages remain available but are rate-limited, and the group must be inside the instance. Macro whispers must go to a target inside the instance and are also rate-limited.

For a brief positional call, the Ping System carries less text and does not pretend to explain a full mechanic. Patch 12.1 supports the cursor ping plus /pingspell:1234 or a spell name and /pingitem:1234 or an item name:

/ping [@cursor] warning
/pingspell:1234
/pingitem:1234

The cursor token tells the first command to ignore UI and units and attempt an environment marker where the pointer rests. The numeric examples ask the client to report the specified spell or item; replace 1234 with a valid current-client ID or use its exact current-client name. These commands do not cast a spell, use an item, select a target, persist like a world marker, or automate a response. Agree on what Warning means before the encounter.

🎯 Group-call rule: Use one Ping System warning for the immediate location and one pre-pull sentence for the standing plan. Rapid macro marking can hit the general target-marker throttle, while repeated encounter messages can hit separate chat throttles and create less clarity.

Readers choosing current content to practice these controls can explore current WoW options after the macro passes a normal group test.

Respect Protected Actions and One-Press Limits

WoW allows a physical key or mouse press to request a protected combat action through secure commands. It does not let that press choose a target from hidden combat data, wait for a condition, cast several global-cooldown spells, or repeat itself. Multiple lines are parsed immediately, but the first successful action that triggers the global cooldown prevents later global-cooldown casts from firing on the same press.

Some off-global-cooldown abilities or usable items can coexist with another line, yet their availability and shared cooldown rules vary. Treat each combination as a current-client test, not a universal promise. A macro also cannot compare health percentages, check which enemy is casting the most dangerous spell, read a proc, choose a spell by remaining cooldown, or find the weakest unit.

Use @focus, @mouseover, and ordered conditions to express a decision the player has already made. Do not use third-party automation, timed key repetition, or a broadcast tool to turn one action into many client inputs. Blizzard's input broadcasting policy treats mirrored commands across multiple clients as actionable.

Troubleshoot a Macro That Does Nothing

SymptomLikely causeSafe check
Question-mark icon stays blank#showtooltip cannot resolve the first matching action or a placeholder remainsUse one exact Spellbook or item name and retest
Mouseover branch never firesThe unit fails help, harm, exists, or nodeadTest the native unit frame and remove one condition at a time
Alt branch behaves like self-castThe configured self-cast modifier consumes AltChange either the macro modifier or the self-cast key
Focus action hits the current targetNo valid focus exists and an empty fallback bracket passesSet focus explicitly or remove the fallback while testing
Sequence stays on one entryThe current entry never completed successfullyCheck range, resource, cooldown, form, and target manually
Last clause is missingThe 255-character body limit truncated the macroShorten names and remove duplicate spaces before adding logic
Equipment set does not changeThe set name is wrong or combat restrictions applyUse the exact saved name while out of combat
Encounter chat line is blockedThe channel, rate, whisper target, or instance membership violates current rulesUse a group-exclusive channel once or send a Ping System signal

Start from one working line. Add the tooltip, one target condition, then one fallback, testing after each change. If the macro works with Blizzard frames but not a custom frame, update or isolate the addon before rewriting the secure command. Keep a plain action-bar copy during testing so a failed macro does not remove access to a required action.

Last reviewed 2026-08-27 against Patch 12.1 Curse of Ula'tek — Maintained by WowCarry's WoW team.

WoW Macro FAQ

Can a WoW macro cast two spells with one press?

A macro cannot complete two spells that both trigger the global cooldown from one press. It parses every line immediately, then the first successful global-cooldown action blocks later casts. Some off-global-cooldown abilities or items can be attempted on the same press, but their rules differ. Test the exact Retail 12.1 combination and never present it as a class-wide or permanent guarantee.

Why does my mouseover macro cast on me?

The self-cast fallback is probably the first clause that remains true. In [@mouseover,help,nodead][help,nodead][@player], an empty or hostile mouseover fails, then the current target is tested, and finally @player succeeds. Confirm the pointer is over a supported living friendly unit or frame. Also check whether the client's auto self-cast setting is using the same modifier as the macro.

What is the difference between @cursor and @player?

@cursor places a supported ground-targeted spell at the world position under the pointer. @player places a supported ground effect at the player's position. Neither token works for every spell, and neither changes the selected target. Use the normal reticle version when placement precision matters, because both tokens remove a confirmation step and act on the position chosen at keypress.

Do General macros work on every WoW character?

General macros are shared across the account, while character-specific macros appear only for the current character. Retail Patch 12.1 exposes 120 General slots and 30 character slots. A shared macro can still fail on a character that lacks its spell, item, equipment set, or valid form. Use General storage for truly reusable commands and character storage for class or personal setup logic.

Can castsequence automate my WoW rotation?

No. /castsequence advances one successful entry per physical press. It cannot inspect a proc, cooldown, resource amount, buff, debuff, target count, or encounter priority, and it does not skip a blocked spell. Numeric resets measure inactivity since the last press rather than a spell's cooldown. Use sequences for short fixed setup tasks, not for a combat rotation that requires live decisions.

Can a macro choose the lowest-health player?

No supported secure condition selects the lowest-health unit or compares health percentages. Macros can act on a unit the player already chose, such as @mouseover, @focus, @party1, or the current target, then test states such as help, exists, and nodead. The player still decides which unit needs the action and provides the hardware input.

Why is my chat macro blocked during an encounter?

The March 1 entry on Blizzard's April 17 cumulative hotfix page tightened macro chat during active encounters. Guild, community, custom, and other non-group-exclusive channels are blocked. Party, raid, and raid-warning messages are allowed only under instance-membership rules and are rate-limited; macro whispers must target someone inside the instance and are rate-limited too. The target-marker throttle is a separate general restriction. Send one short group message or use the native Ping System for an immediate location.

Are built-in WoW macros allowed?

Commands accepted by Blizzard's in-game Macro interface operate inside the client's secure rules. That does not authorize third-party automation, timed repetition, or input broadcasting across several clients. Keep each protected combat action tied to a deliberate player press, use only documented conditions, and recheck a macro after a major patch. If external software supplies extra decisions or repeated inputs, stop using that setup.