Tuesday, September 4, 2012

Random Pet Summoning Macro

Since the patch, old macros to summon random companions stopped working. For players like me, who just can't choose one pet to have at their side yet would still like one, any one of them, this was terrible news. I had to do without for a while, but it got to a point where I started considering an addon.

Thankfully, Lysi of WarcraftPets stumbled onto a script that can be used in a macro to summon a random companion. Yay!
/run local t={}for i=1,select(2,C_PetJournal.GetNumPets(false))do tinsert(t,(C_PetJournal.GetPetInfoByIndex(i)))end C_PetJournal.SummonPetByID(t[random(#t)])
This command works just as the previous ones did and will summon a random pet from your collection.

I love being surprised with old and new pets that pop out whenever I use it. :)

Note: The macro mainly works if you don't have any filters on in the Pet Journal UI. Also, if you're typing the text out rather than copy/pasting, the script is one continuous line and there are no breaks.

UPDATE: As of Patch 5.1, the above macro will no longer work. The new macro to summon a random companion or a specific pet can be found here.

9 comments:

  1. There is an add-on called Livestock which will summon a random pet for you - it also will do random mounts (ground or flying). I think it's been updated for the patch.

    ReplyDelete
    Replies
    1. @Sephrenya: Thanks, if the macro to summon a random pet ever stops working again, I'll check this addon out. :)

      Delete
  2. Yay, macro works. thanks for passing this along! I don't like installing actual addons if I can help it. :)

    ReplyDelete
  3. :( Trying to run this, but I just end up "saying" the last 3 lines (starting w/ i=1)in chat. Any idea what I'm doing wrong?

    ReplyDelete
    Replies
    1. @Anonymous: Are you typing it out the way it looks on my blog? If so, that could be the problem since it looks like the "i=1" starts on a new paragraph when it's not. The entire command is one long continuous sentence and is not broken up despite the way it looks in this post.

      Try highlighting the entire script (starting from /run) and then copying/pasting it.

      Delete
  4. Hey thanks for the reply! I guess I'm a bit of a noob w/ macros. I can't ever copy or paste into the macro box, but I did get it to work just re-typing. Thanks again, and I always enjoy your site:)

    ReplyDelete
  5. Replies
    1. @Thetaobera: Yup, this post is outdated. As of patch 5.1 there are three simpler macros that you can use. I've outlined them here.

      Delete

Creative Commons License
Perks N Peeves by Quintessence is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.