A floating violet crystal icon with gold trim is encircled by blue, purple, and orange magic against a blurred violet library backdrop.

How to Make Macros in WoW Midnight: Step-by-Step Guide

WoW
All
By: Dina
Dina
3
9 min read
0 comments

Updated October 31, 2026 for Midnight.

To make macros in WoW Midnight, open /macro, create a named macro, enter its commands, save it, and drag its icon onto an action bar. You can use macros for spell targeting, item use, chat messages, and profession progress checks.

Create your first macro

Follow these steps to learn how to make macros in WoW with a button that opens the macro window.

  1. Type /macro in chat and press Enter, or press Esc and select Macros from the game menu.
  2. Choose General Macros for a button shared across your characters, or the character-specific tab for a personal macro.
  3. Click New, enter a name, choose an icon, and click Okay.
  4. Enter /macro in the command box.
  5. Click Save, then drag the macro icon onto an action bar.
  6. Activate that action button to reopen the macro window.

For spell macros, select the question mark icon so the button can use an icon associated with its contents. Avoid duplicate names to reduce confusion when a command or addon refers to a macro by name.

Account, character, and text limits

Macro storageAvailable slots
General, shared across your account120
Personal, available to one character18 per character

Each native macro has a maximum length of 255 characters. Keep separate slash commands on separate lines, but keep each /run script on a single line.

Make a spell macro

Use /cast followed by the spell's exact name; this example casts Judgment.

#showtooltip Judgment
/cast Judgment

#showtooltip Judgment sets the spell information shown when you hover over the button. Write #showtooltip in lowercase; you can omit its spell name when the automatically selected spell is the one you want displayed.

Place your text cursor after /cast and Shift-click the desired spell in your spellbook to insert its exact spelling and punctuation.

A macro executes its lines immediately when activated; it does not wait between them. Most spells trigger the global cooldown, so adding several /cast lines does not make a single press perform a complete rotation. An instant spell that does not trigger that cooldown can precede another cast in the same macro.

Commands you can put in a macro

Cast, equip, and use items

/cast activates a named spell, /equip equips a named item in its default slot, /equipslot specifies an equipment slot, and /equipset loads a saved equipment set.

Use /use with an item name or an equipment slot number to activate an item. These slot numbers are useful when building your own buttons:

Equipment positionSlot number
Upper trinket13
Lower trinket14
Main hand16
Off hand17
Belt6
Wrists9

For example, this command uses the item in your lower trinket slot.

/use 14

/use 0 1 instead addresses the first slot in your backpack. For class-specific button ideas, continue with the macro section of the WoW Arcane Mage guide.

Stop a cast, attack, or buff

Use the command that matches what you want to interrupt or remove:

  • /stopcasting: interrupts your current spellcast.
  • /stopattack: ends your auto-attack.
  • /cancelaura Buff Name: removes the named buff; replace the placeholder with its actual name.
  • /stopmacro: stops processing the remaining macro lines, optionally under specified conditions.
  • /stop: ends an action such as dancing.

Place /stopcasting before a spell command when you want the button to abandon your current cast before attempting that spell. Use the Fire Mage guide for further class-specific macro examples.

Select targets and send a pet

/target Name selects a unit using a name match, while /targetexact Name requires the exact name. /assist switches to your current target's target, and /assist Name assists the named unit.

/startattack begins auto-attacking, and /petattack orders your pet to attack your target. /petfollow recalls your pet to follow you, /petstay holds its position, and /petmoveto lets you choose a destination on the ground.

Run a script

/run and /script execute Lua code; this example prints a message.

/run print("Ready to go")

Scripts cannot replace secure commands for casting spells, using items, changing action-bar pages, or controlling your target. Avoid long-running loops: a macro runs before control returns to the game, so an expensive script can freeze play while it finishes.

WoW Boosts

Buy WoW Boosts

Leave the grind to us!

Buy now!

Choose a target without switching manually

An [@unit] option on /cast directs the spell to that unit without changing your selected target. Choose the token that matches the relationship you need:

Target optionUnit it addresses
@playerYourself
@targetYour selected target
@mouseoverThe unit under your mouse
@focusYour saved focus
@targettargetYour target's target
@petYour pet
@boss1The first boss unit; other bosses use numbered tokens
@arena1The first opposing arena unit; other opponents use numbered tokens
@party1The first party member other than yourself
@cursorThe cursor location for spells that support this placement

Select a unit and use /focus to save it for later casts; /clearfocus removes that saved focus. A Mage can then cast Polymorph at the focus while keeping another unit selected.

/cast [@focus] Polymorph

Add conditions and modifier keys

Conditions sit inside square brackets, and commas require every condition in that bracket to be true. Multiple bracket groups offer alternatives, while semicolons separate branches with different spell or item parameters; evaluation proceeds from left to right.

Use these checks to narrow when a command runs:

  • help and harm: require a friendly or hostile unit respectively.
  • dead and nodead: check whether the unit is dead or alive.
  • exists and noexists: check whether the unit exists or is absent.
  • combat: requires you to be in combat.
  • channeling: checks whether you are channeling.
  • group:party and group:raid: check the corresponding group type.
  • indoors and outdoors: restrict use by your surroundings.
  • mounted and swimming: check those movement states.
  • mod:shift, mod:alt, and mod:ctrl: require the corresponding modifier key to be held when you activate the macro.

