dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
2770
share rss forum feed


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast

4 edits

2 recommendations

[Theory] Learn to write Macros

The tutorial I relied on heavily to provide this thread has been added by Mike See Profile to the External Links list. If you don't know what I'm talking about... look at the list of "Regulars" and then move your eyes up to the top of that panel ;)


So, I thought I'd draft up a general guide for creating WoW macros. I know there are some professional programmers here, so my target audience is really the novice player or someone just looking to jump into macros. I found an amazing site with several pre-built macros and they even offer to write custom macros for you at macro-wow.com. To save time, most of this guide will be clips from the website, re-arranged by me for readability in this forum.

To begin writing Macros, all you need is Microsoft Notepad. If you want to test your macro, you'll have to be in-game. The in-game Macro editor can be accessed by typing "/m" + Enter. Please note that there are 2 tabs of macros, one is accessible to all toons, the other is just for your current toon. I recommend keeping at least one "mega-macro" in the first tab so that down the road you won't have to pull up this guide, you can just look at that mega-macro to remember the syntax of the conditional statements.

said by Macro-WoW :
Definitions:

• Macro Syntax: the rules around how the commands in a macro should appear along with the correct punctuation. Most macro errors are due to improper syntax.
• Macro Conditional: a question that you want the macro to ask itself before it continues on to the next bit of macro code. See a complete list of Wow macro conditionals
• Macro Command: the function you want the macro for Wow to perform. In this macro guide, we’ll be using the command “/cast”, which obviously casts a spell. See a complete list of Wow macro commands.


The simplest /cast macro is
#showtooltip
/cast Shadow Bolt
 

The #showtooltip command tells WoW what icon you want the button to have (I find it best to just select the "?" icon in the macro interface and use the #showtooltip command to select your icon. I hate scrolling through the list of icons). The macro above is basically what dragging a button from your spell book down to your action bar accomplishes. Clearly, we aim to do much more with macros than this, but it does bring to mind one crucial tip. You must get the name of the spell or item perfect. Using shift+click on the spell you want (in the spellbook) will copy the exact name of the spell into your macro window.

Here is a template for the kinds of macros we plan on building:
#showtooltip [conditionals] thingtoshow; [conditionals] thingtoshow
/command [condition, AND condition][OR thiscondition] spell
 

So let's talk about Conditionals. Conditionals are how we get the macro to adjust its behavior based on pre-planned conditions. Let's look at some of the Conditions we can include in our macros.

Targeting
The great thing about the targeting conditional is that it allows you to cast a spell at a pre-planned target without changing your current target.
/cast [@focus] Spell
/cast [@focustarget] Spell
/cast [@mouseover] Spell
/cast [@mouseovertarget] Spell
/cast [@targettarget] Spell
/cast [@player] Spell
/cast [@party1] Spell
/cast [@arena1] Spell 
 
* @player is how you target yourself.
We can also add additional conditions to the target condition to check for target status
 
/cast [@focus, harm] Spell 
/cast [@focus, help] Spell
/cast [@focustarget, nodead] Spell
/cast [@focustarget, exists] Spell
 

So all of these examples are using the comma between conditions, which serves as an "AND". It is possible to have 2 different spells fire from the same macro based only on the target condition.
#showtooltip
/cast [@focus, help] Heal; [@focus, harm] Smite
 

so, how do we know which spell is going to fire? This macro is still a very simple macro, so WoW will decide which spell icon to show based on your Focus target. If you don't have a focus target, The macro button will have the "?" icon because we haven't told the macro what to do if there is no focus target. To add a "default" action to your macro, we just need to add another ";" then the spell name without any conditional statments.
#showtooltip
/cast [@focus, help] Heal; [@focus, harm] Smite; Holy Fire
 

Now, this macro would not be very useful in combat, but it is useful for demonstrating the behavior of #showtooltip. Also of note is the fact that WoW reads macros from top to bottom, left to right. So it will check for its conditions in order from left to right.

