Page 1 of 1

Summon Random Companion Macro?

Posted: Fri Aug 31, 2012 12:53 am
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...

Re: Summon Random Companion Macro?

Posted: Tue Sep 25, 2012 12:56 am
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: