Go Back   Forum Input and Assistance Guides & Tutorials General Guides

Reply

pr13s7z August 12, 2011  
pr13s7z's Avatar
World of Warcraft : Macro's


Blizzard installed exciting new additions to the functionality of macros in WoW, a set of conditional options for /cast, as well as /use, /target, /focus, /assist, /stopmacro, /cancelaura, /userandom, /castrandom, /castsequence,
/click, and the various /pet* slash commands. This post is intended to be a “How-To” guide on using them.

/cast Command

Currently, using ‘/cast’ is very simple. The command format is ‘/cast <spellname>’ (which casts the highest rank of the listed spell), or ‘/cast <spellname>(Rank <#>)’. Some examples:

/cast Greater Heal
/cast Arcane Intellect(Rank 3)

The command format for ‘/cast’ is: ‘/cast [<first set of options>] <first spellname>; [<second set of options>] <second spellname> ; [<third set of options>] <third spellname>; …

The way it works: The first set of options is checked. If they are true, then the first spell is cast. If they are false, the next set of options is evaluated, and if true, the next spell is cast, and so on. However, you must keep in mind that only one spell will be cast. As soon as a set of options evaluates to true, the game will cast the corresponding spell, and that line of the macro will be done.

The current options available to players are:

help – Evaluates ‘true’ if target is friendly

harm – Evaluates ‘true’ if target is hostile

combat – Evaluates ‘true’ if you are in combat.

stance or stance:# – Evaluates ‘true’ if you are in a stance, or are in a particular stance (see
below)

stealth – Evaluates ‘true’ if you are stealthed.

modifier or modifier:shift|ctrl|alt – Evaluates ‘true’ if the selected key is held down when the
command is executed.

equipped: – Evaluates ‘true’ if item is equipped. Item can be any valid inventory slot, item class or item subclass.

target= – Special option. It changes the target from the default of “target” to any valid unitid. (see below)

actionbar: – Evaluates ‘true’ if the current actionbar is the same as the listed one.

pet: – Evaluates ‘true’ if the pet exists. Takes pet type (Owl, Bear, Imp) or pet name (Fluffy, MrBigglesworth). With no modifier (i.e. just [pet]) it evaluates ‘true’ if ANY pet exists.

mounted, swimming, flying – Evaluates ‘true’ if you are mounted, swimming, or flying, respectively.

indoors, outdoors – Evaluates ‘true’ if you are indoors or outdoors, respectively.

button:< #> – Evaluates ‘true’ if the selected button was used to ‘click’ the spell, defaults to 1 (see below).

channeling: – Evaluates true if you are channeling the spell listed. With no spell listed, it evaluates true if any spell is being channeled.

exists and dead – Evaluates true if your target is dead, or actually exists.

party – evaluates true if the target is a member of your party

raid – evaluates true if the target is a member of your party or raid

group – evaluates true if you are in a group

group:party/raid – evaluates true if you are in the specified type of group

Cast Examples

Here are some examples to help:

/cast Greater Heal
Very simple macro which casts Greater Heal on your target.

/cast [help] Greater Heal
One option added. Will cast Greater Heal IF the target is friendly.

/cast [help] Greater Heal; Smite
Second spell added. Since it has no option added to it, it will be cast any time the first option fails.

/cast [help, combat] Flash Heal; [help, nocombat] Greater Heal; Smite
This macro will cast Flash Heal on a friendly target if you (not the target) are in combat. If you are not in combat and the target is friendly, it will cast Greater Heal. If neither of these is true (i.e. the target is not friendly) it will cast Smite.

/cast [help] Greater Heal; [harm, combat] Smite; [harm, nocombat] Mind Flay
This will cast Greater Heal on a friendly target, or Smite if the player is in combat, or Mind Flay if the player is not in combat.

/cast [stealth] Ambush; Backstab
This will cast Ambush if the player is stealthed, Backstab if not.

/cast [nostealth] Backstab; Ambush
Does the exact same thing as above, just in a different way.

