Mount macros / old = Outdated Macros = The macros below this line have not been validated to work in 3 . 1 or later . Use at your own risk . Smart mount with modifier . / 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 / run CallCompanion ( " CRITTER " , random ( GetNumCompanions ( " CRITTER " ) ) ) Random vanity pet . Version which announces which pet is coming : And to dismiss your pet : One - button version ( hold down alt / shift / control to put away pet , otherwise summon a random one ) : Random title . / 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 Mount . / cast [ flyable , nomounted ] Swift Green Wind Rider 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 elsewhere . / 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 ) ] ) 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 ) . A variation on the Macro above , with Wintergrasp taken into account ( Wintergrasp is reported as a flyable area , but isn ' 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 Mount . / 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 / Hearthstone . # showtooltip Hearthstone 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 flight . # showtooltip or 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 ! # showtooltip 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 moving . 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 pets . / cleartarget 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 ! 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 Button . 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 . Equip and Unequip Riding Gear depending on location . / equip [ mounted ] item : 30449 ; [ indoors ] item : 30449 ; item : 25653 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 cast . / cast [ nomount ] Acherus Deathcharger ; [ mounted ] Path of Frost Or , if you ' d like to keep it rather simple :