Selective Random Battle Pet Macro

UI and Macro
There's a random battle pet macro already. What I'm looking for is a way to make use of the C_PetJournal.SummonPetByID(XXXXXXXX) function to summon a random pet from a short list of, say, three or four or five.
Well if you know the IDs of the pets you want to summon it's very easy to summon one randomly:/run C_PetJournal.SummonPetByID(GetRandomArgument(10101,10101,10101,1000))

Replace the highlighted numbers with the IDs of your desired pets.

To get the ID of a pet in the pet journal list, hover your mouse over its entry and use this:/run local mf = GetMouseFocus() if mf and mf.index then print("The ID of the pet under your mouse is:", (C_PetJournal.GetPetInfoByIndex(mf.index))) else print("Please mouseover a pet in the pet journal list and use this again.") end

Summoning by name is trickier.

Edit: Fixed the second macro.
Thank you, thank you, and a thousand times thank you.
Whoops, I just realised I made a mistake in the second macro. I've fixed it in my original post now.

Join the Conversation

Return to Forum