/cast [actionbar:1] Greater Heal; [actionbar:2] Smite
Will cast Greater Heal if the current actionbar is #1, Smite if it is #2, nothing if actionbars 3+ are selected

/cast [harm] Polymorph
/stopmacro [noharm]
/p Sheeping %t! DO NOT TOUCH!
This macro will cast Polymorph if the target is hostile, then stop the macro if the target is NOT hostile (i.e. if the polymorph didn’t go off). Then it tells the party that it’s target has been Sheeped. Note that because of the ‘/stopmacro’ command, if the target was not sheeped, the party would not be sent a tell (thus cutting down on unneccessary spam).

/cast [nopet] Call Pet; Revive Pet
This macro will call your pet if you do not have one, otherwise it attempts to cast Revive Pet.

/cast [pet:owl] Dive; [pet:cat] Dash; [pet] Growl
This macro will cast Dive if you have an owl, Dash if you have a cat, or Growl if you have anything else.

/cast [pet:Voidwalker] Sacrifice; [pet:succubus] Seduction
Will cast Sacrifice if you have a Voidwalker out, Seduction if you have a Succubus.

/use [nomounted,outdoors] Black War Steed Bridle
This will attempt to mount if you are outside and not mounted.

/cast [target=pet,dead] Revive Pet; [nopet] Call Pet; Mend Pet
This will revive your pet if it’s dead, call your pet if you don’t have him out, or mend your pet.

/cast [group:party] Arcane Brilliance; Arcane Intellect
Will cast AB if you’re in a group, or AI if you’re not.

/cast [raid] Blessing of Wisdom
Will cast Blessing of Wisdom if your target is in the same raid as you.

Stance Options

Stances work the same way. If no stance number is given, then it evaluates to ‘true’ if the player is in any stance. (Note that for Warriors, you are ALWAYS in some stance). If a number is given, it checks to see if that form is currently active.

Each class has different numbers for it’s stances. Here is a list of stances and their numbers:

Class:/Warrior/Priest/Druid/Rogue

---------------------------------------------------------------

Stance:1/Battle/Shadowform/Bear/Stealth

---------------------------------------------------------------

Stance:2/Defensive/No Stance/Aquatic/No Stance

---------------------------------------------------------------

Stance:3/Berserker/No Stance/Cat/No Stance

---------------------------------------------------------------

Stance:4/No Stance/No Stance/Travel/No Stance

---------------------------------------------------------------

Stance:5/No Stance/No Stance/Moonkin/Tree/No Stance

---------------------------------------------------------------
Paladin Auras are no longer treated as Stances by the Macro Option system.

Keep in mind that if you skip a stance (like a Warrior who never does the Defensive Stance quest) then your stance numbers will drop down, i.e. Berserker Stance would be stance 2.

Stance Examples

/cast [nostance] Bear Form
If you are not in a form, this will shift you into bear form.

/cast [stance:1] Overpower; [stance:2] Sunder Armor; [stance:3] Whirlwind
Will cast Overpower in Battle stance, Sunder Armor in Defensive, and Whirlwind in Berserker stance

/cast [stance:1] Growl; [stance:3] Claw
Will cast Growl in Bear form, or Claw in Cat form.

/cast [nostance:3] Cat Form
Will put you into cat form if you are not. If you are currently in Cat form, this will NOT shift you out.

Equipment Option

The [equipped] option also works the same way, but it’s a bit trickier. The argument can be either an Inventory Slot (see below), an item type, or an item subtype. For a list of item types and subtypes, check here.

A List of Inventory Slots:

Two-Hand/Ranged
Bag/Chest
Shirt/Off Hand
Chest/Shoulder
Back/Tabard
Feet/Thrown (ranged slot items like thrown daggers)
Finger/Trinket
Hands/Waist
Head/One-Hand
Held In Off-hand/Main Hand
Legs/Off Hand
Neck/Wrist

Equipment Examples

