Useful Macro Templates

In 9.2.5 Blizzard introduced a bug where the Self Cast Key interferes with @unit (mouseover, focus, etc.) and @cursor macros. If you want to use those types of macros, you need to change your Self Cast Key to None.
If you want more info, or to encourage Blizz to fix the bug, please see this thread:

General Macro Templates

Dragonriding Mount Macro

#showtooltip
/cast [advflyable] DRAGONRIDING_MOUNT; [flyable] FLYING_MOUNT; GROUND_MOUNT
/dismount [mounted]

Known Macro

With the addition of the known condition you can now filter macro logic by spell name or spell id.

#showtooltip
/cast [known:SPELL1] SPELL1; [known:123456] SPELL2

Base Healing Macro

Alt: Self Cast
Mouseover Friend: Cast on Mouseover
Target Friend: Cast on Target
Target Enemy Targeting Friend: Cast on Enemy’s Target
Default casting behavior. This condition also serves to generate the correct tooltip.

#showtooltip
/cast [mod:alt,@player] [@mouseover,help,nodead] [help] [@targettarget,help,nodead] [] SPELL

Basic Helpful Mouseover Macro

Cast a helpful spell prioritizing mouseover.

#showtooltip
/cast [mod:alt,@player] [@mouseover,help,nodead] [] SPELL

Basic Harmful Mouseover Macro

Cast a harmful spell prioritizing mouseover.

#showtooltip
/cast [@mouseover,harm,nodead] [] SPELL

Basic Reaction Neutral Mouseover Macro

Cast a spell that can target both friends and enemies, prioritizing mouseover (Penance, Holy Shock, Shadowstep etc.)

#showtooltip
/cast [mod:alt,@player] [@mouseover,exists,nodead] [] SPELL

Basic Help/Harm Macro

This will cast one spell when mousing over or targeting a friend and another when mousing over or targeting an enemy.

#showtooltip
/cast [mod:alt,@player] [@mouseover,help,nodead] HELP_SPELL; [@mouseover,harm,nodead] [harm] HARM_SPELL; HELP_SPELL

Variant: HARM_SPELL as Default

#showtooltip
/cast [mod:alt,@player] HELP_SPELL; [@mouseover,harm,nodead] HARM_SPELL;[@mouseover,help,nodead] [help] HELP_SPELL; HARM_SPELL

Multi-modifier Mouseover Macro

Example of how to include multiple spells, differentiated by modifier, including mouseover. Trim it down and change exists to help or harm depending on what you’re actually using it for.

#showtooltip
/cast [mod:ctrl,@mouseover,exists,nodead] [mod:ctrl] CTRL_SPELL; [mod:shift,@mouseover,exists,nodead] [mod:shift] SHIFT_SPELL; [mod:alt,@mouseover,exists,nodead] [mod:alt] ALT_SPELL; [@mouseover,exists,nodead] [] SPELL

Basic Reticle Macro

Alt: Cast at Player
Combat: Cast at Cursor
Default: Display Reticle

#showtooltip
/cast [mod:alt,@player] [@cursor,combat] [] SPELL

Nochanneling Macro

Prevent casting when CHANNELING SPELL is channeling.

#showtooltip
/stopmacro [channeling:CHANNELING SPELL]
/cast SPELL

Prevent casting when ANY SPELL is channeling.

#showtooltip
/stopmacro [channeling]
/cast SPELL

Stopcasting Macro

Cancels your currently queued spell and interrupts your current cast so you can cast a priority spell. Note: this functionality is automatically baked into all interrupts. Also, this is really only useful for cancelling spells with a cast time > 1 GCD OR if you’re cancelling so you can cast a spell that’s off the GCD.

#showtooltip
/cqs
/stopcasting
/cast SPELL

Cancelaura Macro

Useful for things like Levitate, Ice Block, Spectral Sight where you want to be able to toggle them on and off with a single key.

#showtooltip
/cancelaura BUFF
/cast SPELL

Conditional Focus Cast

Shift: Clear Focus
Alt: Set/Cast on Focus
Default: Cast on Target

#showtooltip
/focus [mod:alt,@focus,dead] [mod:alt,@focus,noexists]
/clearfocus [@focus,dead] [mod:alt,@focus,noexists] [mod:shift]
/cast [mod:alt,@focus,exists] [] SPELL

Offensive Macro for Healers

This macro is for healers who want to dps without switching to enemy targets. Basically allows you to dps while having fiendly players targeted or moused over.

Mouseover Enemy: Cast on Mouseover
Target Enemy: Cast on Target
Mouseover Friend Targeting Enemy: Cast on Friend’s Target
Target Friend Targeting Enemy: Cast on Friend’s Target
Default casting behavior. This condition also serves to generate the correct tooltip.

#showtooltip
/cast [@mouseover,harm,nodead] [harm] [@mouseovertarget,harm,nodead] [@targettarget,harm,nodead] [] SPELL

CVar Toggle

Macro for toggling a 0/1 CVar on and off. Replace CVAR_NAME with the CVar you want to toggle.

/run local k,v = "CVAR_NAME" v = C_CVar.GetCVar(k) C_CVar.SetCVar(k, 1 - v) print(k .. (v == "1" and " Disabled" or " Enabled"))

World Marker Spam

This macro is > 255 chars. I recommend using it with BindPad.

Click to set world markers, shift click to clear.

/cwm [mod:shift] 0
/run local b=_MB or CreateFrame("Button", "_MB", nil, "SecureActionButtonTemplate")  _MH=_MH or(b:SetAttribute("*type5","macro")or SecureHandlerWrapScript(b,"PreClick",b,'Z=IsShiftKeyDown()and 0 or(Z or 0)%8+1 self:SetAttribute("macrotext5","/wm [@cursor] "..Z)'))or 1
/click _MB Button5

This variant is <255 but uses ActionButton8 for the macro.

/cwm [mod] 0
/run local b=ActionButton8 _MH=_MH or(b:SetAttribute("*type5","macro")or SecureHandlerWrapScript(b,"PreClick",b,'Z=IsShiftKeyDown()and 0 or(Z or 0)%8+1 self:SetAttribute("macrotext5","/wm [@cursor] "..Z)'))or 1
/click ActionButton8 Button5

Class Specific Macros

Death Knight

Raise Ally

#showtooltip
/cast [@mouseover,help,dead] [] Raise Ally

Demon Hunter

Alt: Spectral Sight
Default: Consume Magic

#showtooltip
/cancelaura Spectral Sight
/cast [mod:alt] Spectral Sight; [@mouseover,harm,nodead] [] Consume Magic

Druid

Dead: Rebirth
Harm: Soothe
Default: Nature’s Cure/Remove Corruption

#showtooltip
/cast [@mouseover,help,dead][help,dead]Rebirth;[spec:4,@mouseover,help,nodead]Nature's Cure;[@mouseover,help,nodead]Remove Corruption;[@mouseover,harm,nodead][harm]Soothe;[spec:4]Nature's Cure;Remove Corruption

Hunter

Shift: Revive/Mend Pet
Alt: Misdirection
Default: Tranquilizing Shot

/cast [mod:shift,@pet] Revive Pet; [nomod,@mouseover,harm,nodead] [nomod] Tranquilizing Shot; [@focus,help,nodead] [@mouseover,help,nodead] [help] [@pet,exists] [] Misdirection

If you want to be absolutely certain it perfectly falls back, use this version instead. It just excludes the possibility of mouseover or focus not in your group

#showtooltip
/cast [mod:alt,@pet] Revive Pet; [@focus,help,group] [@mouseover,help,nodead,group] [help,group] [@pet,exists] [] Misdirection

Mage

Harm: Spellsteal
Default: Remove Curse

#showtooltip
/cast [@mouseover,help,nodead] Remove Curse; [@mouseover,harm,nodead] [harm] Spellsteal; Remove Curse

Monk

Alt: Healing Elixir/Diffuse Magic/Dampen Harm
Help: Detox
Harm (WW): Touch of Karma

#showtooltip
/cast [mod:alt,spec:1,talent:5/2] [mod:alt,spec:2,talent:5/1] Healing Elixir;[mod:alt,talent:5/2] Diffuse Magic;[mod:alt,talent:5/3] Dampen Harm;[@mouseover,help,nodead] Detox;[spec:3,@mouseover,harm,nodead][spec:3,harm] Touch of Karma;Detox

Paladin

Shift: Blessing of Protection
Alt: Blessing of Freedom
Default: Cleanse Toxins/Cleanse

#showtooltip
/cast [mod:shift,@mouseover,help,nodead] [mod:shift] Blessing of Protection; [mod:alt,@mouseover,help,nodead] [mod:alt] Blessing of Freedom; [spec:1,@mouseover,help,nodead] [spec:1] Cleanse; [@mouseover,help,nodead] [] Cleanse Toxins

