The Warlocks Den - WoW Warlock DiscussionsThe Warlocks Den - WoW Warlock Discussions

Member Login
Forgot Password?


Please Register to Remove these Ads

The Warlocks Den - WoW Warlock Discussions » Guides » Add-ons and Macros » Macro Guide

Reply
Old December 28, 2009, 05:06 AM   #1 (permalink)
 Cormanthor's Avatar
 
Status: Retired

Character Info
Cormanthor
85 Orc Warlock
Undermine US PvE
Profile: Blizzard Armory
Talent Tree: Demonology
4.0 Macro Guide

Macro Guide (v 4.0.6)

Macros are a very powerful, often misunderstood tool offered by Blizzard. This guide aims to be useful to beginner to intermediate level macro creation and use. Not everything presented will be directly useful for Warlocks, but most of use have alts on the side too.

Macro capabilities
There are many things macros can do, but there are some very important things that macros cannot do. Under no circumstances can a macro check for buffs, debuffs or cooldowns. Macros cannot delay a spellcast since all spells require a hardware interaction to fire. Macros cannot use more than one GCD per click (some spells do not consume a GCD, and therefore can be chained). Macros cannot exceed 255 characters in length.*
*Addons have the ability to extend macros to 1024 characters in length.

Macro Basics
The basic format of a macro command is:
Code:
/command [conditionals] object
The command can be any “slash” command. Conditionals are optional and provide a target for the command and / or conditions when it should work. Objects are Units, Items, or Spells.
When a set of conditionals are not met, the object isn't acted on by the command. For example:
Code:
/cast [@mouseover,help] Dark Intent
This will do exactly nothing if you don't have a mouseover target that is friendly to you. There is a way to make it 'fall through' to another set of conditionals though.
Code:
/cast [@mouseover,help][@pet] Dark Intent
This macro starts with checking for a friendly mouseover. If you have one, it will cast Dark Intent on your mouseover. But if you don't have a friendly mouseover, it will skip that conditional and move to the second one, casting Dark Intent on your pet.

Commands
You can use any slash command in a macro, including:
/lol -- or any emotes
/s, /p, /ra, /bg, /g, /1, /2, -- or any other chat mode
/cast or /use -- these two commands are interchangeable
/castsequence -- this is a special form of cast
/console -- this allows you to adjust game settings like sound effects
/run or /script -- these allow you to execute Lua code directly
/click -- this allows you to ‘click’ another button
/stopmacro -- this stops the macro. Only useful with conditionals.
/petattack, /petfollow, /petstay -- tells your pet to attack/follow/stay (/petstay still works in 4.2)
/petmoveto -- gives you the targeting reticule for the 'Move To' command.
/petassist, /petdefensive, /petpassive -- sets the mode your pet is in
/petautocaston, /petautocastoff, /petautocasttoggle -- on/off/toggle for pet abilities
/dismount -- gets you off your mount and back on your feet
/leavevehicle -- gets you out of your current vehicle
/equipset -- equips a specific set by name from the Equipment Manager
/equip or /equipslot -- to equip particular items (optionally to specific slots)
/follow, /fol, or /f -- follow your target (works with targeting conditionals)
/usetalents -- used to change specs
/randompet -- summons a random non-combat pet
/assist or /a -- changes to your target's target
/focus and /clearfocus -- sets or clears a focus target
/target, /tar, and /cleartarget -- used to set (and clear) your target. Can be a named target (ie /tar Darkened Creations)
/targetenemy or /targetenemyplayer -- cycles through targets (or just enemy players) just like <tab>
/targetfriend or /targetfriendplayer -- cycles through friendlies (or just friendly players) just like <ctrl + tab>
/targetlasttarget -- switches back to your previous target (useful for target swapping)
#show or #showtooltip -- these commands work with the ‘?’ icon to show your spell’s icon