/cast [equipped:Two-Handed Swords] Mortal Strike; Heroic Strike
This will cast Mortal Strike if you are using a 2hand sword.

/cast [equipped:Two-Handed Swords/Two-Handed Maces/Two-Handed Axes/Polearms] Mortal Strike
This uses the ‘/’ modifier to set up an ‘or’ condition. This macro will cast Mortal Strike if ANY of those types are equipped.

/cast [equipped:Shields] Shield Bash
This will cast Shield Bash if you have a shield equipped.

/cast [equipped:Shields, equipped:Daggers] Shield Slam
This will cast Shield slam only if you have a dagger AND a shield equipped.

/cast [noequipped:Shields, equipped:Off Hand] Rampage
This will cast Rampage if you do NOT have a shield equipped, AND you have something in the Off Hand slot. In theory, this macro will only activate if you are dual-wielding.

Button Options

The option [button:] works similarly to the modifier button. Normally, if you left-click a button, it performs whatever action is in that spell, in our case a macro. However, if you set the button option, you can change the behavior of a particular macro.

The default button is 1, the Left Mouse button. Note that when you activate a macro via a keybinding, it treats it like a Left Mouse button click. The numbered buttons are:

1 or LeftButton
2 or RightButton
3 or MiddleButton
4 or Button4
5 or Button5
… or any of the buttons remapped by the secure state headers.

Button Examples

/cast [button:2,target=player] Flash Heal; [help] Flash Heal
This macro would cast Flash Heal on a friendly target, OR if you clicked it with the right mouse button, it would cast Flash Heal on you.

Target Option

The [target=unit] is a special option. Instead of evaluating to ‘true’ or ‘false’, it changes the target of the following spell AND the target of the other options. “Unit” can be any valid unit type, i.e. “player”, “target”, “targettarget”, “party1″, “party1target”, etc etc. For more on unit types, go here

Keep in mind that every spell has a default target of “target”. So, for example:

/cast [help] Greater Heal

is the same as

/cast [target=target, help] Greater Heal

Unless you add in a [target=unit] option, the default will be your current target.

Target Examples

/cast [target=player] Flash Heal
This spell will always cast flash heal on yourself. Note that your current target will be unchanged.

/cast [help] Flash Heal; [target=targettarget] Flash Heal
This will cast Flash heal on your target if it is friendly, OR it will cast Flash Heal on your target’s target.

/cast [help, combat] Flash Heal; [help, nocombat] Greater Heal; [target=targettarget, help, combat] Flash Heal; [target=player] Greater Heal
This will either 1) Cast flash heal if the target is friendly and you are in combat, 2) cast greater heal if the target is friendly and you are NOT in combat, 3) cast Flash Heal on your target’s target if you are in combat and that unit is friendly, or if none of those conditions is true, it will cast Greater Heal on yourself.

If you use the unitid “none” it acts as if you had NO target. For example:

/cast [target=none] Dispel Magic
This would cast Dispel Magic and then ask for a target, regardless of whom you have targetted currently.

/castsequence Command

/castsequence – Casts a predetermines set of spells in sequence (See Below)

show <spell>- Shows macro feedback for the listed spell
showtooltip <spell> – Shows tooltip info for the selected spell
Some additional tricks you can do with the options:

You can add ‘no’ to the beginning of any option (except target) to invert it, i.e. ‘nocombat’ will only work if you are NOT in combat.

Seperating options with a comma ‘,’ will act like an ‘and’ statement; if both options are true, it executes.

Seperating arguments within an option with a slash ‘/’ will act like an ‘or’ statement; if either argument is true, it executes. Note that this works only on the arguments within an option, NOT between the options themselves (So while [stance:1/2] is valid, [combat/help] is not).

Selecting the ‘?’ Icon in the Macro Editor will force the macro to present the icon of the current spell that spell feedback is being given for.

/castsequence Examples

/castsequence allows you to set up a series of spells to cast one after another, on each subsequent click of the macro. The format is:

/castsequence [<options>] reset=<#>/target/combat/alt/shift/ctrl <spell1>, <spell2>, <spell3>