An empty bracket group, [], always matches and provides normal casting behavior as a fallback. Conditions are case-sensitive, and adding no reverses a condition; nohelp is broader than harm, since some units satisfy neither friendly nor hostile checks.

Mouseover and modifier macro examples

Heal a mouseover, target, or yourself

This Flash of Light macro prioritizes a living friendly mouseover, then a living friendly selected target, and finally yourself.

#showtooltip Flash of Light
/cast [@mouseover,help,nodead][@target,help,nodead][@player] Flash of Light

You can mouse over a friendly character or its unit frame for the first branch.

Interrupt a mouseover enemy

This Rebuke macro first checks for a living hostile mouseover, then falls back to your selected target.

#showtooltip Rebuke
/cast [@mouseover,harm,nodead][@target] Rebuke

The fallback does not include the first branch's hostility and alive checks. Keep the distinction in mind when adapting the example.

Use Shift for your previous target

Use /targetlasttarget to select your previous target; the command accepts conditions such as a held modifier. The following button changes targets when Shift is held, then attempts Judgment only if the resulting selected target is alive and hostile.

#showtooltip Judgment
/targetlasttarget [mod:shift]
/cast [harm,nodead] Judgment

Without Shift, the target-selection line does nothing and the cast checks your current target. This version changes your selection rather than directing a spell through an [@unit] option.

Cast spells in a sequence

/castsequence works through a comma-separated list of spells or items, using one entry per activation. It advances after a successful use, stays on the current entry if that use fails, and returns to the beginning after the last entry.

This example places Fireball before Ice Lance.

/castsequence Fireball, Ice Lance

A reset condition belongs before the spell list, after any bracketed conditions. For example, this version restarts when you change targets:

/castsequence reset=target Fireball, Ice Lance

Available reset conditions include leaving combat, changing targets, holding Shift, Alt, or Ctrl, and a specified period of inactivity; combine them with slashes. A numeric reset measures the time since the macro was last activated, so repeated presses restart that inactivity timer rather than tracking a spell's cooldown.

Midnight profession progress macros

Profession scripts can print completion flags and calculate catch-up remaining as maxQuantity - totalEarned for the relevant currency. Activate them when you want a progress readout; the completion checks return true or false rather than a remaining-item count.

Mining progress check

Use this shortened check for weekly sample completion, treatise completion, and the catch-up value.

/run local f=C_QuestLog.IsQuestFlaggedCompleted local g=C_CurrencyInfo.GetCurrencyInfo(3192) print("Samples",f(88678),"Treatise",f(95135),"Catch-up",g.maxQuantity-g.totalEarned)

The weekly gathering items are five Igneous Rock Specimens worth one Knowledge Point each, followed by a chance to gather a Septarian Nodule worth three; the weekly total from those items is eight Knowledge Points. Their collection progress resets weekly, and the Thalassian Treatise on Mining supplies another Knowledge Point.

Check your trainer quest separately: Belil offers a rotating weekly quest in Silvermoon at coordinates 42.6, 52.8, with access requiring Midnight Mining 25 and a level 90 character on your account. Its material request can be one of the following:

Weekly requestMaterials
Umbral Tin10 Umbral Tin Ore
Mixed Tin and Silver5 Umbral Tin Ore and 5 Brilliant Silver Ore
Refulgent Copper20 Refulgent Copper Ore
Mixed Copper and Thorium10 Refulgent Copper Ore and 2 Dazzling Thorium Ore

Jewelcrafting progress check

Create separate buttons for these two checks to keep each within the native macro text limit.

The first checks the Diamond Fragment and Stone Sample weekly treasure flags separately, using quest IDs 93538 and 93539.

/run local f=C_QuestLog.IsQuestFlaggedCompleted print("Diamond fragment",f(93538),"Stone sample",f(93539))

The second checks crafting quest 93694, treatise 95133, and the catch-up value from currency 3194.

/run local f=C_QuestLog.IsQuestFlaggedCompleted local g=C_CurrencyInfo.GetCurrencyInfo(3194) print("Craft quest",f(93694),"Treatise",f(95133),"Catch-up",g.maxQuantity-g.totalEarned)

Chat and emote macros

/s sends a Say message, /p sends party chat, and /w sends a whisper; emotes such as /wave, /ready, and /golfclap can be placed on macro buttons too. This example combines a short Say message with a wave.

/s Ready when you are!
/wave

A chat line paired with a spell command runs when you press the button, even if the spell cannot cast because of its target or cooldown. Keep messages brief and avoid wording that promises the spell succeeded.

Author
Dina
Dina
Has a passion for turning tangled topics into clean explanations that actually make sense. She believes any subject can be interesting — if you cut the fluff and add a little spark. With a knack for clarity (and the occasional well-placed metaphor), she helps readers feel smart without making them yawn. Basically, if it’s confusing, she’ll fix it.
View all posts
Comments