Priest

Alt: Mass Dispel
Harm: Dispel Magic
Default: Purify Disease/Purify

#showtooltip
/cast [mod:alt] !Mass Dispel; [spec:3,@mouseover,help,nodead] Purify Disease; [@mouseover,help,nodead] Purify; [@mouseover,harm,nodead] [harm] Dispel Magic; [spec:3] Purify Disease; Purify

Rogue

Alt: Crimson Vial
Outlaw: Grappling Hook
Default: Shadowstep

#showtooltip
/cast [mod:alt] Crimson Vial; [spec:2,combat,@cursor] [spec:2] Grappling Hook; [@mouseover,exists,nodead] [] Shadowstep

Shaman

Harm: Purge
Default: Purify Spirit/Cleanse Spirit

#showtooltip
/cast [spec:3,@mouseover,help,nodead] Purify Spirit; [@mouseover,help,nodead] Cleanse Spirit; [@mouseover,harm,nodead] [harm] Purge; [spec:3] Purify Spirit; Cleanse Spirit

Warlock

Shift (Felhunter): Devour Magic
Alt: Unending Resolve
Dead: Soulstone
Default: Command Demon

#showtooltip
/cast [mod:shift,pet:Felhunter/Observer,@mouseover,harm,nodead] [mod:shift,pet:Felhunter/Observer] Devour Magic; [mod:alt] Unending Resolve; [@mouseover,help,dead] [help,dead] Soulstone; [@mouseover,exists,nodead] [] Command Demon

Warrior

Alt (Prot): Spell Reflection
Default: Heroic Throw

#showtooltip
/cast [mod:alt,spec:3] Spell Reflection; [@mouseover,harm,nodead] [harm] Heroic Throw

Other Resources

