Macros

Macros

This is a companion to Episode 10.  You can listen to the show here.

 

What is a macro?

In short, a macro is a set of commands, or script, for World of Warcraft.  Any sequence of things that needs to be done the same way each time is a great candidate for a macro.  It’s also a good way to do things without having to think about them, like on-use trinkets or DPS potions.

 

How do I create one?

The macro menu can be access from the game menu by clicking on “Macros” or by typing /macro at the command line.  It will open this box.

Macro Menu

 

A new macro can be created by clicking the “New” button at the bottom.  It will show this box.

Macro Menu New Open

 

Enter a macro name (ex: “IV” or “Icy Veins”) and pick ? as the icon.  Click “Okay”.  This will go back to the main edit window and live you in the “Enter Macro Commands:” box.

 

What goes in the box?

Anything that can be done from the command line (“/” commands), like /say, /use and /cast can be used.  The purpose is to make it easy to do something that would take multiple actions, like drinking a potion and casting a spell.  To do that, the macro would look like this:

/use Potion of the Jade Serpent

/cast Icy Veins

After a macro is saved using the “Save” button, the icon in the upper box can be placed on an action bar just like a normal spell.  For all purposes, a macro can replace a standard spell button.

If you saved the macro above and tried to use it, two annoying things would become apparent.  First, the icon would look like the potion icon, not the spell’s.  Since casting the spell is the primary function of the macro, it makes more sense for it to look like Icy Veins.  Second, the tooltip would not show the Blizzard spell information.  It would just display a box with the name of the macro.  This can be fixed by adding a showtooltip line to the macro.

#showtooltip Icy Veins

/use Potion of the Jade Serpent

/cast Icy Veins

Let’s say that it would be helpful to add trinkets to this macro, since we’re blowing all of our cooldowns here.  The command is “/use” and then the equipment slot that is to be used.  For trinket one and two, it looks like this.

#showtooltip Icy Veins

/use 13

/use 14

/use Potion of the Jade Serpent

/cast Icy Veins

You can see how this can be really powerful when spells get chained together.  My version of this that I use looks like the “Frost Mage DPS example” below.

 

What if I don’t want something to happen every time I push the button?

This is the most advanced topic that I covered in the show.  The basic syntax is pretty easy.  Modifiers can be placed on any “/use” or “/cast” command by using “[]” with the command between the braces.  Some common modifiers are:

  • [target=mouseover], [target=pet], etc – controls the target of the spell in the line with the modifier.
  • [group:raid] – only do the action in a raid group.  This is useful if you don’t want to waste potions while questing or in dungeons.
  • [modifier:shift], [modifier:alt], etc – changes behavior if you hold down the specified key.
  • [nochanneling:spellname] – This prevents a channeled spell from being restarted while it is being cast.
  • [harm] – only do the action if you can hurt your target.

 

The final product look like “/cast [harm] Frostbolt” in the macro.  This would only cast Frostbolt when I can harm my target, solving the water elemental problem I mentioned in the show.  The a secondary problem created by this is that it will prevent me from ever healing my pet, since I don’t provide any way to bypass the “harm” modifier.  My version of this in game looks like this.

#showtooltip frostbolt
/cast [harm] Frostbolt, [modifier:shift, target=pet] Frostbolt

You can chain together two instance with a comma and have them happen differently based on modifiers.  In this case, it casts Frostbolt when I can hurt my target.  However, if I hold down shift and press the same button, it will cast Frostbolt on my pet to heal it.  This provides the best of both worlds.  Not only does it prevent accidents, it lets me control when my pet gets healed.

What are some example macros?

Basic targeting macro

/focus [modifier:shift]
/target focustarget

At the beginning of a dungeon or raid, I use this to set my focus to the tank.  This is accomplished by clicking on the tank to target, then holding down shift and clicking this macro.  Using the macro without the shift key just runs the second line, which sets my target to the target of my focus (the tank).

Frost Mage DPS example

#showtooltip Icy Veins
/script UIErrorsFrame:Hide()
/use 13
/use 14
/use [group:raid]Potion of the Jade Serpent
/cast icy veins
/cast mirror image
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()

#showtooltip will make the action bar icon work like the regular Icy Veins button.  The script line keep the game from saying things like “This action can not be completed”.  The “/use 13” and “/use 14” lines triggers on-use trinkets.  I only use Potion of the Jade Serpent in raid, which is done with the modifier [group:raid].  The rest of the script is casting spells that I need to chain.

Frost Mage Water Elemental heal prevention

#showtooltip frostbolt
/cast [harm] Frostbolt, [modifier:shift, target=pet] Frostbolt

This macro prevents Frostbolt from being cast on my water elemental unless I hold down shift.

 

1 comment

Leave a Reply