Conditionals
While optional, conditionals allow you to select the target of your command or perform checks to allow or disallow your command to execute. They are always in [brackets], and multiple conditions are separated by commas. The @ is new and replaces ‘target=’ (saves space). You can also put the word ‘no’ directly in front of any conditional except the ones that start with ‘@’. The ‘/’ listed below is an ‘or’, where 1/…/6 means any number 1 through 6.

Test conditions
actionbar:1/.../6 or bar:1/.../6 -- Given action bar page is selected
bonusbar:5 -- The possess bar is active (controlling a vehicle or another player)
button:1/.../5 or btn:1/.../5 -- Macro activated with the given mouse button
exists -- Target exists
dead -- Target is dead, but exists
harm -- Can cast harmful spells on the target, and the target exists
help -- Can cast helpful spells on the target, and the target exists
party -- Target is in your party
raid -- Target is in your raid/party
group or group:party/raid -- You are in the given type of group
flyable -- In a zone where flying is allowed
flying -- Mounted or in flight form AND in the air
swimming -- Self explanatory
mounted -- Self explanatory
indoors/outdoors -- Self explanatory
modifier:shift/ctrl/alt or mod:shift/ctrl/alt -- Holding the given key
pet:<pet name or type> -- The given pet is out
spec:1/2 -- Currently active talents
stance:0/1/2/.../n or form:0/.../n -- In a stance. Meta is [form:2]
stealth -- Stealthed
channeling or channeling:<spell name> -- Channeling the given spell
combat -- In combat
equipped:<item type> or worn:<item type> -- item type is equipped (item type can be an inventory slot, item type, or item subtype)
vehicleui or unithasvehicleui -- the player (or targeted unit) is in a vehicle

Targets
You can also attach ‘target’ to the end of these, indicating that unit’s target, as many times as you like (Ex. @pettargettarget). There is a running joke about Kevin Bacon that involves @targettargettargettargettargettarget...
@player -- This is you
@pet -- This is your pet
@vehicle -- This is your vehicle
@party1/…/4 -- Party members 1-4
@partypet1/…/4 -- Party members’ pets 1-4
@raid1/…/40 -- Raid members 1-40
@raidpet1/…/40 -- Raid members’ pets 1-40
@focus -- This is your focus
@target -- This is your target
@mouseover -- This is the unit under your mouse
@arena1/…/5 -- These are your arena enemies
@boss1/…/4 -- I haven’t seen these used yet, but they correspond to the four new boss unit frames

Objects
The command at the beginning of the line will often need something to act on. That is where the object comes in. Objects can be spells, items, or units. You can also specify what rank you want to cast in a spell by adding the suffix ‘(Rank x)’, where ‘x’ is the rank you’d like to cast. You can include more than one object per command if you use conditionals. The first condition that evaluates to ‘true’ will pass its object to the command. See the examples below. You can prevent toggling an ability off by preceding its name with an exclamation mark. (ie /cast !Shoot)

