Macro Syntax: Writing a WoW Macro

child-in-suit-working-on-computer-wearing-spectaclesCombat macro’s are the most important macro’s for me. For the time being, I am focusing on writing simplistic restoration druid casting macros, most notably mouseover macros. Healing is a lot easier if you can mouseover your target rather than needing to click through health bars. This is not a comprehensive summary of all macro’s, but a small portion of core commands and conditions that I am using frequently when writing my own macro’s. Wowwiki has a more comprehensive command list here.

The core of a macro looks like this:

/<command> [condition1, condition2, etc] spellname ; [condition1, condition2, etc] spellname

Slash commands

Several slash commands are available. I use the following combat slash commands:

/cast: Casts a spell listed in the spellbook
/startattack and /stopattack: toggles auto attack
/use <itemname> or <slot> or <bagslot> : Use an item by name,  Itsuch as potions, flasks or bandages, by name or slot or bagslot.
/equip <item name>: equips an item by name
/dismount: obviously to dismount if mounted

Conditions

Conditions are important and it’s often the place where my macro breaks. A condition (or the sum of all set conditions) must be true if the spell is to be cast. If all conditions aren’t met, the macro will continue onward to the next set of conditions and if there isn’t any, the macro will end without casting. It’s vital to get your conditions correct. Any condition usually has an opposite, such as combat vs nocombat, where ‘no’ negates the condition. If no conditions are mentioned, the spell will automatically cast. My favourite conditions:

[target=mouseover] – spell will be cast on mouseover target

[combat, nocombat] – evaluates combat status

[harm, help] – harm is true if your target is attackable and help is true if target is assistable

[nostance, stance, stance:0 – stance:6] very important as a shapeshifting druid. Nostance or stance:0 refers to normal stance, i.e. caster form as a druid, whilst stance:1 to stance:6 is each form as you count them from your druid shapeshifting bar. As a resto, I always remember stance:5, which is Tree of Life or Moonkin form. [stance] means the condition is true in any form.

[stealth, nostealth] – applies to rogues and cat form

[modifier, nomodifier, modifier:<shift,ctrl,alt>] – I don’t use modifiers much as it generally requires pressing two keys at once, but a lot of macro’s do and that creates the need to know about them.

[exists, noexists] – Returns true if the target or spell exists. Rarely useful to me, but used occasionally.

[dead, nodead] – Great for resurrection spells in particular.

Example

A macro to cast Lifebloom on mouseover if the target exists:

/cast [target=mouseover,exists] Lifebloom; Lifebloom

Writing a macro can be easy. I just want my Lifebloom to be cast on mouseover rather than requiring a click. For changes that small and simple, just pick a slash command, add your conditions and finish with the spell name and you’re done.


Advertisements

2 Comments

Add yours →

  1. Something that i was hoping that you could touch on just a bit would be a warrior macro that i am trying to build.. from the information above (and it is little) i am guessing that at [exists, noexists] would help with the application. As a Fury Warrior, wanting to cast Overpower and Execute on a macro. Both of the spells are on random procs. Was looking for a macro to 1.) Light up when one of the two spells are availible; 2.) press the macro on the action bar to activate either or ability. a “/castsequence” command would work, but only in the order the spells are arranged, so if the spell order is OP then Exe Overpower procs and execute is not availible, the sequence will not run.

    Thanks in advance for help on this long winded coment…

    Bláck – 80 Shaman
    Blackhand

  2. hey i’m a druid, and have got the castsequence down for 2 spells on a single target, but i want to hit that same butt, cast both spells, switch to the next target cast both spells, then to the next, cast both spells, have any scripts for that? i try but it keeps cycling through the targests and only casting the 1st spell, but cycles through targets too fast..?? how can i do this?

Comments are closed.

%d bloggers like this: