Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:Useful macros
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Vanity Pets === ====Wheel O' Pets==== /run q=C_PetJournal;v={q.GetNumPets()}r=random(v[2])p={q.GetPetInfoByIndex(r)}q.SummonPetByGUID(p[1])SendChatMessage("spins the Wheel O' Pets! The wheel stops on ["..r.."/"..v[2].."]: "..p[8].."!","emote"); * Credit Xaeros of Shadowmoon * Use: Click to summon a random vanity pet. This macro has 49 free characters, so feel free to change your message. By default it says: "[player] <span style="line-height:14px;">spins the Wheel O' Pets! The wheel stops on [[random pet number]/[total pet number]]: [random pet's name]!</span> * Works in 5.4.7 ====Random Pet with Announce==== /run q=C_PetJournal;v={q.GetNumPets()}r=random(v[2])g={"their","his","her"}x=UnitSex("player")p={q.GetPetInfoByIndex(r)}q.SummonPetByGUID(p[1])SendChatMessage("gasps as "..p[8] .." hops out of "..g[x] .." pocket!","emote") * Credit Xaeros of Shadowmoon * Use: Click to summon a random vanity pet. This macro has 33 free characters, so feel free to change your message. By default it says: "[player] gasps as [pet] hops out of [his/her] pocket! (The [his/her] is based on the character's gender) * Works in 5.4.7 ==== Random Pet with Dismiss==== /run DismissCompanion("CRITTER"); CallCompanion("CRITTER", random(GetNumCompanions("CRITTER"))); * Use: This will first attempt to dismiss any vanity pet you have summoned, and then attempt to randomly summon a new one. * Works in 3.1.2 /run local z;for i=GetNumCompanions("CRITTER"),1,-1 do local _,_,_,_,s = GetCompanionInfo("CRITTER",i); if s==1 then z=1;end end if (z==nil) then CallCompanion("CRITTER", random(GetNumCompanions("CRITTER"))) else DismissCompanion("CRITTER") end *Use: This is a more advanced version of the above macro, as it first attempts to determine whether or not you already have a pet summoned. If not, it summons one, else it dismisses it. (Note: There's no IsMounted() equivalent for pets, hence the for loop) * Works in 3.1.2 ==== Summon random pet w/ salutation ==== /run local z;t="CRITTER"u=GetNumCompanions(t)v=random(u)for i=u,1,-1 do local _,_,_,_,s=GetCompanionInfo(t,i);if s==1 then z=1;end end if(z==nil)then c,n=GetCompanionInfo(t,v)SendChatMessage("Wow, it's a "..n)CallCompanion(t,v) else DismissCompanion(t)end * Credit: Strunge 12:55, December 23, 2009 (UTC) ([[User_talk:Strunge|Talk]]) * Use: This is a compact version of the above macro that also sends a chat message stating what pet, you have summoned. All 255 characters are used, so you can only change the text in the SendChatMessage-part to a statement with the same amount of characters. * Works in 3.3
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)