Useful Macro Templates

Self Cast Key Bug

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 modifiers with those types of macros, you need to ensure your Self Cast Key is set to None (even if your Self Cast is set to Auto).

More info on the issue:

Season of Discovery Rune Placeholder Spells

With Season of Discovery, Blizz has added a number of placeholder spells you can use that will dynamically update depending on the rune you’ve selected. You can use these in combination with any conditions like you would with normal spells.

#showtooltip
/cast Legs Rune Ability
#showtooltip
/cast Hands Rune Ability
#showtooltip
/cast Chest Rune Ability

General Macro Templates

Ping Macro - 10.1.7

Pings your mouseover, if you have one, otherwise pings the ground at your cursor. The default keybind doesn’t support the mouseover of frames but this does.

/ping [@mouseover,harm] Warning; [@mouseover,help] Assist; [@mouseover,exists] Ping
/stopmacro [@mouseover,exists]
/ping

Universal 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

Helpful Mouseover Macro

Cast a helpful spell prioritizing mouseover.

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

Harmful Mouseover Macro

Cast a harmful spell prioritizing mouseover.

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

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

Help/Harm Macro

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

HELP_SPELL as Default

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

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

Note: Keybinds take priority over macro modifiers. By default SHIFT 1-6 are bound to Action Page 1-6 and CTRL 1-6 are bound to your pet bar. You’ll need to unbind any conflicts to use them as macro modifiers.


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

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

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

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

Dynamic GetSpellInfo Macro

This has been supplanted by the known condition in Retail but you may still need it in Classic. You can add whatever conditions you want to the cast lines.

#showtooltip
/cast SPELL1
/cast SPELL2
/cast SPELL3
/run local G=GetSpellInfo SetMacroSpell(GetRunningMacro(), G"SPELL1" or G"SPELL2" or G"SPELL3")

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

WeakAura Version; doesn’t break if you don’t use it while out of combat first:
https://wago.io/WLcXW-0JN

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

Click to set world markers, shift click to clear.
Note: You need to be out of combat the first time you press it or it will throw an error.

/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 Utility Macros

Death Knight

Alt: Lichborne
Help: Raise Ally
Default: Raise Dead/Gnaw

#showtooltip
/cast [mod:alt] Lichborne; [@mouseover,help,dead] [help,dead] Raise Ally; [spec:3,nopet] Raise Dead; [spec:3,@mouseover,harm,nodead] [spec:3] Gnaw

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

Evoker

Shift: Rescue
Alt: Cauterizing Flame
Default: Naturalize/Expunge

/cast [mod:shift,known:370665,@mouseover,help,nodead][mod:shift,known:370665]Rescue;[mod:alt,known:374251,@mouseover,help,nodead][mod:alt,known:374251]Cauterizing Flame;[spec:2,@mouseover,help,nodead][spec:2]Naturalize;[@mouseover,help,nodead][]Expunge

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

Alt: Alter Time
Harm: Spellsteal
Default: Remove Curse

#showtooltip
[mod:alt] Alter Time; [@mouseover,help,nodead] Remove Curse; [@mouseover,harm,nodead] [harm] Spellsteal; Remove Curse

Monk

Alt: Diffuse Magic
Shift: Dampen Harm
Help: Detox
Harm (WW): Touch of Karma

#showtooltip
/cast [mod:alt] Diffuse Magic; [mod:shift] Dampen Harm; [spec:3,@mouseover,harm,nodead] Touch of Karma; [@mouseover,help,nodead] [help] Detox; [spec:3,harm] Touch of Karma

Paladin

Dead: Intercession
Default: Cleanse Toxins/Cleanse

#showtooltip
/cast [@mouseover,help,dead] [help,dead] Intercession; [spec:1,@mouseover,help,nodead] [spec:1] Cleanse; [@mouseover,help,nodead] [] Cleanse Toxins

Priest

Shift: Mind Soothe
Alt: Mass Dispel
Harm: Dispel Magic
Default: Purify Disease/Purify

#showtooltip
/cast [mod:shift] Mind Soothe; [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

Shift: Crimson Vial
Alt: Shiv
Default: Grappling Hook/Shadowstep

#showtooltip
/cast [mod:shift] Crimson Vial; [mod:alt] Shiv; [known:36554,@mouseover,exists,nodead] Shadowstep; [known:195457,@cursor] Grappling Hook; [known:36554,exists] Shadowstep

Shaman

Harm: Greater Purge/Purge
Default: Purify Spirit/Cleanse Spirit

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

Warlock

Alt: Unending Resolve
Dead: Soulstone [overly complex due to Blizz bugs]
Default: Command Demon

/cqs [@mouseover,help,dead] [help,dead]
/target [@mouseover,help,dead]
/cast [mod:alt] Unending Resolve; [@mouseover,help,dead] [help,dead] Soulstone;  [@mouseover,exists,nodead] [] Command Demon
/targetlasttarget [@mouseover,help,dead]

Warrior

Alt: Spell Reflection
Shift: Shattering Throw
Default: Heroic Throw

#showtooltip
/cast [mod:alt,known:23920] Spell Reflection; [mod:shift,known:64382,@mouseover,harm,nodead] [mod:shift,known:64382] Shattering Throw; [@mouseover,harm,nodead] [] Heroic Throw

Other Resources

57 Likes
#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