What a macro can and can't do

A macro is a list of commands the game runs when you press its key. It can choose between spells using a few simple checks, but it can't look at the fight and decide anything for you.

One spell per press

Most spells start the global cooldown. Once a line in the macro casts one of those, every spell after it fails for that press.

This only ever casts Frostbolt

#showtooltip
/cast Frostbolt
/cast Frost Nova

Frostbolt starts the global cooldown, so Frost Nova fails. Press it again and you get another Frostbolt. To have both on one key, give Frost Nova a modifier: /cast [mod:shift] Frost Nova; Frostbolt.

Anything that skips the global cooldown can share the press: most on-use trinkets, cooldowns such as Arcane Power and Presence of Mind, pet commands, and chat. That's how a burst button works.

Trinket, cooldowns and an instant Pyroblast

#showtooltip Pyroblast
/use 13
/cast Arcane Power
/cast Presence of Mind
/cast Pyroblast

The top trinket, Arcane Power and Presence of Mind don't touch the global cooldown, so all three go off and Pyroblast still gets its turn. Presence of Mind makes that Pyroblast instant.

Choosing between spells

Conditions in square brackets pick which spell a line casts, or who it lands on. Each one checks something simple that's true or false right now:

  • a key you're holding: [mod:shift], [mod:ctrl], [mod:alt]
  • a unit other than your target: [@mouseover], [@focus], [@player], or the ground under your cursor with [@cursor]
  • what that unit is: [help] a friend, [harm] an enemy, [dead]
  • your own state: [combat], [stealth], a form or stance with [form:1], [pet], [mounted], [channeling]

Several conditions in one bracket all have to be true. Clauses separated by ; are tried left to right, and the first one that fits wins.

A line that can't go off is skipped

When a spell can't be cast right now, because it's on cooldown or it needs something to happen first, its line fails (you may see red error text) and the next line gets its turn. That gives you a simple fallback.

Revenge when it's up, Sunder Armor otherwise

#showtooltip
/cast Revenge
/cast Sunder Armor

After you block, dodge or parry, the press is Revenge, and Sunder Armor fails on the global cooldown. The rest of the time Revenge can't go off, so the press is Sunder Armor. This is as close to “if this, then that” as a macro gets.

What no macro can do

  • Check your health or mana. There's no condition for “below half health”, so a potion macro drinks whenever you press it.
  • Check a buff, a debuff or a cooldown. It can't put Shadow Word: Pain back up only when it has run out.
  • Pick a target for you. It can't find the party member with the lowest health. Mouse-over casting is the quick way to heal the right one.
  • Press itself. Every action needs a key press, and one press runs the macro once, top to bottom. There's no waiting and no loop.
  • Play a rotation. /castsequence moves one step per press and stays on a step that fails, so a spell on cooldown holds up the rest. It suits buffs and fixed openers, not a whole fight.

Scripts don't get around it

/run (or /script) runs a line of Lua, the interface's scripting language. It can change settings, print things and sell grey items at a vendor, but the game won't let a script cast a spell, change your target or use an item. Those only work as slash commands, from a key press.

Forever also runs on the current game client, which keeps health, power and threat away from scripts: a /run line can print your health but can't compare it with anything. Old macros written for the 1.12 client, the kind still posted on private-server forums, often use CastSpellByName or check UnitHealth. Neither works in Forever, and the checker flags both.

Getting more out of one key

Put the choice on your keys instead of in the macro. Shift, Ctrl and Alt give one button up to four spells, and mouse-over casting picks the target without clicking it first.

Commands, conditions and limits on this page are from the interface files of the Forever beta client, build 1.60.1.70009.