Summon Random Companion Macro?

Forum rules
Be respectful of others or else. Read the details.
User avatar
Agravaine
Expert Hunter
Expert Hunter
Posts: 333
Joined: Tue Jan 05, 2010 3:36 pm
Realm: Bleeding Hollow
Location: Lost-Hope

Summon Random Companion Macro?

Unread post by Agravaine »

The pet battle system has borken this simple macro:

/run SummonRandomCritter();

I used the following instead since it called a random new one every time I went through a loading screen, but it's broken too:

/run CallCompanion("CRITTER", random(GetNumCompanions("CRITTER")))

Both of them now return the message "You do not have a pet."

Anyone know what the new syntax / variables are? I'd hate to think it's no longer possible to summon a random companion...

Image

User avatar
Agravaine
Expert Hunter
Expert Hunter
Posts: 333
Joined: Tue Jan 05, 2010 3:36 pm
Realm: Bleeding Hollow
Location: Lost-Hope

Re: Summon Random Companion Macro?

Unread post by Agravaine »

Got it! It was on the WoW Macro and UI forum:

/run local t,o=C_PetJournal.GetNumPets(false);local p=C_PetJournal.GetPetInfoByIndex(random(o),false);C_PetJournal.SummonPetByID(p)

Haven't tried it yet myself, but the algorithm seems to make sense. Good old f(x)=f(g(x))! :geek:

Image

Post Reply