51 Likes
Just discovered Macros
Macros: Essential Information
Harm/Help Mod/Nomod macro help - Understanding
Macro with Mod:shift & mouseover
Macro Help (Monk - Enemy/Friendly)
1 Macro 2 Spells
Macro Help; Targets and Whispers
CLASSIC WoW Macro
Targeting help?
On Use Trinket with Target Reticle Macro?
Druid ultimate macro help
Disc Priest Mouseover Macro Doesn't Work
Hybrid Mouseover Macro?
Kick macro
Shadow Priest macro
Swiftmend Bear Form Macro
Holy Priest Renew macro help
Classic warrior macro help
Healing mouseover macro
Is there a way to macro Heart Essences?
Cast only if not channelling
No Channeling Macro
Combining [harm][@targettarget] macro and [nochanneling:xxx] macro into one macro
Holy Shock mouseover macro help needed
Heart essence macro and passive majors
Are there any good mage macros?
Ez Healing Macro
Advanced Warlock Macro (Pls help!)
Bag of tricks macro help
Using Shift mod with Ground-Targeted Spells
Grid + Clique and Well of existence/refreshment
Macro for Heart Essence
Help with RoF + Shadowfury macro
A few shaman specific macros (Fixed!)
Purge (enemy) / Purify Spirit (friendly) macro
Macro to change action bars for friendly / enemy targets
Mouseover heal/harm No Target Cast On Self
Help with Cleanse Spirit/Purge Macro
Disc priest macro help
Need mage Fire Blast explosion macro
Mouseover Macro Help
Feral Druid Macros
Help/harm macro
Mouseover macro for beta
Healing macro issues
Mouseover sheep, add set focus
Did they break Mouseover Macros?
Please help me make this Priest macro shorter
Healing in WoW - Spell Bloat - Addons
Mouseover Conditionals
Probably an easy macro?
Help Understanding Focus
Purify and Rapture Mouseover Macros
Can this macro be made?
Help/harm mouseover macro help!
Mouseover and interrupt macro
Help Harm Form Macro
Feral Druid Macros
Beacon macro not working
Struggling with too many keybinds on your Priest?
Combining Macro
Mouseover changes in 9.1?
Druid Macro, help harm mouseover modifier
Macro Help: help/harm with self/focus
Macro Help: help/harm with self/focus
13 year player first time keybinder/macro
Mouseover Help Harm Macro?
Help Harm with Alt Modifier [help]
Harm/Friendly Macro
TBC Pally Righteous Defense Maco Help
Talent Conditional Tooltip & cleanup
Lifebloom: Mouseover or Self on Modifier?
Holy Shock macro
Purify Dispel macro with alt to self Purify
Macro Help
Macros sssss
Beacon on Harm's targettarget
Binding To Hover Heal, Or Damage
[Macro Help] cast on hostile mouseover if available, otherwise target
In need of a Regrowth mouseover macro
Macros: Essential Information
Special help/harm macro help
Help/harm focus macro with modifiers
Hibernate/Soothe Macro
Official Manual for Macos
@mouseover AND nomod possible?
Intervene/Charge Macro
Macro plz!
Torment Mouseover Macro
Are there macro conditions: warmode and pvp talents?
Macros: Condensing Your Physical Keys
Racial Macro for Mercenary?
Plz help, shift macro dependent on talent
Nectrotic Strike Macro help (PVP Talent)
Macro Help: NS & Regrowth
Question on how /stopmacro works for this particular macro
Adding Hamstring to Macro help
Mouseover Resurrection / Rocket Jump macro help
Tank marking macro w/ focus/focus clear
Is it possible to have Regrowth and Rake in a single macro?
Mouseover question
Best way to remove buffs in dungeon runs
Macro for mouseover and click?
Healer's Macro Nightmare
[Macro]Spec conditional help
Pvp talent 3 macro?
Is there a #showtooltip conditional?
Advanced Warlock Macro (Pls help!)
Please help with this macro:
Macro for healer; only cast on enemy
Frost Mage PvP Macros
PVP talent conditonal
Thorns Macro for Teammate + Target's Target
Simple question with targeting mob with two names
SOLVED: Quick question about the [mod:___] part of a macro, and if what I'm looking for is possible
Target Macro Options?
Purify Spirit @mouseover not working
Double/Triple Castsequence Macro help. (Disc Priest)
Macro that changes depending on talent selected. also changes to different skill when press shift
Shift Macro only Works when in combat
Macros: Essential Information
Harm/Heal Mouseover Macro
Dynamic icons depending on talent
Battle rez/rez/heal macro
Macro not working
Is there a way to add a "self cast" to this macro?
Banish macro plz
Combo monk macro for all 3 specs?
Is there a way to do PVP talent conditionals in macros? (using GetSpellInfo)?
Innervate mouse over macro?
Mouse-Over and Myself
Is there an add-on or macro to turn sound on and off?
Holy Priest macro question
Macro Help for heal targetoftarget
Warrior Charge Macro
Can We Talent Macro Like Before?
Help/Harm macro for healers?
Evoker Emerald Blossom and Naturalize/Expunge macro
Macro for summoning DF mount or regular flying?
[mod:shift] into another macro help
Macro for summoning DF mount or regular flying?
Here it is
Mouseover heal.. but if no mouseover auto self-cast? Possible?
Simple Dragon riding or no macro?
Help/Harm Macro with No Target
Henlu~! Harm/Heal macro, not mouseover
MO Growl Target, not back to last target if dead
Cast @cursor macro not working
Paladin Macro
Help with macro please
Basic Harm macro not working?
Cant cast healing spell without party member targeted
[UPDATED JANUARY 24] Dragonflight: 10.0.5 Content Update Notes
Blizzard said they would "prefer that healers spend their time healing" during an interview with Morgan Day
Focus Cast Key for just one button?
I'd like to be able to insta cast area spells on target
Need help with a weird macro
Target a target, focus it and then target another target?
@mouseover, harm macro
Macro for travel form in old zones. Dragon mount in new zones
Macro bug? Customer Support directed me here
I need assistance adding a feature to my macro
Druid Battle Rez/Innervate macro
Classic - power word shield macro
Nomod mouseover, alt for selfcast?
Mouseover click macro?
Concentrated Flame Macro Self Heal
Macro with a modifier key AND changes spell based on spec or spell known?
Mouseover Macro Issue - Classic
Help with macro
Druid Macro help
Need Help DH flame macro
Cast ranged aoe on self?
Wild Charge Mouseover
Self targeting
Macros: Condensing Your Physical Keys
Consoleport reticle casting help
Purify - Mass Dispel Macro
Target of Target BoP
Angelic Feather
[Classic] Need Help with Auto-Attack Macro and target-of-target macro for healing!
Help / Harm macro
Targets-Healing previous target?
IF/ELSE macro
Help/Harm Macro with vuhdo
Stopspelltarget question
[SOLVED] Macro Help with Help/Harm
Nice UI + Mouseover healing addons?
Mouseover + switch based on target?
Effective use of my free heal
Getting frustrated - help please!
Need Macro Help - occasionally cast on self
Spirit of Preservation mouseover
Console Port Reticle Casting
Dispel / Interrupt Macro
Classic - sad to not be able to script downranking ='(
Mouseover macro
Regrowth Mouse Over Heal
Need mouseover and current target macro
Mouseover macro
Heal harm macro w/ mods
Mouse over macro that prioritazes me when I don't mouse over anyone?
I broke this Macro
Macro for Spirit of Preservation
Need help with macro
Macros help
Purify Friendly Dispel Magic Enemy Macro
Help with understanding a macro
Targeting previous target
#showtooltip
/cast [mod:alt,@pet]Revive Pet;[@focus,help,group][@mouseover,help,group][help,group][@pet,exists][]Misdirection