Examples
This will cast Immolate at your current target.
Code:
/cast Immolate
Now let's upgrade it to make it more useful. Your new macro still casts Immolate at your target, but now it tells your Imp (if he is out) to cast Firebolt at your focus target (if it is an enemy unit), or cast Firebolt at your target if there is no enemy currently focused.
Code:
#showtooltip
/cast [pet:Imp,@focus,harm][pet:Imp] Firebolt
/cast Immolate
This little macro will attempt to cast Unending Breath on whoever is under your mouse, but only if they exist and are friendly. Take note of the empty brackets ‘[]’. They tell the macro that if it doesn’t meet the first condition, try to cast it as normal without any conditions. For this spell, that results in casting on your target if it’s friendly, or on yourself if you have ‘Auto self-cast’ enabled. I also use this macro on my healing alts. With a small change (from 'help' to 'harm'), this macro works well for Bane of Havoc.
Code:
#showtooltip
/cast [@mouseover,help][] Unending Breath
This macro swaps to your inactive talent set
Code:
/usetalents [spec:2] 1; 2
This will follow a different party member depending on which mouse button you click it with.
Code:
/follow [btn:4] party4; [btn:3] party3; [btn:2] party2; party1
This will use your Fel Healthstone, and with <alt> down it will also use a health pot. It will tell the raid you ‘eated’ your cookie, regardless of if you had one to consume or not.
Code:
/use [mod:alt] Mythical Healing Potion
/use Fel Healthstone
/ra I had a cookie, but I eated it
This macro will cast Curse of Exhaustion on your current target, but if you hold <alt> it tries to cast on your first arena enemy and <ctrl> will try to get the second arena enemy.
Code:
#showtooltip
/cast [@arena1,mod:alt][@arena2,mod:ctrl][] Curse of Exhaustion
This is my mount macro. There are many like it, but this one is mine.
It will try to summon my Abyssal Seahorse if I'm swimming (use <alt> to skip this mount), or my Violet Protodrake if the area is flyable (use <shift> to skip this mount), or my White Polar Bear if I am in a raid group. If none of these conditions are met, it will try to summon my X-53 Touring Rocket, Dreadsteed or Dark War Talbuk. If I am mounted, or in a vehicle, it will try to dismount me.
Code:
#showtooltip
/cancelform
/castrandom [swimming,nomod:alt,nomounted]Abyssal Seahorse;[nomounted,flyable,nomod:shift]Violet Proto-Drake;[nomounted,group:raid]White Polar Bear,[nomounted]X-53 Touring Rocket, Dreadsteed, Dark War Talbuk
/dismount [mounted]
/leavevehicle
*Note: /cancelform is there to pull me out of Demon Form so that I can mount. And my actual mount macro is much longer than this, thanks to BindPad.

This is a pretty complex looking macro that one might use for your main nuke. It turns off sound effects, then tries to pop both of your trinkets. No annoying “That’s not ready yet” warnings for the trinkets. It will also put your Imp’s Firebolt on autocast (corrects a periodic bug that has cropped up from time to time since Wrath). And if you have your Felguard out, he will pop Felstorm if it's off CD. Once it is done with all that, it clears the error frame (before you could even see it pop up) and reenables sound effects for the actual spell cast of Shadow Bolt. The ‘#showtooltip’ part is useful with the ‘?’ icon to show the tooltip for Shadow Bolt.
Code:
#showtooltip Shadow Bolt
/console Sound_EnableSFX 0
/use 13
/use 14
/petautocaston [pet:Imp] Firebolt
/cast [pet:Felguard] Felstorm
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
/cast Shadow Bolt
This is my Banish focus macro. If you don't have a living focus, it will focus your target and then Banish them. Right click to clear your focus. The same macro works well for Fear.
Code:
#showtooltip Banish
/petpassive
/focus [@focus,dead][@focus,noexists] target
/cast [@focus,btn:1] Banish
/clearfocus [btn:2]
This macro works Soulburn into the button for Drain Life. Hold down <alt> to get the amped up Drain Life. The [nochanneling] conditional prevents accidental clipping.
Code:
#showtooltip
/cast [mod:alt] Soulburn
/cast [nochanneling:Drain Life] Drain Life
Need a better use for Soulburn? Try hooking it to your Soul Fire spell, complete with the option to right-click for a regular Soul Fire.
Code:
#showtooltip Soul Fire
/console Sound_EnableSFX 0
/use 13
/use 14
/cast [nobtn:2] Soulburn
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
/cast Soul Fire
This macro will run a sequence of spells for use in demon form. This pops Demon Soul and Metamorphosis on the first click, then cycles through Immolation Aura and Demon Leap on the next two clicks, leaving off with another Immolation Aura to pop when the first runs out.
Code:
#showtooltip [form:0] Metamorphosis
/cast [form:0] Demon Soul
/cast [form:0] Metamorphosis
/castsequence [form:2] reset=29 Immolation Aura(Metamorphosis), Demon Leap(Metamorphosis), Immolation Aura(Metamorphosis)
Sources
Wowpedia.org/Macro_API
Wowpedia.org/Making_a_macro
Fitzcairn's Macro Explain-o-matic
__________________
Some days it's just not worth chewing through the restraints.

