Making Macros - General Information

Making Macros - General Information

Hello all.

I'm writing this guide to help you in creating those useful things that macros are.
Some of you could even have no idea of what macros are, so we'll start from the beginning.

Open your menu panel(press esc).
Now open macro panel(notice that we have general and character's specific macros, in two different tabs).

Press new.
Now choose a icon you like.
Press ok.
If we choose the question mark(the first icon)the button we'r gonna create will show us which spell will be casted when we press it, but we'll see this later.

Let's start with something classic:

1) Hello WorldOfWarcraft!
We'll learn how to yell that short sentence.
Write in the box at the bottom of the panel the following instruction:

/y Hello WorldOfWarcraft!

Now drag the icon of the macro into one of your bars.
Click on it...and that's all.

We could also make a macro to make our character make any emoticon; just create a new macro and type:
or similars.
If we typed this:
in the same macro, our char would yawn and lay down at tha same time.

For spells and ablities it's very similar: we have to add the command /cast.

2) Cast a spell or ability
Create a new macro and choose the question mark as icon.
I suggest to choose that, usually, so we'll be always able to see the cooldown of the spells that we link to this macro.
Write in the body this instruction:

Now open the spells and abilities panel and shift click the spell you wanna link to the macro.
We'll see the spell's name appear near the instruction /cast, complete of it's rank.
Drag the icon of the macro into one of your bars.
In this way the macro will be always linked to the spell or ability we have choosen and of the rank we have choosen.
To make the rank grow up as we learn higher ones from the trainer, simply remove the rank of the spell from the macro.

Now we'll see something more interesting, don't worry.
You'll be probably thinking that I didn't talk about yawning and sleeping at the same time only because I like roleplaing, and you are right.
Unfortunatly, due to the global cooldown, it's not possible to cast multiple spells at the same time, but there are some little triks that can be found out.

3) More actions at one time
This is very important for classes that have abilities that work "on the next meele attack"(if you have some, you understand of what I'm talking about).
Create a new macro like this:
/cast #ability that works "on the next meele attack"#
/cast #instant attack#

Choose carefully the instant spell, we might want it with a very low cost in mana(rage or energy) or with a particolar effect.
In this way the two abilities will be casted at the same time.

If your class doesn't use such abilities, you can use this kind of macros to allert people that you are going to cast a particular spell or other funny sentences:
/cast #choose spell#
/Gimme time, mon, gimme will be casted

So you'll say this sentence while casting.

4) Castsequencing
We can also link more than one spell to a macro in a different way: using the commad /castsequence
Use this carefully, because we won't be able to use the second or third(and so on) spell, before using the first ones.
Create a macro in the usual way and choose the question mark as icon.
In the body write this:
/castsequence #spell 1#, #spell2#, ..., #spelln#

It is very important that we write exactly, or it won't work.
Now move the icon to one of the bars and start clicking in it, so you'll see how it works.

We can set some conditionals to the macro.
All conditionals are innested between commands and spells, in this way:
/cast [conditional] #spells...#

5) Reset
For example we can make the castsequence restart every time we have a new target
/castsequence [reset=target] #spells...#

(yes also the square brakets)
or every ten seconds
/castsequence [reset=10] #spells...#
(we can change the number of seconds as we like: two minutes are 120 seconds)


a_ /target
If we want to target Snowflake, for example(sorry Snowflake, I couldn't resist, your nick is too beatifull):
/target Snowflake

Then u can add the other part of the macro:
/target Snowflake
/w What a beatifull nick!!!

b_ conditional
Target can also be a conditional.
For example:
/cast [target=Snowflake] #spell#

will cast the spell only if Snowflake is our actual target
[target=heal] will cast if target is friend
[target=combat] will cast if the target is hostile
[target=nocombat] will cast if the target is not hostile(neutral or friend)

c_ target commands
/assist ---> targets our target's target
/cleartarget ---> leaves us without target
/targetenemy, /targetfriend ---> does what it sais
/targetparty, /targetraid ---> targets our party/raid members one after the other.
/targetlasttarget ---> does what it sais

We can always add "target" at the end of the object we are gonna target, to get it's target.
For example:
/target Snowflake ---> will target Snowflake
/target Snowflaketarget ---> will target Snowflake's target

7) Modifiers
It's better to explain with an example:
/cast [modifier:shift] #spell1#; [modifier:ctrl] #spell2#; [modifier:alt] #spell3#; #spell0#
this will cast spell1 if we are pressing shift when clicking on the macro button, #spell2# if we are pressing ctrl, #spell3# if we are pressing alt, #spell0# if we are not pressing any key.

