Useful macros
Macro commands

General guides

Beginner's guide
Making a macro
Wiki Formatting
UI Customization

Class Macros

IconSmall Deathknight IconSmall Druid IconSmall Hunter IconSmall Mage IconSmall Monk IconSmall Paladin
IconSmall Priest IconSmall Rogue IconSmall Shaman IconSmall Warlock IconSmall Warrior

Formatting Macros Edit

Note: Commands for some of the older macros have been modified significantly. Where possible, please validate and mark with last working patch or version number.

When editing a macro on the Wiki please:

  • name it, describe what it does, and use a 'space' before each command for the 'code box'
  • note the version of WoW that you tested it in
  • if moving from another page, remove it from the old page
  • follow this Macro formatting example:
==== Macro Name ====
 /y Hooray, I made a macro!
* Use: This yells, "Hooray, I made a macro!"
* Works in 5.4.2
which creates:

Macro Name Edit

/y Hooray, I made a macro!
  • Use: This yells, "Hooray, I made a macro!"
  • Works in 5.4.2

Outdated MacrosEdit

The macros below this line have not been validated to work in 3.1 or later. Use at your own risk.

Smart mount with modifierEdit

/run C=CallCompanion if(not IsMounted())then if(((GetZoneText()=="Dalaran")and(GetSubZoneText()~="Krasus' Landing"))or(GetZoneText()=="Wintergrasp")or not IsFlyableArea()or IsModifierKeyDown())then C("MOUNT",X)else C("MOUNT",Y)end end
  • Use: This will use your flying mount in any area that you can actually fly in (i.e. not in Dalaran city or Wintergrasp) or otherwise use your ground mount. If you want to use your ground mount in a flyable area all you have to do is hold down a modifier key (Ctrl/Alt/Shift) while using the macro. Replace X with the number of your ground mount and Y with the number of your flying mount.
  • Works in 3.1.1.

Random vanity petEdit

  • NEW* Use "CRITTER" in place of "MOUNT" to randomly select vanity pets.
/run CallCompanion("CRITTER", random(GetNumCompanions("CRITTER")))

Version which announces which pet is coming:

/script t="CRITTER"i=random(GetNumCompanions(t))c,n=GetCompanionInfo(t,i)SendChatMessage("Come out, "..n)CallCompanion(t,i)

And to dismiss your pet:

/run DismissCompanion("CRITTER")

One-button version (hold down alt/shift/control to put away pet, otherwise summon a random one):

/run if (not IsModifierKeyDown()) then CallCompanion("CRITTER", random(GetNumCompanions("CRITTER"))) else DismissCompanion("CRITTER") end

Random titleEdit

/run for i=1,(GetNumTitles()*2) do t=random(GetNumTitles())  if IsTitleKnown(t)==1 then SetCurrentTitle(t) break end

This macro will randomly choose one of your titles, which can be easily combined with a random vanitiy pet macro.

Outland Flying/Azeroth Ground MountEdit

/cast [flyable, nomounted] Swift Green Wind Rider
/cast [noflyable, nomounted] Black War Raptor
/dismount [mounted]

This will call your flying mount in Outland/Northrend, and your ground mount everywhere else. Works with 3.0.2. Replace mount names with the names of your mounts. The easiest way to do this is to open your mount pane and then shift click each mount into the macro. This does not work in Northrend

Fly where possible, ground mount elsewhereEdit