Last edited by Cormanthor; November 12, 2011 at 04:36 PM.. Reason: Minor update
Cormanthor is offline   Reply With Quote
Recommended Guide

lb1
Old April 02, 2010, 05:05 PM   #2 (permalink)

Character Info
Skewd
79 Undead Warlock
Frostwolf US PvP
Re: Macro Guide

TYVM for this guide, it is appreciated. I would love to know how to do something and for the life of me, using the above and being in game can not for the life of me make it work. I know it's simple and I'm sure it's a small thing I'm either missing or doing wrong or dont' understand.

When I'm solo'ing and when in randoms I like to tab target almost everthing .... so Tab ... then I would like a macro doing: Corruption (instacast), Curse of Agony (instacast) and then Immolate (cast time). I think I know what a GCD is and I think the first two are instant cast so their not on the GCD but the Immolate would be? Here is what I've tried so far, don't giggle 8)

/cast Corruption @target
/cast Curse of Agony @ target
/stopcast {done this both with and without this line}
/cast Immolate @ target

No matter what I do it'll cast the first one, either one, but then say I can't cast that yet ... is that the GCD talking to me and both those spells fall under that?

TY for the guide, it really is appreciated. If I gone about contacting you the wrong way, please forgive me.

TY,
chad aka skewd on the Frostwolf server
bellamarr is offline   Reply With Quote
Old April 02, 2010, 07:06 PM   #3 (permalink)

Character Info
makilélè
85 Undead Warlock
Sargeras Euro PvP
Guild: Øn The ßræk
Re: Macro Guide

Instant cast doesn't mean no GCD. It only mean it's apply directly on the target(so no cast) but you still have to wait the minimal time between two spell(=global cooldown).

So you can't cast corruption,agony,immolate in a one push button maccro.

The best you can do is using a /castsequence corruption,agonie,immolate which will cast corruption on the first push, agony on the seconde, immolate on the third,....

Some very rare talent are off gcd(demonic empowerment,metamorphosis) and can be combine with a spell
thetrueavatar is offline   Reply With Quote
Old April 02, 2010, 07:48 PM   #4 (permalink)

Character Info
Skewd
79 Undead Warlock
Frostwolf US PvP
Re: Macro Guide

Thnx so much for the reply.
bellamarr is offline   Reply With Quote
Old April 03, 2010, 04:17 AM   #5 (permalink)

Character Info
Varsang
85 Blood Elf Warlock
Stormrage Euro PvE
Guild: Unqualified
Talent Tree: Affliction
Re: Macro Guide

Hey all my first post on the fourms woot I'm looking for a macro that was used on me when I was playing my rogue. It's a macro to knock a rogue out of stealth I asked the lock how he did it he told me twas a macro useing Coe but not what the macro was. I have heard other locks talk about this macro does any one know of this ?
Varsung is offline   Reply With Quote
Old April 17, 2010, 07:20 AM   #6 (permalink)

Character Info
Eschatos
85 Gnome Warlock
Moonglade Euro RP PvE
Guild: Nightfall
Profile: Blizzard Armory
Talent Tree: Affliction
Re: Macro Guide

@Varsung, this is what I use:

#showtooltip
/cast [pet:voidwalker] consume shadows
/targetenemy [noharm][dead]
/cast curse of exhaustion


First things first:I'm not good at macros. Any help is very appreciated. I want a macro to cast Drain Life when not channeling, and Drain Mana if have the shift button pressed, again when not channeling. It should be a quite simple macro, I just can't sort it out.

Just want to mix these too with the shift button on Drain Mana

/cast [nochanneling:Drain Life] Drain Life
and
/cast [nochanneling:Drain Mana] Drain Mana