Cool Stances
Stances work exactly as Modifiers:
/cast [stance:1] #spell1#; [stance:2] #spell2#; ...; [stance:n] #spelln#; #spell0#
but insted of button pressed it keeps trak of the stance we are if we are a warrior, the form if we are a druid, and so on.

9) Trinkets and general items
Very easy:
/use #Item-Trinket#
It can be used toghether with oder commands, as usual:
/use #Item-Trinket#
/cast #spell#

10) Equip
Very easy, too:
/equip #Item#
but we need to talk a little about this.
We can change weapon in combat(only the weapon), but there will be the global cooldown, before we can cast anything but spells that work "on the next attack".
So we can choose to equip the best weapon with the best stats for the action we are gonna do.
We can have some problems in this, if the bonus stamina of the weapons is different. In fact, swiching from a weapon with more stamina, to a one with less, means losing health.
Same for intellect and mana.

It's all, for a while.
I'll test the macros I have for myself and I will soon add some here, but you'll better try some for yourself, as no macro is better than another, you only need to find yours.


How to make a macro

First, how is made a macro?

1) Ingame, type "/macro" or "/m" to open up the macro menu. Now you have 2 macro tabs. "General" and "YourCharacterName" macro. You can have up to 36 general macros that are shared between all your characters on the server and up to 18 macros only for your character.
2) Select the appropriate tab and click on "New" button at bottom right of the window.
3) Now you you must enter a name for your macro and choose an icon. You can select a colorful icon that will always show up or the "?" icon that will change depending of the "active" spell.
4) Click on "Okay" button.
5) Select the new macro in the list and click in the text area at bottom of the window. Macros can be up to 255 characters long (but there is a way to bypass this, see /click command).

Now, how does a macro work?

Macros are fairly simple. They are made of 3 parts:

- Command
- Conditions
- Object (Spells/Abilities/Items)

It starst with a "/" followed by a command, then conditions (separated by a ",") in between "[ ]", then the name of the spell. If there is more than one spell you want to cast with the same command, you separate their conditions/spell with a ";".
You can have more than one set of conditions for each spell, so if the first set of conditions are not true, it will check the 2nd set, then third, etc. If none are true, it will then go the next spell (if there is one) and check conditions the same way.
Do not add a ";" at the end of the macro, it would just cause bugs.

Might sound complicated, so here is a pattern and an example:
/command [condition1_1,condition1_2,condition1_3][condition2_1][condition2_2] Spell1; [condition1_1,condition1_2][condition2_1] Spell2
/cast [harm,nodead] Smite; [help,nodead][@player] Renew
(will cast Smite if your target is hostile and alive else will cast Renew if your target is friendly and alive, else will cast it on you)

Note: A macro will always read condition set in order. If the first spell condition is met, it will cast that spell, no matter what conditions are after.
Comon mistake made by people is to break down their conditions.
/cast [mod:shift][@mouseover] Power Word: Shield; [@mouseover] Renew
This is bad because now PW:S and Renew both have same condition (@mouseover), so PW:S will always be cast and Renew will never.
What he wanted to do was
/cast [mod:shift,@mouseover] Power Word: Shield; [@mouseover] Renew
Macro facts:

- Macro can't pause.
- Macro can't check for buff/debuff.
- Macro can't check for rage/energy/mana/focus/runic.
- Macro can't check for cooldowns.
- Macro can't play the game for you.

Toggleable Abilities
You can add a "!" in front of a spell name to prevent it from toggling off.
Example: /cast !Ice Block (will prevent you from turning off Ice Block if it is already active).

Spell Rank
By default a macro will cast the last rank of a spell. But you can add "Spell(Rank X)" to cast rank X of a spell.
Exception: Spell with "()" in their name require you to add "()" after the name.
Example: "Faerie Fire(Feral)()" because "Faerie Fire(Feral)" would confuse the game and it would try to cast "Faerie Fire" of rank "Feral" /duh.

This is using some API functions used by addons as macro. This is more advanced programming and I wont talk about it in this guide. The command is either /run or /script
Example: /run if(ShowingHelm()) then ShowHelm(0) else ShowHelm(1) end
This script will hide your helm if it is displayed, else will make it to show up.