“Huh? Say what?”

It sets up a list of spells, and the first time you click the macro, it casts the first spell on the list. The next time you click it, it will cast the second spell, and so on. When it gets to the end, it goes back to the beginning.

“I’m still not following you.”

Ok, lets say you are a mage. Sometimes you need to Frost Nova and Blink away quickly. You can’t do them both at the same time, so you set up a sequence to do it!

/castsequence Frost Nova, Blink

And there you have it. The first time you click it, you Frost Nova, then you click again and Blink away.

“And what happens if Frost Nova is on cooldown? Does it Blink instead? Or does it just skip over Frost Nova and do Blink on the next click?”

Neither one. If the spell fails to cast (due to cooldown, out of range, not enough mana, whatever) then the sequence does NOT go to the next spell. The next time you click the macro, it’ll try to Frost Nova again. (NOTE: A resist, dodge, parry, etc does NOT count as a failed cast. The spell/ability successfully went off, it just missed.)

“What if I’m not in combat? I don’t want to waste a Frost Nova if I’m not actually fighting.”

You can still use all the same macro options (however, you cannot set options for each individual spell, only for the whole sequence. Sorry.)

/castsequence [combat] Frost Nova, Blink

“Eh, I was just kidding about that combat stuff. Ok, so what happens if I Frost Nova, and decide not to Blink away? The next time I want to Frost Nova, it’ll be stuck on the ‘Blink’ setting?”

Not a problem. We’ll use the new “reset” setting. Since Frost Nova has a cooldown of 24 seconds normally, we’ll set the sequence to reset after 24 seconds of non-use.

/castsequence reset=24 Frost Nova, Blink

The first time you click your macro, it will Frost Nova. If you decide not to Blink, after 24 seconds it will reset back to Frost Nova. Since Frost Nova’s cooldown also happens to be 24 seconds, it’ll be ready to use again. Brilliant!

“So, that reset timer will always reset after 24 seconds no matter what?”

Not quite. It is more of an ‘idle timeout’ feature. If you don’t hit that macro *at all* for the duration of the reset timer, it’ll reset. But if you kept spamming the macro, each keypress would refresh the reset timer, even on failed spellcasts. So you couldn’t do something like /castsequence reset=30 Blast Wave, Arcane Explosion, Arcane Explosion, Arcane Explosion, Arcane Explosion because it would never reset back to Blast Wave unless you left it alone for 30 seconds straight.

“Ok, that’s great and all, but I’m actually a warlock, dude.”

Of course you are. Well, as a warlock, I’m sure you cast the same 3 DoTs over and over again. Now you can set a sequence for those and save button space.

/castsequence Corruption, Immolate, Curse of Agony

There you go, now you can just push that button three times and cast all three DoTs.

“But what if it dies before I finish casting all three? I’m stuck at the end of the sequence again, and I don’t wanna set no timer!”

That’s ok, we can use the other options. If you set ‘reset=target’ then any time you change targets, it will reset the sequence back to the beginning. You can also set ‘reset=combat’, and the game will reset your sequence any time you leave combat. If you use the ‘/’ operator (remember it, from earlier?) you can combine reset options!

/castsequence reset=combat/target Corruption, Immolate, Curse of Agony

There, now any time you change targets (like, if the old target is almost dead and you want to start on a new one), or any time you leave combat (perhaps the critter died before you finished casting all the dots), it resets your sequence for you, leaving you ready to start over.

“What if I want to manually reset my sequence, eh?”

Well, you can add in a modifier to do a reset, like so:

/castsequence reset=combat/target/shift Corruption, Immolate, Curse of Agony

Now, if you hold down the shift key while you hit your macro, it will automatically reset the sequence back to the beginning and cast Corruption.

“Ok, great, I think I got it now! Gimme a sec to set my new macros….. done!”

Excellent, I’m glad I could help.

“So… wanna duel?”

Um, no thanks, I don’t duel warlocks.

“Bah, you wuss.”

Random Example Macros

General Macros:
—————
/use [target=player] Heavy Netherweave Bandage
This macro will always use Heavy Netherweave Bandages on yourself, regardless of target.

Warrior Macros:
—————
Intercept/Charge: It either charges/intercepts, or puts you into the correct stance.
/cast [nocombat,stance:1] Charge; [combat,nostance:3] Berserker Stance; [nocombat,nostance:1] Battle Stance; [combat,stance:3] Intercept

Generic Stance Macro: Replace < * Stance Ability> with whatever you want.
/cast [stance:1] <Battle Stance Ability>; [stance:2] <Defense Stance Ability>; [stance:3] <Berserker Stance Ability>

Overpower: A very simple Overpower macro
/cast [stance:1] Overpower; Battle Stance

Mage Macros
—————
Pyro/Fireball: Casts Pyro if you’re not in combat (as an opener), Fireball otherwise.
/cast [nocombat] Pyroblast; Fireball

Polymorph Focus: Will always polymorph your focus target.
/cast [target=focus] Polymorph

Priest Macros
—————
Greater Heal on current boss target, or on current target.
/cast [target=targettarget, help] Greater Heal; [help] Greater Heal

Hunter Macros
—————
Feed/Mend Pet based on combat status.
/cast [combat] Mend Pet; [nocombat] Feed Pet
/use [nocombat] <food item>

Conclusion

Creating Macros can greatly improve your game-playing efficiency!


Acknowledgments

I, of course, must acknowledge Neuro from Medivh for compiling this excellent post.

Thanks for reminding me to add my Acknowledgments Natox



Edited: August 16, 2011
Molten Member
Natox August 13, 2011  
Natox's Avatar
Approved, however please credit whoever made this guide before you decide to copy and paste it.



Member
Rockie156 August 13, 2011  
Rockie156's Avatar
Nice guide, I guess you didn't make it?

I often use macros but have never understood the syntax for the true statements or how you did
/cast [mod:alt] spell 1; spell 2

but now I get it. I think.

Thanks anyways, I'll be using this guide as a reference for a while.



Member
Ashtonkushr August 14, 2011  
Ashtonkushr's Avatar
nice and thx for posting now i can use my controller with a little more ease



Molten Member
pr13s7z August 16, 2011  
pr13s7z's Avatar
Posted by Rockie156 View Post
Nice guide, I guess you didn't make it?

I often use macros but have never understood the syntax for the true statements or how you did
/cast [mod:alt] spell 1; spell 2

but now I get it. I think.

Thanks anyways, I'll be using this guide as a reference for a while.

/cast [modifier:alt] Spell 1; Spell 2 and umm when you use the skill say it's on action button 1 you would push alt and 1 at the same time...


Posted by Ashtonkushr View Post
nice and thx for posting now i can use my controller with a little more ease
You use a controller to play WoW? That must be hard...


Posted by shortyasd View Post
Its cool but some of them dont work properly
PM the ones that arent working :/ I'll see if I can't figure it out.



Molten Member
ropaisus August 17, 2011  
ropaisus's Avatar
hello, I wanna ask
how to make macro like this

if (SelfBuff(NightFall)) /cast Shadow Bolt;
else
{
if(!UnitBuff("target", Curse of Agony)) /cast Curse of Agony;
else if (!UnitBuff("target", Immolation)) /cast Immolation;
else if (!UnitBuff("target", Corruption)) /cast Corruption;
else /cast Shadow Bolt;
}

i've read the API at WoWwiki, but idk what are the return type, parameter, etc.
pls can you port that algorithm to wowmacro?

i'm so grateful if you can give me complete API documentation .

thx ^^



Edited: August 17, 2011
Premium
ropaisus August 19, 2011  
ropaisus's Avatar
Posted by ropaisus View Post
hello, I wanna ask
how to make macro like this