cheers
__________________
Don't worry, it only hurts till you die.

Last edited by Eschatos; April 17, 2010 at 07:23 AM..
Eschatos is offline   Reply With Quote
Old April 17, 2010, 07:26 AM   #7 (permalink)
 Cormanthor's Avatar
 
Status: Retired

Character Info
Cormanthor
85 Orc Warlock
Undermine US PvE
Profile: Blizzard Armory
Talent Tree: Demonology
Re: Macro Guide

Quote:
Originally Posted by Eschatos View Post
First things first:I'm not good at macros. Any help is very appreciated. I want a macro to cast Drain Life when not channeling, and Drain Mana if have the shift button pressed, again when not channeling. It should be a quite simple macro, I just can't sort it out.

Just want to mix these too with the shift button on Drain Mana

/cast [nochanneling:Drain Life] Drain Life
and
/cast [nochanneling:Drain Mana] Drain Mana

cheers
I would probably do it something like this:
Code:
#showtooltip
/cast [nochanneling, mod:shift] Drain Mana; [nochanneling] Drain Life
__________________
Some days it's just not worth chewing through the restraints.
Cormanthor is offline   Reply With Quote
Old April 17, 2010, 10:13 AM   #8 (permalink)

Character Info
Eschatos
85 Gnome Warlock
Moonglade Euro RP PvE
Guild: Nightfall
Profile: Blizzard Armory
Talent Tree: Affliction
Re: Macro Guide

Thank you, works just fine

I also added Shadow Bolt in it, now that I get how it works:

#showtooltip
/cast [nochanneling, mod:shift] Drain Mana; [mod:ctrl] Shadow Bolt; [nochanneling] Drain Life

just fantastic in affl pvp

So I spent a lot of time today to set my macros for arena etc, and while i was in Arathi Basin I got DC'd and all the macros I did today are gone..... WTF!!!!
__________________
Don't worry, it only hurts till you die.

Last edited by Eschatos; April 17, 2010 at 07:56 AM..
Eschatos is offline   Reply With Quote
Old April 17, 2010, 02:49 PM   #9 (permalink)
 Cormanthor's Avatar
 
Status: Retired

Character Info
Cormanthor
85 Orc Warlock
Undermine US PvE
Profile: Blizzard Armory
Talent Tree: Demonology
Re: Macro Guide

Quote:
Originally Posted by Eschatos View Post
So I spent a lot of time today to set my macros for arena etc, and while i was in Arathi Basin I got DC'd and all the macros I did today are gone..... WTF!!!!
Unfortunately, due to botting, WoW doesn't write any data to the disk until it gets properly closed. So if you are in the middle of writing macros, rearranging your UI, etc. and get DC'd... nothing is saved.
__________________
Some days it's just not worth chewing through the restraints.
Cormanthor is offline   Reply With Quote
Old April 17, 2010, 03:51 PM   #10 (permalink)

Character Info
DoomOracle
80 Undead Warlock
Cho'gall US PvP
Guild: Redemption in Depravity
Profile: Blizzard Armory
Talent Tree: Affliction
Re: Macro Guide

Quote:
Originally Posted by Cormanthor View Post
Unfortunately, due to botting, WoW doesn't write any data to the disk until it gets properly closed. So if you are in the middle of writing macros, rearranging your UI, etc. and get DC'd... nothing is saved.
You can also reload your UI to save the changes to UI settings and macros.

Trust me, we've all lost data to a DC. I once set up my entire UI from scratch after reinstalling WoW. The program froze, and I suddenly relised I hadn't reloaded or restarted WoW. I immediate reaction was more or less:
__________________
Whether you're a forum expert, newbie or just want a good laugh...
Everyone can learn something from : Posting And You...
When in doubt, read the Forum Rules
Like what you see? Support the Den
Falcrist is offline   Reply With Quote
Reply

Bookmarks

Tags
Guide, howto, Macro

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 06:50 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.


SEO by vBSEO 3.3.0