How to Macro, by Vattel

Perhaps you've written a guide on a class or profession you want to share. Maybe you're an expert on mods and addons and want to share a guide you've made. If so, here's the place to do it!

Topic/Postby Darral » 06 Dec 2010, 19:25

How to Macro, by Vattel

How to Macro
A Guide by Vattel.

Greetings RnPers. I thought I'd take the time to sit down and impart some of the macro knowledge I have gathered over the years. I hope you enjoy this guide and find it useful. If you have a question concerning this guide feel free to ask me in /O or /W.

Enjoy!

What is a macro?
A macro is a simple script that is often used for convenience or to automate certain common actions. A few simple macros can make your life a lot easier by either shortening your reaction time or by executing several spells that are usually combined (e.g. popping Icy Veins/Adrenaline Rush/A trinket etc. before using a particularly nasty spell). Macros are also very useful for cleaning up your action bars as they allow you to combine skills.

Macros cannot make decisions for you. For example: it is impossible to make a macro that casts a heal based on your targets health. However, it is entirely possible to make a macro that heals a selected ally, but nukes a selected foe.

Every macro is limited to 255 characters and there is no reliable way to go over this limit.

Making a macro
If you are familiar with the macro interface you can skip this part

First open the macro window by typing /m or by using the Macros button in the main menu. The macro window holds two tabs: ‘General’ and ‘Character’ macros. General macros are intended for all your characters, so if a macro is not character related it should go in general.

Both tabs in the macro interface are divided into two parts. The upper part is where you select macros to edit and the bottom part is a simple text editor where you enter the commands you want your macro to execute.
When editing a macro you can use hotkeys to select, copy, paste, cut and undo! These are: Shift+Home/End/Arrow Keys, CTRL-V, CTRL-C, CTRL-X and CTRL-Z.

To make a macro you click on the ‘New’ button in the lower right corner of the macro interface. A new window should pop up asking you to type in a name and to select an icon. Enter "Test" as a macro name and leave the question mark selected.

Personally, I prefer picking the question mark icon (should be selected by default for any new macro). This icon will change depending on the ability your macro will activate.

Click OK /Accept to create your new macro named Test, this will close the New macro window. Let's make your macro actually do something.

Click in the Edit window and type in the following command:

/s I made a macro!

Now, drag your macro's icon to an empty slot on your action bar. If you click on the macro button on your action bar your character will say: "I made a macro!". If you press the corresponding hotkey, your character will say exactly the same.

Essentially, that's all there is to making a macro: making a button for you action bars that you have ‘programmed’ to behave in a certain way. The example used above is not cool, but no fear! We are getting to the awesome part right now.

Some simple, but useful, macros
You don't need to be a programmer to make a macro. Some of the simplest macros are a staple of many macro users. The macros below are my Sanity macros. Without them I would lose my mind!
Here is a simple but extremely effective macro for melee players.

#showtooltip
/startattack
/cast SpellName

I use this type of macro for all my melee characters and for every attack. Why? How often have you ran up to a target, pressed an ability, and seen your character standing there doing… nothing? Your eyes shoot down to your bars to see that the spell you selected requires more energy/rage/focus/mana than you currently have, or is on CD. In the mean time the mob is still smashing face and your HP is slowly, but surely, going down. You can solve this with a quick right click on the mob, but the /startattack macro is a much more elegant solution to this (possible) problem. Regardless of whether you have enough energy/rage/focus/mana for a particular ability, you will attack the currently selected target.
I know I have been in this situation more often than I care to admit. This macro will solve it by:

a) Attacking your target. If you don't have one it will pick one for you ala Tab targeting.
b) Use your SpellName on your current target, if it's off cooldown and you have the resources to use it.

I cannot stress enough just how bloody useful this macro is. All too often a mob dies within seconds in a 5 man and manually retargeting simply takes too long (mob is down to 50% before you can even click it). Making a startattack-macro, like the one above, for all your important melee abilities and smashing it during combat, will ensure you are using your CDs and your DPS/Threat will go up.

What about casters? Same deal but different.

/stopcasting
/cast SpellOfChoice

Is a feared player running toward a group that will not like this unannounced visit? Need to Ice Block in the middle of a pyro? This macro will take care of it by aborting your current cast and casting your SpellOfChoice. No need to press Esc or Jump or move (flame wreath like mechanics make this a bad idea anyway).

Good choices for this type of macro are: Counterspell like abilities, dispell abilities, oh sh!t abilities, Stuff that's NOT on the GCD, etc. Basically: any spell you want to happen as soon as you press or click is a candidate for this type of macro. Healers need to watch out with the /stopcasting command in their healing macros, because pressing the /stopcasting macro twice in rapid succession makes your character start casting, cancel before the spell is done and initiate the GCD. Do you see what is missing here? That’s right, no heal landed on your target! All you did was start casting and initiated the GCD, thereby wasting precious seconds in which you could have saved someone. The /stopcasting command does not interfere with the new spell queue system.

A small addition for tanks. Have you ever had a paladin healer whose mother and father shared the same name before they had to marry? Then you know how awful it is to get a Hand of Protection cast on you when you're tanking. Worry not! The solution is called: /cancelAura

For example, for a warrior tank:

/startattack
/cancelAura Hand of Protection
/cast Heroic Strike

This macro will pick a target if you have none, remove Hand of Protection if it's on you, and smash your target with Heroic Strike. This macro saves lives because when you're in the middle of a pull you will not calmly right click on Hand of Protection you will most likely be shouting "OMGOMGOMG YOU MORON".

Here are two other useful macros.

#showtooltip
/use 13

AND

#showtooltip
/use 14

These two macros will allow you to use your currently equipped trinkets and their icons will update accordingly if you switch them. With these macros you'll never accidently leave an old trinket icon on your toolbar and attempt to equip it mid-combat.

Cool stuff you can do with macros
Now that we've covered some basic examples, let us examine the syntax of /cast a little more. Here is a little more complex cast command:

/cast [conditions to be met][or these conditions] Spell1; [conditions to be met] Spell2; [conditions to be met] Spell3;etc

The first condition to trigger a spell will end the /cast command. As you can see you only need to type /cast once. Conditions and the spells they trigger are separated by a ";". You can actually write the macro like this:

/cast [conditions to be met][or these conditions] Spell1
/cast [conditions to be met] Spell2
/cast [conditions to be met] Spell3

This macro works exactly the same as the previous example but is a little easier on the eyes. Why didn't I use this then? /cast is five characters where ";" is only one. You save four characters per spell which is a good habit when you only have 255 characters to spend.

There are many conditions you can use. I highly recommend a visit to http://www.wowpedia.org to see them all. Here are few conditions I use quite often:
?
#showtooltip : Not a condition, but too useful not to mention. Put this at the top of your macro and if you hover over the macro's icon the actual Blizzard tooltip will show. If you do not include #showtooltip the tooltip will just tell you the name of the macro.

@mouseover : temporary targets the target your are mousing over
help : checks if the target is friendly
harm : checks if the target is hostile
spec:X: checks what spec you are in. Replace X with 1 for your primary spec, 2 for your secondary spec.
dead : checks if your target is dead
exists : checks if you are actually mousing over something (harm, help, include this)
mod:X : checks if you are holding down the X key. Replace X with CTRL, ALT or SHIFT
combat : checks if you are in combat.
no* : Replace * with, for example, dead to create the NODEAD condition. Dead means dead and nodead means alive. Nearly every condition can be changed into its opposite meaning in this way. A noticeable exception is help and harm, to my knowledge nohelp does not work.

Here's one I use both in Holy and Shadow.
#showtooltip
/startattack
/cast [help, dead,nocombat] Resurrection; [spec:1] Smite; [spec:2] Mind Flay

This is what this macro does:
1) It picks a target if I have none.
2) If my target is friendly, dead and we're not in combat I'll resurrect them.
3) Otherwise cast Smite in my primary spec or mind flay in my secondary spec.

