Macros can quite literally change the way you play. Macros in World of Warcraft can consolidate your action bar, give you additional information, or make your efforts easier.
To get started, consider these two tips:
2 things that may be in all of your macros:
#showtooltip
#showicon
Basic food macro to get you started.
/use [btn:1] [Water Name]
/use [btn:1] [Food Name]
The rest of the options below barely scratch the surface. These are some of the macros I have tested. Learn by example and configure to your needs.
Table of Contents
General
Coordinates (Positioning)
/script X,Y=GetPlayerMapPosition("player");DEFAULT_CHAT_FRAME:AddMessage(string.format("[%s] %.1f, %.1f",GetZoneText(),X*100,Y*100));
/run px,py=GetPlayerMapPosition("player"); DEFAULT_CHAT_FRAME:AddMessage(format("(%s) %.2f, %.2f",GetZoneText(),px*100,py*100));
Equip Main Gear
/equipslot 16 item:44444:3333
/equipslot 17 item:44444:3333
/equip [HELM]
/equip [CLOAK]
NOTE: Replace 44444 with your weapon id or Weapon name. Replace 3333 with your weapon's enchantment id (only if you used weapon id in the first part or if you use 2 of the same weapons with different enchantments). Replace [HELM] with your helm name. Replace [CLOAK] with your cloak name.
List Equipped Gear By ilevel
/run t={}; for i=1,18 do if i~=4 then l=GetInventoryItemLink('player',i); if l then _,_,_,v=GetItemInfo(l); table.insert(t,{l=l,v=v}); end end end sort(t, function(a,b) return a.v>b.v end ) for i,v in pairs(t) do print(v.v..' '..v.l); end
Print Money and Currencies to Chat Frame
/script local cu = GetMoney(); print(GetCoinTextureString(cu,"12"))
/stopmacro [btn:1]
/script yy = GetNumWatchedTokens(); for xx = 1, yy,1 do aa, bb, cc, dd, ee = GetBackpackCurrencyInfo(xx); print(bb, aa) end
Print Target’s Largest Sum of Money
/run if not zb then zb=CreateFrame("Frame") zb:RegisterEvent("INSPECT_ACHIEVEMENT_READY") zb:SetScript("OnEvent",function()print(UnitName("target").." ("..UnitLevel("target")..") "..GetComparisonStatistic(334))end)end SetAchievementComparisonUnit("target")
NOTE: Remove the spaces before the zb:RegisterEvent and zb:SetScript function in game.
Gender of Target
/run local x=UnitSex("target");local g={"n unknown!", " boy!", " girl!"} n=GetUnitName("target");if IsShiftKeyDown()then SendChatMessage(n .." is a" ..g[x],"SAY");else print(n .." is a" ..g[x]);end
Sell Grey Items and show Profit
/run local p,N,c,n=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do n=GetContainerItemLink(b,s) if n and string.find(n,"9d9d9d") then N={GetItemInfo(n)} c=GetItemCount(n) p=p+(N[11]*c)UseContainerItem(b,s) print(n) end end end print(GetCoinText(p))
Swap Equipment and Talents
/equipset [spec:1] [Primary Set Name] ; [Secondary Set Name]
/usetalents [spec:1] 2; [spec:2] 1
Show/hide Cloak
/run ShowCloak(not ShowingCloak())
Show/hide Helm
/run ShowHelm(not ShowingHelm())
Parties/Raids
Experience Announcer to Party
/script local e=UnitXP("player"); local m=UnitXPMax("player"); local b=m/20; local rba=floor((e/b)*10+0.5)/10; local rbb=floor((20-(e/b))*10+0.5)/10; SendChatMessage("I am "..rba.." bars into "..UnitLevel("player").." ("..rbb.." bars left)","PARTY",nil);
Reload UI With Alert
/afk Reloading UI
/run SendChatMessage("Reloading my UI...", ((UnitInRaid("player")and "RAID")or(GetNumPartyMembers()>0 and "PARTY")or "AFK"));
/reload
Target Tank’s Target
/target [target=focustarget, harm, nodead]
Mounts and Pets
Mounts
Mount Up
#showtooltip Purple Riding Nether Ray
/use [flyable, nomounted] Purple Riding Nether Ray
/use [noflyable, nomounted] Black War Bear
/dismount [noflying, mounted]
/dismount [mod:alt, mounted]
Mount Yak and Eject
#showtooltip
/cast [btn:1] Grand Expedition Yak()
/stopmacro [btn:1]
/script EjectPassengerFromSeat(1)
/script EjectPassengerFromSeat(2)
NOTE: Use left mouse button to mount and right mouse button to eject your passengers.
Pets
Summon Random Pet
/randompet
Summon Favorite Pet
/rfp
Summon Specific Pet
/summonpet [pet name]
Professions
AIO Professions
#showtooltip
/use [nomod] [Profession 1]; [mod:alt] [Profession 2]; [mod:ctrl] Cooking; [mod:shift] First Aid;
Link Primary Professions
/cast [Profession 1]
/run SendChatMessage(" [Message Here] "..GetTradeSkillListLink(), "channel", nil, GetChannelName("Trade - City"))
/cast [Profession 2]
/run SendChatMessage(GetTradeSkillListLink().." [message 2]", "channel", nil, GetChannelName("Trade - City")) CloseTradeSkill()
Archaeology
Artifacts By Race
/run local s=0;for x=1,9 do local c=GetNumArtifactsByRace(x);local a =0;for y=1,c do local t=select(9, GetArtifactInfoByRace(x, y));a=a+t;s=s+t;end local rn=GetArchaeologyRaceInfo(x);if( c > 1 ) then print(rn..":"..a);end end print("Total:"..s);
Fishing
Ultimate Lure
#showtooltip Glow Worm
/equip Weather-Beaten Fishing Hat;
/use [equipped:Fishing Pole, nomodifier] Glow Worm; [equipped:Fishing Pole, modifier:ctrl] Captain Rumsey's Lager; [equipped:Fishing Pole, modifier:alt] Elixir of Water Walking;
/use 16;
Rogue
Basic Sap and Pick
#showtooltip Sap
#showicon Sap
/cast Sap
/cast Pick Pocket
Legacy
Rogue
New poisons
/use [button:1] Mind-Numbing Poison; [button:2] Wound Poison; [button:3] Instant Poison
/use [button:1] 16; [button:2] 17; [button:3] 18
/click StaticPopup1Button1
New poisons 2
/use [button:1] Wound Poison; [button:2] Deadly Poison; [button:3] Crippling Poison
/use [button:1] 16; [button:2] 17; [button:3] 18
/click StaticPopup1Button1
Old poisons
/use [nomodifier] Deadly Poison VI; [modifier:alt] Crippling Poison II; [modifier:ctrl] Mind-numbing Poison III
/use [button:1] 16; [button:2] 17
Throw/Deadly throw
#showtooltip Deadly Throw
/cast Deadly Throw
/cast [equipped:Thrown] Throw; Shoot