/run if IsMounted() and not IsFlying() then Dismount() return end local t if (IsFlyableArea() and (GetRealZoneText()~='Dalaran' or GetMinimapZoneText()=="Krasus' Landing")) then t={4} else t={3,2} end CallCompanion("MOUNT",t[random(#t)])

(write it all in one line)

This will detect if the zone is flyable or not and summon a random mount accordingly. If you're in Dalaran, the flying mount will only be summoned at Krasus' Landing. In the example, my flying mount is 4, my ground ones are 3 and 2, the number stands for the order in your mount tab starting from 1. If you're flying above ground level you won't dismount so to avoid deaths by misclicking.

--Fixed by Allene of Malygos

Fly where possible, ground mount elsewhere (improved)Edit

A variation on the Macro above, with Wintergrasp taken into account (Wintergrasp is reported as a flyable area, but isn't):

/run local z=GetZoneText(),t; if (IsMounted()) then Dismount() return end; if (not IsFlyableArea() or (z=="Dalaran" and GetSubZoneText()~="Krasus' Landing") or z=="Wintergrasp") then t={X,Y,Z} else t={F} end CallCompanion("mount", t[random(#t)])

Remember to replace {F} with the index of your flying mount and {X,Y,Z} with the indices your ground mounts.

--Gromm of Stormreaver

Smart Random MountEdit

/run if (not IsMounted()) then local t={x,y,z,...} CallCompanion("MOUNT", t[random(#t)]) else DismissCompanion("MOUNT") end

This will call a mount listed at a random index listed within the t array. For instance, if you set t={1,3,5}, this macro will randomly call the mount referenced at index 1, 3, or 5. This macro is useful if you want to call a random type of mount, such as a swift flying mount, or swift ground mount. The down side to this macro is that the list of mounts are alphabetized, so any time you add a new mount, odds are you will have to reindex t. The DismissCompanion call is optional. This macro allows for a greater list of random indices than the macros above, at the expense of the user needing to create two macros - one for ground mounts, and one for flying mounts (obviously, you would also need to know when each one applied).

Mount / HearthstoneEdit

#showtooltip Hearthstone
/use [button:2] Hearthstone
/use [flyable,nomodifier:alt] <flier 1>
/use <mount 1>

This one will make you ride your grounded mount in Azeroth, ride your flying mount in Outland, and Hearthstone on right-click. If you alt+click it, it'll summon your normal mount wherever you are. If you set the macro icon to the Question Mark, it'll also show the Hearthstone icon, cooldown, and tooltip.

Conditionals are common in mount macros that make choices based on your location. You should replace the gray conditionals with ones that best suit your key bindings.

No-dismount flightEdit

/stopmacro [mounted]
/use [flyable] <flier 1>; <mount 1>


/stopmacro [flying,nobutton:2]
/use [flyable] <flier 1>; <mount 1>

The first macro mounts if not already mounted, but does not cause accidental or intentional dismounting.

The second macro will dismount or mount a grounded steed whenever flight is impossible, but prevent flying dismounts unless specifically ordered (in this case, by right-click).

Either macro can give you a preview of what they will do through the icon they display. Set the icon to the Question Mark when copying the macro into your settings.

No automatic dismount either!Edit

/use [button:2] <flier 1>
/console autoDismount 0
/stopmacro [button:2]
/use <mount 1>
/console autoDismount 1

With Patch 2.1.0, Blizzard introduced the ability to automatically dismount in the event that you cast a spell. This is good when on the ground, but dangerously bad for most classes when using a flying mount. While there is a toggle for this in your Interface Options, the above macro will enable auto-dismount when using your ground mount and disable auto-dismount when using your flying mount.

If you are flying, you can no longer cast spells -- The message "You are mounted" is displayed and the casting fails. If you are on the ground (flying or ground-bound mount) you will automatically dismount. (Confirmed as of Patch 2.4)

Mount while movingEdit

There is no way to detect motion in a macro, and any attempt to mount while moving will fail. Therefore, most classes will have to stand still until a mount macro finishes channeling. Dismounting may still occur under any condition.

Exceptional cases are found in Druids' Travel and Flight Forms, and Shamans' Ghost Wolf abilities, which are instant-cast.

It may also be desirable to include an ability that increases speed or otherwise closes distance into a travel macro. If the ability is dependent on a target, like Intervene, put it at the macro's beginning. If the ability is independent but has a cooldown, like Sprint, put it at the macro's end.

Mounts and vanity petsEdit

/targetexact Speedy
/use [noexists]Turtle Box
/stopmacro [noexists]
/userandom [flyable]<flier 1>,<flier 2>;<mount 1>,<mount 2>

This macro will dismount the player, if applicable. It then looks for a vanity pet by name and summons it if the pet is not found. If the pet was already present and the player was on foot, mounting occurs.

While neat, this macro is not without its problems. It's long, and in the version presented here was originally 252 characters. This can be resolved by using item numbers, or you can eliminate the randomization of mounts altogether. Clearing the target is unavoidable as there is no other way to check for a vanity pet: [pet] and [nopet] conditionals only work with combat pets.

Here's a version that will let you keep your old target!

/use [noflying,noexists] item:<ID OF "box" THAT BRINGS OUT YOUR VANITY PET>
/target [target=focus]
/cast [flyable] item:<ITEM ID FLYING MOUNT>;item:<ITEM ID GROUND MOUNT>

Basically what it does additionally to the one above is this: It uses the "focus" target as a buffer to store your old target..once we are done with the check for the vanity pet we can thus restore the old target (and will clean up the "focus" too at that point) To shrink the macro to 255 use itemIDs instead of itemNames! How to grab the itemIDs of your Items

P.S. obviously you'll loose any focus targets you had though...

Druid Pre-Swift Flight Form/Post Epic Flying ButtonEdit

This macro is highly useful for druids who have yet to get their Swift Flight Form, but have bought their 300 riding skill and an epic mount. This mount macro will load your flyer if you're in Outland, your Swift Mount when in Azeroth, and while flying, will dismount and switch to Flight Form instantly. This allows the Druid to quickly switch to Flight Form in order to use a gathering profession with the added ability of being able to fly away if aggro is gained.

#showtooltip [flyable,mounted]Flight Form;[flyable]<flying mount>[noflying]<Ground Mount>
/use [nomounted,flyable]<flying mount>;[nomounted,noflyable]<Ground Mount>
/stopmacro [nomounted]
/dismount [flyable,mounted]
/cast [flyable] Flight Form

Equip and Unequip Riding Gear depending on locationEdit

/equip [mounted] item:30449; [indoors] item:30449; item:25653
/equip [mounted] item:29369; [indoors] item:29369; [flyable] item:32538
/use [flyable,nomounted] item:25471; [nomounted] item:29471
/dismount [mounted]

This macro completes four tasks. Line 1 equips your combat trinket if mounted, equips your combat trinket if indoors (for those times when you run inside and auto dismount), otherwise it equips your riding crop. Line 2 equips your combat cape if mounted, equips your combat cape if indoors, or equips your slowfall cape if you're in a flyable zone. Line 3 uses your flying mount if you're in a flyable zone or otherwise uses your ground mount. Line 4 dismounts you if you're mounted.

DK mount castEdit

/cast [nomount] Acherus Deathcharger; [mounted] Path of Frost
/cast [mod:shift] <2nd mount here>
/cast [mod:ctrl] <flying mount here>
/dismount [mod:alt]

Or, if you'd like to keep it rather simple:

/cast [nomod] Acherus Deathcharger
/cast [mod:shift] <2nd mount here>
/cast [mod:ctrl] <flying mount here>
/cast [mod:alt] Path of Frost
  • Credit: Corruptedone of Baelgun (Blackninja)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.