This macro is a good example of using conditions that cannot be true at the same time and making a multifunction macro.

Here's what I like to call a help/harm macro. Basically, you combine an offensive and defensive ability on a single button. Your target decides which spell is cast. For example:

#showtooltip
/cast [harm,nodead] Counterspell; [help,nodead] Decurse; Decurse

This macro will counterspell an enemy but decurse a friendly, the default is decurse if no target is selected.

#showtooltip
/cast [harm,nodead] Smite; [help,nodead] Heal; Heal

As before, we nuke an enemy but we Heal a friendly, the default is Heal.

With a little bit of creativity you can save yourself quite a bit of actionbar space and keybinds by cleverly combining abilities that cannot be cast on the same type of target. This means that abilities like Penance and Dispel magic cannot be used in such a macro.

Mouseover
One of the coolest things you can do with macros is using your mouse cursor to aim a spell. This will work by hovering over a player or NPC and by hovering over any unit frame.

There is only one 'downside' to mouseover macro's:

You cannot use a mouseover macro without using a hotkey

Well technically you can, but there isn't much point in doing so. When you click on a mouseover macro you are mousing over your actionbar and as far as I am aware my actionbars do not require healing. A basic mouse over macro looks like this:

/cast [@mouseover] Spell; Spell

This macro will cast Spell on any character (including NPCs) when you mouse over it (@mouseover). If your mouse cursor is pointing at an empty space on your screen it will cast Spell as if you'd clicked the ability. It will fail if the Spell cannot be cast on the character you are mousing over.

Here's a little more advanced macro:

/cast [@mouseover, help, nodead] Renew; [@mouseover, harm, nodead] Shadow Word: Pain; Renew

As you can see a few more options have appeared between the square brackets. Let’s go over these:
[@mouseover,help,nodead] means that if I am hovering over something (@mouseover) and it is friendly to me (help) and is still alive (nodead) I will cast Renew.

If any of these conditions fail (your target is dead or unfriendly or you're mousing over a mailbox) Renew will not be cast by this part of the macro. This is when the second part of the macro comes into play. Let’s examine it.

[@mousover,harm,nodead] means that if I am hovering over something and it is unfriendly to me and alive then cast Shadow Word: Pain. If any of these conditions fail, the macro jumps to the next part. In this case this is a simple cast of Renew.

Personally I really, really love using mouseover macros to heal. In fact (nearly) all my aiding spells are usable as mouseover macros and they're really simple, not to mention fast.

Normally you would:

1) Mouse to whomever needs healing
2) Click to select
3) Mouse back to your healing spell
4) Click to cast
5) Repeat

Step 3 can be omitted if you already hotkey
With mouseover macros you would:

1) Mouse to whomever needs healing
2) Heal

Just knocking out a few steps will make you respond a little quicker and in my personal experience there's never a problem with being faster in World of Warcraft. Mouseover macros will not make you a better healer if you're a bad one now. They do provide breathing room for a skilled healer because they make healing a little bit more intuitive.

Healing is not the only role that benefits from mouseover macros. Mouseover taunting or death gripping are very good candidates as well. So are crowd control spells, silence effects, etc.

Focus
When you select a target you can use the /focus command to set it as your current Focus Target. Your focus target is separated from your normal, or rather, current target. Think of it as a target clipboard.

You can use the @focus condition to force a macro to use your focus target as its target. For example:

/cast [@focus] Polymorph

This macro will Polymorph your focus target but not your actual target! Keeping this in mind we can use two macros to make our CC life a bit easier.

Macro1:
#showtooltip
/focus [mod:shift]
/cast Polymorph

Macro2:
#showtooltip
/cast [@focus, exists] Polymorph; Polymorph

The first macro will always polymorph your current target and it will also focus it when you hold down shift. The second macro will polymorph your focus target if it exists otherwise it will polymorph your current target.

