Tuesday, March 24, 2009

Macros: an Introduction

Macros are a tool for customizing and re-writing the spells and abilities on your bars. They act just like a spell from your spellbook and can be placed on any action bar, only you have control over what they cast and do.

You can use them to specify who the target will be, or to combine multiple spells into one button to take up less space, and more. This, in turn, declutters your screen and can take out several clicks between you choosing your spell and it landing where you want it to go!

To create a macro, type /macro to bring up your macro panel.
  • The General Macros tab is available to all of your characters on your account.

  • The macros you create in the Name-Specific tab are only going to be available to that specific character.
To create a macro, select "New," and type in a name and choose an icon for its graphic. You can choose the first icon, the [?] , if you want the macro to automatically pick its own graphic based off of the spells that you will add to the macro itself.

When you are done selecting a name and icon, click "OK." The text box at the bottom of the main macro window is where you will type in the commands for the macro itself.

A macro in its rawest form is written as follows:

/cast Spellname

That is the form that each spell or ability you take from your spellbook follows. The spellname must be typed exactly as it appears in your spellbook, though ranks can be omitted if you choose. From here, you have many choices on how to alter this simple spell cast. You can add specific requirements in [brackets] that tell the game specifically how you want it to handle that spell, and when to ignore it.



Key Modifiers

Modifiers are keys that act as a toggle, and include Shift, Alt, and Ctrl. You use a modifier key every time you toggle a letter between uppercase and lowercase! For a macro, these modifier keys are held while clicking on a macro in order for the game to cast the spell. You can specify the particular modifier key you wish to use, such as with [mod:shift], or you can use [mod] to let it respond to any of the three modifier keys.

/cast [mod:shift] Lifebloom

The game reads the above macro as “cast (if they are holding down the shift key when this macro runs) a lifebloom.” The game will not cast the spell if the shift key is not held down. What this means is that you can then add a second spell to the macro: a second spell that will be cast if the first spell is not cast. Different spells and actions are separated by a semicolon ;

/cast [mod:shift] Lifebloom; Regrowth

The game reads this macro as “cast (if shift is held) Lifebloom, else cast Regrowth.” You can add more spells and abilities by adding additional requirements for each spell to cast.



Combat Requirements

[combat] and [nocombat] are modifiers that tell the game to only use the following ability if you are in or out of combat, as applicable.

/cast [nocombat] Flight Form; [combat] Travel Form

The above macro will check first to see if you are out of combat, and if so, it will use Flight Form. If you are in combat, it will skip the first spell and use Travel Form (cheetah).