Modifiers (Shift, Ctrl, Alt, etc.)
Okay, so here is where we make the most of our Action Bars (whether you're a clicker or a button-smasher). We have the ability to doulbe/triple the use we get out of a single macro by adding a modifier condition.
#showtooltip
/cast [mod:Shift] Holy Fire; [mod:Ctrl] Shadow Word: Pain; [nomod] Smite
 

NOTE: Please be aware that this is not the only way to involve Shift/Ctrl/Alt as modifiers to your abilities. If you are a buttonsmasher, you can also re-map your keybinds so that "F" is one action bar button, and "Shift+F" is another. If you do this, please don't use [mod:Shift] in a macro that you've placed in an action bar location that uses "Shift+" in its mapping. Just bad juju. If you are a Clicker, there's probably no reason to worry about this because I doubt you've remapped much of your keybinds (except maybe your strafe keys).

Stance
Some classes have spells that only work when you are in a particular stance. While we do have an Actionbar that changes with our stances, you might want to know how to encorporate stances into a macro so that you aren't limited to the bars that swap.

#showtooltip
/cast [stance:0] Spell Name; [stance:1] AnotherSpell; [stance:2] AThirdSpell
 

Druid forms:
• Stance:0 is Caster form
• Stance:1 is Bear form
• Stance:3 is Cat Form
• Stance:5 is Flight form

Warrior stances:
• Stance:1 is Battle Stance
• Stance:2 is Defensive Stance
• Stance:3 is Berserker Stance

Warlock form:
• Metamorphosis: 1

There are other forms/stances... use the following LUA script to find out what stance you are in (for macro purposes)
/run local x = GetShapeshiftForm() print("you are in stance: ",a)
 
btw, you can just copy this and paste it into your chat window.

Now, if you want the macro to change forms/stances for you, remember that there is a spell for that in your spellbook, so you'd use the "/cast SpellThatChangesStance" argument in your macro.

--
Guild leader of Pride and Ego (US:Nathrezim)
Good times with Great people in the Best way to spend $15/mo.

Intelligence is no substitute for Character.


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast

2 edits

2 recommendations

Command Stacking
Our macros thus far have been pretty much one-liners. We've played with ways to macro in several options for one button click/smash but we have not come anywhere near our 255 character limit. We can have macros activate spells and abilities that are not on the Global Cooldown (GCD) or we can stack macros to either take advantage of spell cooldowns.

Let's look at how to stack abilities NOT on the GCD before casting an actual spell.
#showtooltip
/use PotionName
/cast ClassCooldownBuff
/cast [Conditionals] Spell
 
See the following post for some of the abilities that are off the GCD.

Another approach is to take advantage of Cooldowns to stack abilities
#showtooltip
/cast Barkskin
/cast Survival Instincts
/cast Might of Ursoc
 
As each ability is cast, it gets put on cooldown, so the next time the macro is invoked, the WoWClient will skip the ability on cooldown and fire the next one. This particular macro is a feral druid "oh crap" survivability macro... so it would get spammed.

But not all abilities have cooldowns beyond the GCD. So not all classes can just stack commands (DoT classes, particularly). That's where Castsequence steps in.

Cast Sequence
said by Macro-WoW :
The /castsequence macro is a very useful type of macro code that can make some seriously complicated macros. Lots of players think they can make a DPS in one button macro or a DPS rotation macro and do competitive DPS. That is usually not the case. For a perfect min/max dps sequence, you have too many factors in place to make a decent cast sequence.

However, you can use these macros to improve your gameplay, reduce some clicks and even improve your pvp play considerably. The big thing to remember is it won’t make you play perfectly, just a whole lot better.

The syntax for a castsequence macro is as follows:
#showtooltip
/castsequence [conditionals] resetparameter spell, spell, spell
 

All of the conditionals we discussed earlier (targeting, modifiers, stance) will work here. So,
#showtooltip
/castsequence [@focus, harm][@focustarget, harm][@target]reset=Target/Combat Curse of the Elements, Agony, Corruption, Drain Soul
 

So, if your Focus is the bad guy, or your good-guy focus targets a bad guy, the sequence will target that. Otherwise your target will have to do.

But let's talk about how the macro moves through it's sequence and then about the resetparameter. The spell will fire one ability each time the macro is activated. One activation equals one spell within the castsequence. Nothing is allowed to be fully automated (botting). So, if the above macro is spammed (we'll ignore cast time and GCD for right now) the warlock's spells will fire in this order:
• first click: Curse of the Elements
• second click: Agony
• third click: Corruption
• fourth click: Drain Soul

My personal preference is to front load the instant casts (usually dots) and end in a spell that has a cast time (or is channeled) and a visually recognizable spell effect. Why? Because I like to know when I've reached the end of my cast sequence without counting dots or how many times I fired the macro. In the above example the resetparameter was set as "reset=Target/Combat". What this means is that the castsequence macro will be reset if there is a change in either "Target" or "Combat" state. So, if the mob dies before you get to "Drain Soul" then the macro will reset and be ready to fire "Curse of the Elements". Also, if you are multi-dotting, as soon as you change targets the macro will reset and Curse of the Elements will be the first spell that is fired on each new target.

You can also use "Shift" as a reset parameter (not recommended if you are already using Shift to modify a different action). Another option is to give a duration in seconds for the castsequence to reset.
#showtooltip
/castsequence [@focus, harm][@focustarget, harm][@target]reset=10 Curse of the Elements, Agony, Corruption, Drain Soul
 
The castsequence here will reset in 10sec from the time the first Curse of the Elements is cast.


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast

1 recommendation

Re: [Theory] Learn to write Macros (Abilities OFF the GCD)

Druid
Bear Form
Dash
Force of Nature
Ursol’s Vortex
Cenarion Ward
Swiftmend
Prowl
Maul
Travel Form
Aquatic Form
Barkskin
Track Humanoids
Dash
Wild Mushroom: Detonate        
Wild Mushroom: Bloom
Might of Ursoc
Frenzied Regeneration

Death Knight
Death Grip
Anti-Magic Shell
Icebound Fortitude
Mind Freeze
Dark Simulacrum

Hunter
Fervor
Track Beasts
Track Demons
Track dragonkin
Track Giants
Track Hidden
Track Humanoids
Track Undead
Feed Pet
Disengage
Aspect of the Hawk
Aspect of the Cheetah
Feign Death
trueshot Aura
Rapid Fire
Aspect of the Pack
Readiness
Misdirection
Deterrence
Aspect of the Fox

Mage
Illusion
Counterspell
Frost Bomb
Nether Tempest
Time Warp
Alter Time

Monk
Stoneskin
Chi Burst
Chi Torpedo
Fists of Fury
Renewing Mist
Zen Flight
Provoke
Fortifying Brew
Spear Hand Strike

Paladin
Righteous Fury
Lay on Hands
Reckoning
Divine Protection
Rebuke
Devotion Aura
Avenging Wrath

Priest
Divine Star
Halo
Holy Word: Sanctuary
Fade


Not an all-inclusive list... please feel free to add/correct/advise as you see fit.
--
Guild leader of Pride and Ego (US:Nathrezim)
Good times with Great people in the Best way to spend $15/mo.

Intelligence is no substitute for Character.


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
For a good list of conditionals for Macros, visit
macro-wow.com/guide/full-list-of-wow-macro-conditionals/

Feel free to share your favorite macros.


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast

1 edit

1 recommendation

My Discipline Healing uses this macro for Atonement healing
#showtooltip
/cast [@mouseovertarget, harm][@mouseover,harm] Holy Fire
/cast [@mouseovertarget, harm][@mouseover,harm] Smite
 
Both Holy Fire and Smite build Evangelism stacks, and I really like how the DoT of Holy Fire becomes a HoT through Atonement, so smite while Holy Fire is on cooldown...

For dailies (when I was doing them in my Discipline spec) I had to make an important change
#showtooltip
/cast [@target][@mouseovertarget, harm][@mouseover,harm] Holy Fire
/cast [@target][@mouseovertarget, harm][@mouseover,harm] Smite
 
"Why", do you ask? Well... I hate being stuck in combat. If you notice in my mouseover, harm situation, if I'm trying to tag a Daily mob that is being killed by the opposing faction, both the NPC AND the other player fit the bill. For some reason (I'm sure it is by design) the macro would always prefer the cross-faction player over the tagged mob. So, my Holy Fire and Smite would hit the player no matter what I had as my Mouseover target. NPC dies... I'm still in combat because I tagged the other player. If they noticed, now I'm engaged in pvp... if they didn't... I have to run far away before I can mount.

another macro to try
#showtooltip
/castsequence [@mouseovertarget, harm][@target] reset=17/Target/Combat Shadow Word: Pain, Vampiric Touch, Mind Flay, Mind Flay, Mind Flay, Mind Flay
 
If multi-dotting, the change of targets will reset the cast sequence, so you can do only SW:P or you can wait until after VT before changing targets. If you are on one target (and are using different macros or action bar buttons for Mind Blast, Devouring Plague, and Mind Spike) then using the reset=17 should get you to refresh SW:P at a good time. I don't use this because I'm not 100% on board with castsequence gameplay.
--
Guild leader of Pride and Ego (US:Nathrezim)
Good times with Great people in the Best way to spend $15/mo.

Intelligence is no substitute for Character.


mettachain
Goblineer

join:2011-09-27
Azeroth
kudos:1
reply to Immer

Re: [Theory] Learn to write Macros

nice post. just learned a thing or two from reading this. will check out that site later.
--
Reading your post made me want to punch a kitten in the jawbone.


stvnbrs
Premium
join:2009-03-17
Cary, NC
kudos:5
reply to Immer
Perhaps a tutorial on using macros to change abilities based on the form/stance they are in? BTW nice write-up and thanks.
--
Goggalor: "Freedom of speech is not freedom of asshattery."


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast
Thanks! I'll need to think about that for a bit. I discussed using stances as a condition toward the end of the OP. I'm not fully up to speed on feral/guardian stance limitations nor am I sure which (if any) warrior abilities are still bound to a stance. I'll try to find a good stance example macro to close out the OP discussion.

Any further discussion would probably become very class-specific and might best be covered in a class guide (which, btw, we still have many classes/specs unaccounted for).
--
Guild leader of Pride and Ego (US:Nathrezim)
Good times with Great people in the Best way to spend $15/mo.

Intelligence is no substitute for Character.


Snakeoil
Ignore Button. The coward's feature.
Premium
join:2000-08-05
Mentor, OH
kudos:1
reply to Immer

Re: [Theory] Learn to write Macros (Abilities OFF the GCD)

Worgen: Beast to human form.
Not that it's a big deal.

cymraeg
Thread Killer
Premium
join:2011-06-07
Dodge, NE
reply to Immer

Re: [Theory] Learn to write Macros

new favorite ret god mode macro

/cast avenging wrath
/cast guardian of ancient kings
/cast holy avenger
/use 13
/use 14

blows bitches up
--
Hen Wlad Fy Nhadau!
"What happened in here?" " Seems to have been a bit of a squabble." "They're all dead!" " More of a tif then."


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast
reply to Snakeoil

Re: [Theory] Learn to write Macros (Abilities OFF the GCD)

said by Snakeoil:

Worgen: Beast to human form.
Not that it's a big deal.

Useful for social macros, absolutely. TY.


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast
reply to cymraeg

Re: [Theory] Learn to write Macros

Click for full size
Macro-WoW.com
said by cymraeg:

#showtooltip 
/cast avenging wrath
/cast guardian of ancient kings
/cast holy avenger
/use 13
/use 14
 

which made me realize that I completely skipped over the /use command.


DarkLogix
Texan and Proud
Premium
join:2008-10-23
Baytown, TX
kudos:3
For potions I normally put it with TimeWarp

its a spell that you'll normally only use once per fight and you only get one potion during the fight

combine that with a pre-combat potion and ensure hero isn't popped until at-least the CD on the potion is clear.

Then if a trinket has a use ability I try to match it to an ability with similar CD, sure I could put it on the most used ability to ensure it'll always get used but I don't like generating errors even if I don't see the error.

cymraeg
Thread Killer
Premium
join:2011-06-07
Dodge, NE
one addon my friend

Swatter


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast
reply to Immer
While not entirely macro related... if you have not set your camera zoom to its true max, you're missing out. Here is the script:
/script SetCVar("cameraDistanceMax",50)
 
Just copy and paste it into your command line and Viola! you can zoom out until your toon is roughly the size of your mouse pointer. The camera will still collide with terrain/ceilings... but it's awesome for farming, world pvp, and open-air encounters.

--
Guild leader of Pride and Ego (US:Nathrezim)
Good times with Great people in the Best way to spend $15/mo.

Intelligence is no substitute for Character.

Cptbeatstix

join:2011-12-21
Carrollton, TX
reply to Immer
Glad to see I'm not the only person that uses mouseover macros for healing. Its just so much easier than using healbot or vuduh.


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast
well... most of my healing is done via Clique+BlizzardUI. My ranged dmg dealing abilities are done via mouseover... and my melee is just straight keybinds. I'll be revisiting all of my toons after working on this thread to see how I can improve my performance, but I'm a diehard Clique fan for non-dmg dealing healing.

Cptbeatstix

join:2011-12-21
Carrollton, TX
reply to Immer
I only use most keybinds for any melee class I have. I feel like mouse overs for ranged dps is a waste of precious seconds. But having the Razer Anasi and Naga defiantly making keybinds so much easier to access.


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Agreed. Most of my ranged abilities are on "assist my mouseover" target, so I can bounce between the tanks. I started doing this because TabTargeting always screws me, lol.

Cptbeatstix

join:2011-12-21
Carrollton, TX
Tab Targeting is just horrendous now. I just need Gladius with a 15 man version lol.

fenix_jn

join:2006-12-28
Miami, FL
Reviews:
·T-Mobile US
·Comcast
·Sprint Mobile Br..
·AT&T U-Verse

1 recommendation

reply to Immer
quote:
/run local x = GetShapeshiftForm() print("you are in stance: ",a)
Shouldn't the variable in the end of that command be 'x' rather than 'a'? Like:
quote:
/run local x = GetShapeshiftForm() print("you are in stance: ",x)


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast
said by fenix_jn:

quote:
/run local x = GetShapeshiftForm() print("you are in stance: ",a)
Shouldn't the variable in the end of that command be 'x' rather than 'a'? Like:
quote:
/run local x = GetShapeshiftForm() print("you are in stance: ",x)

correct... that was a mistake.
--
Guild leader of Pride and Ego (US:Nathrezim)
Good times with Great people in the Best way to spend $15/mo.

Intelligence is no substitute for Character.


Endbringer

join:2012-10-07
Fishers, IN
reply to Immer
would you beable to do something on the reset parameters like
reset=target/[no, spell]

basicly i would be looking for the macro to reset if target changes or dot falls off


Immer
Gentleman
Premium
join:2010-01-07
Evans, GA
kudos:8
Reviews:
·Comcast

1 edit
you can't do it based on a dot falling off. You can set a keybind for the reset or have it reset on target change, but I'd caution against that if you are using @mouseover.

#showtooltip
/castsequence [@target]reset=Target Curse of the Elements, Agony, Corruption, Drain Soul
 
The sequence would start over when you changed targets. If the first spell was still on CD, you'd get the "spell not ready" warning and I think the next keypress would fire the next spell anyway.
--
Intelligence is no substitute for Character.

cymraeg
Thread Killer
Premium
join:2011-06-07
Dodge, NE
reply to Endbringer
i dont think you can End, if the macro contained an icd it would try to reset it, and get a taint every time it tried


Endbringer

join:2012-10-07
Fishers, IN
reply to Immer
well crap!!

thanks guys

BlitzenZeus
Burnt Out Cynic
Premium
join:2000-01-13
kudos:3
reply to Immer
Something I've used for a long time, and use this for many of the spells on my affliction lock so I can just right click spells for my focus target, even hold down shift to change the focus on the fly. The macro is mostly self-explanatory.

#showtooltip Haunt
/clearfocus [modifier:shift]
/focus [target=focus, noexists]
/use 13
/use 14
/cast Dark Soul: Misery
/cast [button:2, target=focus, harm] Haunt
/cast Haunt
 

Same thing applied to a cc spell, back when we actually had to be competent cc in raids.

#showtooltip Banish
/stopcasting
/clearfocus [modifier:shift]
/focus [target=focus, noexists]
/cast [button:2, target=focus, harm] Banish
/cast Banish
 

Some of the many I use, and I use ones like stopcasting macros for spells like soul shatter which is so basic it's three lines.

--
I distrust those people who know so well what god wants them to do because I notice it always coincides with their own desires- Susan B. Anthony
Yesterday we obeyed kings, and bent our necks before emperors. But today we kneel only to the truth- Kahlil G.


captokita
Premium
join:2005-02-22
Calabash, NC
reply to Immer
Haven't read this all yet, but a huuuuge THANK YOU!!!!! for posting it! I really would like to get into some macros. I have a couple on my Druid one of my guildmates made for me, and they do wonders for switching forms, casts, and such.

Will spend some time reading this. Would like to find some good ones for the rogue.