Final words
Well that’s it for the guide I hope you found it useful. Macroing is a bit of a minigame sometimes but can be quite rewarding when your creativity is employed to better your gaming experience.

If you have any questions feel free to reply to this post or ask me when I’m online.

Regards,
Vattel
?
User avatar
Darral
Rhymer
 
Posts: 10

Topic/Postby Serendipity » 06 Dec 2010, 19:58

This looks like a very good guide to me. Thanks!
User avatar
Serendipity
Blorgh.
 
Posts: 6472
Location: At work, usually.

Topic/Postby Lintissa » 06 Dec 2010, 21:52

Here is a mouseover macro I use:

#showtooltip
/cast [target=mouseover,help] Healing Wave; [help] Healing Wave; Healing Wave


What it does:

1. If I am mousing over a friendly player (HUD mouseover) or their character portrait they get a healing wave.

2. If I am not doing the above and my target is friendly (I assume I am targeting the tank at all times) then my target gets a healing wave.

3. If my target is unfriendly, I must be solo questing, so I heal myself.
alis grave nil
User avatar
Lintissa
Holy Smiter
 
Posts: 1181
Location: Manchester, UK

Topic/Postby Aedammair » 06 Dec 2010, 22:55

I've said it before, and in case you missed it: I love my modifier macros. I have a Roccat Kone mouse, and have the two buttons near my thumb bound as alt and ctrl. This is what my standard macro looks like:

#showtooltip
/startattack
/cast [nomodifier] Spell
/cast [mod:alt] Spell
/cast [mod:ctrl] Spell
/cast [mod:shift] Spell

Which gives me 4 binds per key. I love focus macros and am trying to get used to mouseover macros.
User avatar
Aedammair
Rhymer
 
Posts: 77
Location: In a House

Topic/Postby Lintissa » 13 Jan 2011, 00:50

I like modifier macros too, here is the format I often use.

#showtooltip
/cast [modifier:shift] spell to use with the shift key down; spell to use normally

This can be used to save space on the action bar when you just have too many paladin blessings to cast (no longer an issue in Cata). Here the shift key allows me to switch between the normal and greater version of the blessing.

#showtooltip
/cast [modifier:shift] Blessing of Kings; Greater blessing of Kings

Or maybe as a rogue you alternate between two finishing moves.

#showtooltip
/cast [modifier:shift] Eviscerate; Slice and Dice
alis grave nil
User avatar
Lintissa
Holy Smiter
 
Posts: 1181
Location: Manchester, UK

Topic/Postby Lintissa » 13 Jan 2011, 00:53

This is a simple macro, used when farming crafting materials. All it does is put a counter on your action bar letting you know you have gathered your target amount of materials.

#showtooltip Elementium Ore
alis grave nil
User avatar
Lintissa
Holy Smiter
 
Posts: 1181
Location: Manchester, UK

Topic/Postby Erethas » 13 Jan 2011, 09:07

Can't you just drag the item to the toolbar? Does it have to be usable?
You are now breathing manually.
Erethas
Rhymer
 
Posts: 1735

Topic/Postby Shevron » 13 Jan 2011, 09:25

You can't put non usable items, such as ores, in the toolbar.
"Whomsoever takes up this blade shall wield power eternal. Just as the blade rends flesh, so must power scar the spirit."
User avatar
Shevron
Resident Grump
 
Posts: 8709
Location: A cave in Northrend

Topic/Postby Erethas » 13 Jan 2011, 10:05

I see.
You are now breathing manually.
Erethas
Rhymer
 
Posts: 1735

Topic/Postby Darral » 20 Jan 2011, 13:38

Another trick is using the btn:x modifier. For example:

/use [btn:1] Mana Gem
/cast [btn:2] Conjure Mana Gem

This macro will use your mana gem when you click on it or press the hotkey but when you right click on it it will conjure the gem.
User avatar
Darral
Rhymer
 
Posts: 10

Next

Return to Guides.



Who is online

Users browsing this forum: No registered users