Now, since the combat requirement is a simple yes/no check (are we in combat, or aren't we?), if we know that the first action of [nocombat] is false, then the only other option is that you are in [combat] instead. Thus, we don’t necessarily have to write [combat] on the second spell, because if the game has passed by the first spell because the [nocombat] requirement was not met, then the only other option is that you are in combat. So,

/cast [nocombat] Flight Form; Travel Form

This macro will do the exact same thing as the previous macro. It doesn't really make a difference if you include [combat] with the second spell in this macro or not.



Target Directions

Targets can be chosen by use of the [target=x] parameter, where “x” may be any of the following: player, pet, pettarget, focus, focustarget, target, targettarget, party# (1-5), party#target, partypet#, partypet#target, raid# (1-40), raid#target, raidpet#, raidpet#target, mouseover, mouseovertarget, and none. These are not requirements for the spell to cast, but rather are directions for the game on how you want it to cast the following spell.

[target=none] will place the spell on your cursor, where you can then cast it on the next person you click.

Mouseover is particularly useful for being able to choose whatever target your mouse cursor is currently hovering over, be it a person or mob on the screen, or a unit frame or health bar.

/cast [target=mouseover] Lifebloom

The above macro will attempt to cast lifebloom on whoever you are currently hovering your mouse over. In order to use such a macro, you will need to keybind it to a keypress on your keyboard, since clicking it on your action bar means your mouse is hovering over the macro and not a person.

If a target direction is not included, then the game will cast the spell using the default targeting procedures.



Multiple Requirements

Multiple requirements are separated by commas , and are all within the same brackets together; they must all be met in order for the game to cast the spell.

/cast [nocombat,mod:shift] Flight Form

This macro will cast flight form only if you are out of combat, AND you are pressing shift when you fire off the macro. You can use this to toggle between different actions that you may wish to use, like follows:

/cast [nocombat,mod:shift] Flight Form; [nocombat] Mount Name; Travel Form

If you are out of combat and pressing shift, then cast flight form; else if you are out of combat, use a mount; else cast travel form (cheetah).

You can combine requirements and directions in the same pair of brackets in order to specify how you want a spell to be cast if the requirements are met. There can only be one target= direction per bracket pair, however. The order of requirements and directions within the brackets does not matter, since all "requirements" in the brackets must be met in order for the spell to be cast with the given direction. For example,

/cast [combat,target=mouseover,exists,dead] Rebirth; [dead,nocombat,exists,target=target] Revive



Other Requirements
  • Combat, nocombat
  • Stealth, nostealth
  • Flyable, noflyable
  • Flying, noflying
  • Swimming, noswimming
  • Exists, noexists
  • Dead, nodead
  • Mounted, nomounted
  • Help, nohelp
  • Harm, noharm (simple opposite of the above, same idea)
  • Modifier:x or Mod:x (where x is shift, alt, or ctrl)
  • Modifier, Nomodifier or Mod, Nomod (Any modifier is held, or none at all)
  • Stance:x or Form:X (where x is the number of your stance, 1-6. The number usually corresponds to the order in which you learned the stances. Bear form, for example, is stance:1)
  • Stance, Nostance or Form, noform (any stance, or not in any stance. Nostance is typically viewed as caster form)
  • Button:x or btn:x (where x is the mouse button number that was used to click the spell. Typically, left-click is 1, right-click is 2, and the scroll-wheel is button:3)
  • Spec:x, nospec:x (where x = 1 for your primary spec, and 2 is your 2nd spec)
  • Equipped:x or Worn:x (where x is an item name or item ID)
  • Actionbar:x or Bar:x (where x is the number of the action bar that the macro is on)


Multiple Parameters

You can also create different sets of requirements for the same spell by adding additional [bracketed requirement lists], like follows:

/cast [target=mouseover,exists,help] [target=target,exists,help] [target=player] Lifebloom

This macro will first attempt to cast lifebloom on the target you are currently mousing over, if they exist and they are friendly. Else, it will cast it on your current target, if you have a target and they are friendly. Otherwise, it will cast lifebloom on yourself. This is the same idea as if you had written the macro as

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

...it’s just much shorter, which can be important since macros have a 255 character limit.


The important things to keep in mind are:
  • The order you put the spells in; the game will use the first spell it comes across in the macro that it is allowed to cast based on the requirements you gave.
  • The game cannot cast multiple spells at the same time if each sets off a global cooldown (GCD). There are a few spells which do not set off a GCD, so these CAN be tied to cast at the same time as another spell.
Some druid spells that do not set off GCDs include Maul, Nature's Swiftness, and Tiger's Fury; click-use items also do not set off the GCD, and can include potions and trinkets.

/cast Nature's Swiftness
/use Trinketname
/cast [target=mouseover,exists,help][target=target,exists,help][target=player] Healing Touch



Other Slash Commands

The /cast is a slash command for casting. Additional /commands exist that can include their own requirements or do unique things. Many you will find familiar from using them in your chat box.
  • #showtooltip (adds the tooltip of the spell the macro will cast under the current conditions. Specific Spellnames can be given)
  • #show Spellname (shows the icon for the given spell. If no spell is given, it shows the first available spell in the macro. Useful for monitoring cooldowns.)
  • /castsequence reset=n Spellname1,Spellname2,Spellname3 (after casting the first spell, the next time you press the macro it will cast the next spell in the sequence. It will reset to the first spell after n seconds. Replace n with the number of seconds. Alternatively, you can tell it to reset on combat)
  • /use Itemname
  • /use # (uses item equipped in the numbered slot on your person)
  • /use 13 (uses top trinket)
  • /use 14 (bottom trinket)
  • /use 16 (weapon click-use)
  • /use # # (uses item located in bag #, slot #)
  • /use 0 1 (uses the toprightmost item located in your backpack)
  • /equip Itemname
  • /equipslot # Itemname (specifies slot when equipping the item)
  • /s (talk in the say channel)
  • /p (party)
  • /ra (raid)
  • /rw (raid warning)
  • /target [requirements] or /tar
  • /targetlasttarget
  • /targetenemy
  • /targetfriend
  • /assist or /a
  • /follow
  • /focus
  • /clearfocus
  • /cancelform (takes you out of stance to your default caster form)
  • /cancelaura BuffName (cancels a buff from your buffbar)
  • /stopcasting (will stop whatever is currently casting)
  • /stopmacro [requirements] (ignores the rest of the macro if requirements are met)
  • /script or /run (a special command that is far more advanced, using different rules for its requirements)
As a note for social macros, the variable %T can be typed in and when spoken, it will be replaced by the name of your current target. %F can be used for your focus target, and %P for your pet.

A very complex macro can look like this:

/clearfocus [mod:shift]
/focus [mod:shift] target
/stopmacro [mod:shift]
/assist [target=focus]
/startattack [nostealth]
/cast [form:3,nostealth] Mangle - Cat; [stealth] Pounce; [noform:1] Wrath

The above macro does the following:
  • Clear the current focus target if shift is held.
  • Then focus on the current target if shift is held.
  • Then stop the macro if shift is held and read nothing else below this line; do not stop if shift is not being pressed.
  • Then assist the focus.
  • Then enable auto-attack if not in stealth.
  • Then cast Mangle – Cat if in form:3 (catform) and not in stealth; else cast Pounce if in stealth; else cast wrath if not in bear form.
All of that in one icon. I love it. I use it as my dps assisting macro.

Other macros I use will be added in another post at a later date.

4 comments:

Anonymous said...

Hey there!I have a question regarding Your mouseover-healing macro. I switched all of my healing-spells to it, but I´m not able to put in the natures swiftness + Healspell-combo. The following macro doesnt work: /cast [target=mouseover,exists,help] [target=target,help] [target=player] SPELL1, SPELL2

Is it possible to put two spells into the mouseover-macro?

Kae said...

You can only put two spells into a mouseover macro if you tell the first spell to only activate on a specific modifier, such as pushing CTRL, Shift, or Alt, or if the first spell is one of the very few spells that doesn't activate the global cooldown.

In your /cast [target=mouseover,exists,help] [target=target,help] [target=player] SPELL1, SPELL2 macro, the game is simply reading to cast Spell1 on the various targets if they're available, in that order. It will ignore any spell that comes after it in the macro.

Nature's Swiftness is one of the few spells that will not set off the GCD, so the way to tie it into the macro would be with:

/cast Nature's Swiftness
/cast [target=mouseover,exists,help] [target=target,help] [target=player] Healing Touch

My own slightly-tweaked version of this NS+HT macro can be found here: http://dreambound-druid.blogspot.com/2009/03/resto-macros.html#2

Hope this helps :)

Anonymous said...

That did it, thanks a lot!

Macro Wow said...

You may find this helpful. I've compiled more up to date druid macros here: http://macro-wow.com/for/druid/

and I have a more recent druid macro guide here: http://macro-wow.com/guide/druid-macro-guide/

Keep on rocking druids!