if (SelfBuff(NightFall)) /cast Shadow Bolt;
else
{
if(!UnitBuff("target", Curse of Agony)) /cast Curse of Agony;
else if (!UnitBuff("target", Immolation)) /cast Immolation;
else if (!UnitBuff("target", Corruption)) /cast Corruption;
else /cast Shadow Bolt;
}

i've read the API at WoWwiki, but idk what are the return type, parameter, etc.
pls can you port that algorithm to wowmacro?

i'm so grateful if you can give me complete API documentation .

thx ^^
i tested like this

/run nm=UnitDebuff("target", "Trauma"); if nm=="Trauma" then /cast Rend end

and tried

/run if not UnitDebuff("target", "Rend") then CastBySpellName("Rend") end

my char won't use Rend, whereas

/run nm=UnitDebuff("target", "Trauma"); if nm=="Trauma" then print("working") end

is working, pls help me if someone know



Edited: August 19, 2011
Premium
blackgrim August 19, 2011  
blackgrim's Avatar
ty for posting this macro guide,

i am still trying to make a 1 buton hit macro for a hunter multipla trap ...

/cast Frost Trap
/cast Explosive TRap
/cast Snake Trap

-- this macro dosent work even if thos 3 trap are on diferent CD --
ive try also /castsequence Frost Trap, Explosive Trap, Snake Trap

still dosent work can someone help me with this ?



Molten Member
elicray August 29, 2011  
elicray's Avatar
Hey, i have a question...

I have this macro:
#showtooltip
/castsequence reset=60 Vampiric Blood, Rune Tap

The reset of Vampiric Blood is bigger then Rune Tap (30s). Have some test option to just do this macro if Vampiric Blood insn't reseted? Like:

#showtooltip
/castsequence [if VP is reseted] reset=60 Vampiric Blood, Rune Tap; Rune Tap



Molten Member
Shadownesss August 29, 2011  
Shadownesss's Avatar
you should've post this to the support q/a subforum..
also, try googling for macros, there are like 5 pages of explanations/help



Member
PlayToy September 4, 2011  
PlayToy's Avatar
OK im a lock and i notice when your in battle grounds the Minion (pet) will not attack unless your close to the one your fighting and its set on aggressive.I have noticed the macro you posted /castsequence reset=combat/target Corruption, Immolate, Curse of Agony and works REALLY badass,saves on alot of confusion on button smashing.Is it possible to st the minion in the same macro to attack on command?



Member
kodikun September 4, 2011  
kodikun's Avatar
Posted by PlayToy View Post
OK im a lock and i notice when your in battle grounds the Minion (pet) will not attack unless your close to the one your fighting and its set on aggressive.I have noticed the macro you posted /castsequence reset=combat/target Corruption, Immolate, Curse of Agony and works REALLY badass,saves on alot of confusion on button smashing.Is it possible to st the minion in the same macro to attack on command?
add "/petattack" to your macro



Member
PlayToy September 4, 2011  
PlayToy's Avatar
Ok i made a macro as follows from the example described in the post and works pretty good so far....
/castsequence reset=combat/target Corruption,Curse of Agony,Immolate,Incinerate,Life Tap,Life Tap,Life Tap

Where in the macro do i put my pet attack sequence at to attack on command?Is it possible to do it if i had my void walker always set on passive and make it work?



Member
OutOfMemory September 4, 2011  
OutOfMemory's Avatar
VERY helpful, bookmarked! Thanks



Member
Kruul September 5, 2011  
Kruul's Avatar
i'm trying to set up a macro where shift + key is assigned to a different spell but it also stopscasting for that different spell...



/stopcasting
/cast [modifier:shift]Counterspell
/cast Ice Lance


that's the macro right now, but I just want it to stopcasting for counterspell and NOT for ice lance, how do I do that? I also want counterspell to have the shift key assigned w/ it


I do know that i can simply bind a different macro with the shift + same key, but I'd rather have this in one button on my action bar.



Edited: September 5, 2011
Molten Member

Reply


Tools
Display Modes



Designed by Molten
Powered by vBulletin® Version 4.0.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.