Misdirection cannot be cast on anyone not in your group (party or raid, doesn’t matter). Written your way, it would block misdirecting to your pet outside of groups if you had a helpable focus, mouseover, or target. Best to be explicit with that unless your intent is to disable Misdirection outside of groups.

Misdirection

5 Likes

Worst case it displays the hand so you can select your Misdirection target. I personally can’t think of a plausible situation where you’ll have your focus set to an ally who’s not in your party and Hunter’s aren’t exactly known for mousing over allies to cast on them.

But yes, if you do want to ensure everything falls back perfectly in 100% of situations then the group condition is advisable.

1 Like

Converted it to a Wiki… let’s see how this works.

2 Likes

I frequently set my focus to any tankish toon in world boss fights.

Because of how my macros are coded, that suppresses my pet’s Growl (that part of my macro doesn’t care if the focus is grouped with me or not - if I have a tank or tank-designate - as indicated by something friendly and alive being in my focus - no autocast on Growl).

Because my focus is not in my group and because I coded it correctly, Misdirection drops to my pet (instead of not being cast at all).

1 Like

Updated the markdown of the macros so they don’t try to render as JavaScript

1 Like

Added Heart Essence macro

1 Like

Wouldn’t this be the same as

#showtooltip
/cast [nochanneling] SPELL

Yes, in that exact example. The stopmacro version allows you to include whatever condition payload you want on the cast without having to duplicate nochanneling:spell each time.

Ah cool, that will be really useful for cleaning up some of my macros, thanks!

I hope this won’t be considered a necro…
For reticule-targeted spells, I’ve taken to using a format like this:

#showtooltip
/stopspelltarget
/cast [mod:alt,@player][mod:ctrl][@cursor]Rain of Fire

I’ve bound a slot on my bars to the F key for spells targeted with a reticule so for me Alt-F casts the spell at my location, Ctrl-F brings up the targeting reticule, and F (without a modifier) casts the spell at the cursor’s location. If I’m confident in the spot I’ll just hit F; but if I want some help placing it I’ll hit Ctrl-F, move the reticule to where I want it, then hit F (without a modifier) to fire it off.

Very similar to Elvenbane’s format (in fact I may have stolen it from one of his posts a couple years ago) so I thought I’d bring it up here in this post.

2 Likes

Is there any ways to make a Soulstone macro that rez and b-rez on mouse over ? because I tried everything I was able to find, and it doesn’t work. Keeps telling me " Your target is dead "

#showtooltip
/cast [@mouseover,help,dead] [] Soulstone
1 Like

Excuse me Mr. Bane, but is there a way to not cast a spell if you are channeling 2 of 3 channeled spells, but cast the spell if you are casting the 3rd channeled spell?

[this, and this]
[this] [or this]
/stopmacro [channeling:spell1] [channeling:spell2] [channeling:spell3]
/cast whatever
1 Like

omg…lol…just toying around with a lot of crap I didnt know I could do with macros.
Can we get the character cap bumped up to 300 or 350 maybe, without using an addon?

@Elvenbane I love you. Metaphorically speaking, of course.

1 Like

@Elvenbane, thanks for all the great info. This post has been very helpful.

I have a macro that doesn’t seem to be working quite right and I was hoping you could help.

Here is what I would like it to do.

If I am mouseover friendly cast heal spell, if I am mouseover enemy kick, if my current target is enemy kick, if my current focus target is enemy kick, otherwise cast heal on me.

For the kick I would like to have a preferred order if possible, focused, mouseover, current target.

Here is what I have now.

/cast [@mouseover,help,nodead]Vivify;[@mouseover,harm,nodead][harm]Spear Hand Strike;[@focus,harm,nodead]Spear Hand Strike;Vivify