User:Choonster

Item Link
/run SendChatMessage(" First half of message "..select(2,GetItemInfo( ItemID )).." Second half of message ","CHANNEL",nil,GetChannelName("Trade - City")) This will output the following to Trade: First half of message [ItemLink] Second half of message Change  ItemID  to the ID of the item you want to link. ItemIDs can be found on the end of the Armory or Wowhead URL of that item's page.

Random Phrases
/cast Spell /run SendChatMessage(GetRandomArgument(''' "Phrase1","Phrase 2","Phrase 3",etc. ), "ChatTypeId",languageID,"Channel" ''')

Replace the bold/underlined fields with the appropriate values.  "PhraseX"  = "Eat hot lava, creep!", etc. Put as many phrases as you want in here, each contained in quotation marks and separated by commas.  "ChatTypeId"  = Type of Chat  languageID  = languageID or nil for Orcish (Common for Alliance)  "Channel"  = Numeric value of a chat channel for ChatTypeId="CHANNEL" or player name for ChatTypeId="WHISPER"

The last three fields can be omitted if you just want the phrases in /s in Orcish.

Emotes or chat channels:
/equipset [spec:1]sub;throw /run SendChatMessage(1==GetActiveSpecGroupand" Replace this with the message to send while in your primary spec ([spec:1]) "or" Replace this with the message to send while in your secondary spec ([spec:2]) ","EMOTE")

Replace  with any other Chat Type ID if you don't want /e messages. If using a chat channel or whisper, replace the second  in each   with the channel number or name to whisper (name has to be in quotation marks). Replace the emboldened/underlined phrases with the appropriate messages.

Chat Frame Message (only visible to you):
/equipset [spec:1]sub;throw /run print(1==GetActiveSpecGroupand" Replace this with the message to send while in your primary spec ([spec:1]) "or" Replace this with the message to send while in your secondary spec ([spec:2]) ")

Replace the emboldened/underlined phrases with the appropriate messages.

In both macros you can replace  with a different function for a different conditional.

Cooldown Chat Message
/run local S,B,D=" Spell Name "B,D=GetSpellCooldown(S)SendChatMessage(format("%s has %d seconds left on its cooldown.",S,B+D-GetTime)," ChatTypeId ",nil," Channel ")

Duration Chat Message
/run local S,B,C,D=" Spell Name "B,D=GetSpellCooldown(S)C=B+D-GetTimeSendChatMessage(format(C< X  and"%s has %d seconds remaining."or"%s is inactive.",S, X -C)," ChatTypeId ",nil," Channel ")

Cooldown Chat Frame Message (only visible to you)
/run local S,B,D=" Spell Name "B,D=GetSpellCooldown(S)print(format("%s has %d seconds left on its cooldown.",S,B+D-GetTime))

Duration Chat Frame Message (only visible to you)
/run local S,B,C,D=" Spell Name "B,D=GetSpellCooldown(S)C=B+D-GetTimeprint(format(C< X  and"%s has %d seconds remaining."or"%s is inactive.",S, X -C))

Replace the bold/underlined fields with the appropriate values: Spell Name = Name of spell to base message on ChatTypeid = ChatTypeId Channel = Numeric value of chat channel or name of person to whisper (name must be in quotation marks) X = Spell cooldown - Spell duration (in seconds)

Random pet
/randompet

Random favourite pet
/randomfavoritepet OR /rfp

Mount Macros
Indices are explained here.

Completely random mounts
/run local m="MOUNT"if not IsMountedand IsOutdoorsthen CallCompanion(m,random(GetNumCompanions(m)))end

Random mounts from a specified pool
/run if not IsMountedand IsOutdoorsthen CallCompanion("MOUNT",GetRandomArgument(''' i1,i2,i3,i4,etc. '''))end Replace ''' i1,i2,i3,i4,etc. ''' with the indices of your mounts.

Smart random flyer/ground mount
/run local g=GetRandomArgument if not IsMountedand IsOutdoorsthen CallCompanion("MOUNT",IsFlyableAreaand g(''' f1,f2,f3,f4,etc. )or g( g1,g2,g3,g4,etc. '''))end Replace ''' f1,f2,f3,f4,etc.  with the indices of your flying mounts and  g1,g2,g3,g4,etc. ''' with the indices of your ground mounts.

Smart random aquatic/flyer/ground mount
/run if IsOutdoors and not IsMountedthen local g,z=GetRandomArgument,GetRealZoneTextCallCompanion("MOUNT",(z=="Kelp'thar Forest"or z=="Shimmering Expanse"or z=="Abyssal Depths"or z=="Vashj'ir")and IsSwimmingand not IsModifierKeyDownand  s  or IsFlyableAreaand g(''' f1,f2,f3,f4,etc. )or g( g1,g2,g3,g4,etc. ) Replace  f1,f2,f3,f4,etc.  with the indices of your flying mounts,  g1,g2,g3,g4,etc.  with the indices of your ground mounts and  s ''' with the index of your Seahorse (usually 1). This is only useful when you get the Seahorse from Vashj'ir at 80 or above. It also won't fit in a regular macro and as such requires an AddOn like BindPad or Ion that allows for longer macros.

Random companion and smart random flyer/ground mount
/run local g=GetRandomArgument SummonRandomCritterif not IsMountedand IsOutdoorsthen CallCompanion("MOUNT",IsFlyableAreaand g(''' f1,f2,f3,f4,etc. )or g( g1,g2,g3,g4,etc. '''))end Replace ''' f1,f2,f3,f4,etc.  with the indices of your flying mounts and  g1,g2,g3,g4,etc. ''' with the indices of your ground mounts.

Main/Off Hand Weapon Swap Macro
Make an equipment set called  WeaponAMain  with  WeaponA  in your main hand,  WeaponB  in your off hand and all other slots ignored. Make another set called  WeaponBMain  with  WeaponB  in your main hand,  WeaponA  in your off hand and all other slots ignored.

/run UseEquipmentSet(GetItemInfo(GetInventoryItemID("player",16))==" WeaponA ")and" WeaponBMain "or" WeaponAMain ") Replace the emboldened/underlined parts with the appropriate names.

Shaman Weapon Imbue Macro
/use [@none]Imbue Name /use 17 /click StaticPopup1Button1
 * 1) showtooltip

This will enchant your off hand weapon, replace 17 with 16 for the main hand. is the key to this macro, it tells a spell to cast at "no target", bringing up a blue-outline hand cursor that you can then click on something with to cast the spell at it. then acts as if you clicked on your off hand weapon, telling the macro to cast the imbue on it. then clicks the OK button on the confirmation popup. You can use modifiers or mouse buttons if you want to have multiple imbues in the same macro.

Obsolete Macros
To view some of my older macros that are no longer compatible with WoW 5.X, click here