FOREVER MACRO

Introduction to Macros

From one command to macros that think. Work top to bottom; every section only uses what the ones before it taught.

01What a macro is

A macro gives one button a set of instructions. Each instruction is a command on its own line, commands start with a slash, and WoW runs the list when you press the button.

A macro can be as simple as one line:

/cast Flash Heal
Casts Flash Heal when you press the macro.

Macros are limited to 255 characters, including spaces and line breaks. As macros get more complex, that limit matters. Forever Macro keeps a running character count while you build.

02Commands and actions

The command tells WoW what kind of action to take. The text after it supplies the thing that command needs.

/cast Flash Heal
/use Healthstone
/target Defias Bandit
Casts a spell, uses an item, changes your current target.

Some commands change what you are targeting rather than cast anything:

/focus
/assist
/focus marks your current target as your focus. /assist changes your target to whatever your current target is targeting.

Neither takes a name. /focus remembers a unit so you can act on it later without targeting it first, and /assist switches you to whatever your target is attacking. Both pair well with selectors once those come up.

03Choosing who it acts on

By default a macro acts on your current target. A selector changes that for one line, in brackets before the action name:

/cast [@focus] Flash Heal
Cast Flash Heal on my focus instead of my target.

Two kinds of things can live in those brackets. A selector answers “which unit?” A condition answers “under what circumstances?” In [@focus,harm], @focus chooses your focus and harm checks whether that branch is allowed to run. Conditions get their own section next; here are the common selectors:

  • @target: your current target (the default; you rarely write it).
  • @focus: your focus.
  • @targettarget: your current target’s target.
  • @focustarget: your focus’s target.
  • @mouseover, @mouseovertarget: the unit under your cursor, and its target.
  • @player: your character.
  • @pet, @pettarget: your pet, and its target.
  • @party1–@party4, @raid1–@raid40: numbered group members.

Selectors can also follow a unit’s target: append target to the unit token. @party2target is party member 2’s target, and the step can repeat: @party1targettarget is party member 1’s target’s target. Pet units work the same way: @raidpet5 is raid member 5’s pet. You will not need the deeper forms often, but the Advanced builder can produce them.

The one most players reach for first is @mouseover: point at a unit frame or a nameplate and press the macro, and the spell uses that unit without changing your current target.

/cast [@mouseover] Flash Heal
Heal whoever I'm pointing at.

Selectors never change your real target; they only redirect this action. If you actually want to change targets, that’s what /target and /focus are for, and they take a unit name or their own selector:

/target Injured Soldier
/target [@focustarget]
/target changes your current target for real; @ selectors only borrow a unit for one action.

04Adding conditions

A condition is a test in square brackets. The selector chooses the unit; the other conditions decide whether that branch is allowed to run:

/cast [harm] Smite
Cast Smite, but only if my target is hostile.

Commas are AND: every condition inside one pair of brackets must match at the same time:

/cast [@mouseover,help,nodead] Flash Heal
On my mouseover, AND only if it's friendly, AND only if it's alive.

Common conditions:

  • [help] / [harm]: the unit is friendly / hostile.
  • [dead] / [nodead]: the unit is dead / alive.
  • [exists]: the selector actually found a unit.
  • [combat] / [nocombat]: you’re in / out of combat.

Selector and condition share the same brackets but answer different questions. [@focus,harm] means “use my focus, and only if it’s hostile.”

05Alternatives and fallbacks

Two side-by-side bracket groups are alternatives: either one can satisfy the same action:

/cast [@focus][@mouseover,harm] Counterspell
Interrupt my focus, or failing that, a hostile unit under my cursor.

A semicolon separates ordered choices. WoW checks them from left to right and uses the first branch whose conditions match:

/cast [mod:shift] Hellfire; Rain of Fire
Shift held? Hellfire. Otherwise Rain of Fire, since the second branch has no conditions and always matches.

A final branch with no conditions is a fallback: it runs only when none of the earlier branches match. An empty bracket pair [] means the same thing. Leave the fallback off and a macro whose conditions all fail does nothing at all, which is sometimes exactly what you want.

/cast [@mouseover,help] Flash Heal; [@focus,help] Flash Heal; Flash Heal
Try my mouseover, then my focus, then just cast on my current target.

06Modifiers and input

Modifiers let the same macro do something different when you hold Shift, Ctrl, or Alt. A mod: condition is true while that key is held:

/cast [mod:shift] Hellfire; [mod:ctrl] Immolate; [nomod] Shadow Bolt
Shift gets Hellfire, Ctrl gets Immolate, no key gets Shadow Bolt.

nomod is “no modifier held.” Combine keys with a slash when either key should work: [mod:shift/ctrl] passes while Shift or Ctrl is held.

The button:n condition reads which mouse button activated the macro: [button:2] is right click, so one macro button can do one thing on left click and another on right.

/cast [button:2] Frost Nova; [button:1] Frostbolt
Left click casts Frostbolt, right click casts Frost Nova.

07Tooltip behavior

#showtooltip on its own line chooses which icon and tooltip the button shows. A macro that picks between several spells would otherwise show a ? icon:

#showtooltip
/cast [@mouseover,help] Flash Heal; Smite
The button shows the icon and tooltip of whichever spell would actually fire.

Left blank, the directive follows the action: the icon swaps between Flash Heal and Smite depending on where your cursor is, so you can see what the next press will do. Give it a name and it always shows that one thing instead:

#showtooltip Flash Heal
/cast [@mouseover,help] Flash Heal; Smite
Icon always shows Flash Heal, whatever the macro would cast.

#show is the lighter version. It controls the icon without touching the tooltip text.

08Repeated actions with /castsequence

/castsequence keeps a list of actions and moves through them one press at a time:

/castsequence Immolate, Corruption, Curse of Agony
First press Immolate, second Corruption, third Curse of Agony, then back to Immolate.

It is built for fixed openers where you want the same order every time. Each press casts the current step and moves to the next one. The press does not check whether that step will work: it does not wait out a cooldown, and it does not skip ahead because another spell would have been better. If the step cannot fire, nothing happens and the sequence still moves on.

reset= in front of the list tells it when to go back to step one:

/castsequence reset=target/combat/10 Immolate, Corruption
Restart when the target changes, when combat ends, or after 10 idle seconds.

Reset parts combine with slashes: target (target changed), combat (left combat), shift/ctrl/alt (that key is held), and a plain number (that many idle seconds since your last press). Any one of them can restart the sequence.

09Items and equipment

/use works like /cast for items, with the same conditions and selectors, but it also understands where things live:

/use Healthstone
/use item:6948
/use 13
/use 0 1
By name, by item id, by inventory slot (13 = first trinket), by bag and slot.

Inventory slots are especially useful for trinkets. /use 13 and /use 14 use whichever items are equipped in those two trinket slots, so the macro does not need to change when your gear does. Item ids work the same way when you want a specific item by number.

Equipping is a different family: /equip puts a named item on, /equipslot puts an item into a specific slot, and /equipset swaps in a whole saved set:

/equip Staff of the Adept
/equipslot 13 Badge of the Swarmguard
/equipset Tank
Equip by name, into a numbered slot, or as a saved set.

10Flow control and specialized commands

A few commands exist to steer the macro itself rather than act on the world:

/stopmacro [channeling]
/cast [@focus,harm] Counterspell
If I'm already channeling, stop here, don't clip the channel to interrupt.

/stopmacro ends the whole macro when its conditions pass. /stopcasting cancels your current cast so a follow-up (usually an interrupt) fires immediately. /startattack and /stopattack toggle auto attack, and /cancelaura//cancelform shed buffs and shapeshift forms.

Some commands are intentionally left as advanced text. Forever Macro recognizes /click, /run, /script, /castrandom, and /userandom, but it does not provide structured controls for every part of them. When you import one, the Builder keeps the line intact.

/castrandom Swift Brown Wolf, Black Wolf, Timber Wolf
Each press casts one list entry at random.

11Putting it together

Same macro, built up one idea at a time. Start with the plain heal:

/cast Flash Heal
Casts on your current target. Simple, but it means clicking the right unit first.

Point-and-cast instead. No target switching, just aim at a raid frame:

/cast [@mouseover] Flash Heal
Heals whoever is under the cursor.

Gate it so it only fires on a living friendly unit, no wasted presses on enemies or corpses:

/cast [@mouseover,help,nodead] Flash Heal
Mouseover, friendly, alive. All three must be true.

Give it a fallback so an empty mouseover still heals your current target instead of doing nothing:

/cast [@mouseover,help,nodead] Flash Heal; Flash Heal
Mouseover first, current target as backup.

Add a modifier branch for the emergency spell, and pin the tooltip so the button always shows what matters:

#showtooltip
/cast [mod:shift,@mouseover,help] Guardian Spirit; [@mouseover,help,nodead] Flash Heal; Flash Heal
Shift+mouseover casts Guardian Spirit; plain mouseover heals; nothing under the cursor falls back to your target.

The finished macro has three layers: holding Shift over a friendly mouseover fires the emergency cooldown, a plain friendly mouseover gets the normal heal, and your current target is the fallback when nothing is under the cursor. You built each piece separately, but they work together on one button.

Where next

The Builder writes this syntax for you. Pick Basic for the simple fields, Advanced when you want branches and preserved lines. The Analyzer reads any macro you paste in and explains every part. The Reference is the lookup table for all of it.