Page 1 of 1

Is there a way to macro targeting a pet?

Posted: July 31st, 2017, 9:33 pm
by Morlis
I have searched and all signs on this point to no. :cry:

This does not work... /target <companion's name>

I have several reasons why I would like this:

1) Rogue pet Crackers, you have to target him and then /whistle to have him land on your shoulder. If I could macro the target part I could macro this easy. It's a bit of a pain every time you load to a new area he is no longer on your shoulder. I then have to manually find him, click on him, then click (or for a short time I typed out /whistle) the /whistle macro.

2) Sometimes I go through and burn up a bunch of the battle-stones I have collected on various pets that need them. My second account especially since I don't avidly collect pets on that account but still accumulate the stones and pet charms. I go through the list and summon pets that could use the stones and then have to find it target it and then use the stone. They never summon to the same spot, it is randomly dropped pretty much anywhere around you. Worse still is having to close the pet window to find it.

Honestly I do realize that this is ultimately a minor inconvenience, but if there was a way, that would be excellent. I have even consulted the [pet]Wonderous Wisdomball[/pet] and only got a response of "Outlook unclear". :lol:

Also as a side note did you know while Crackers is sitting on your shoulder you can summon a second pet? Only pet that I have tried that didn't work was summoning Crackers again, that made the one on my shoulder vanish.

Re: Is there a way to macro targeting a pet?

Posted: August 1st, 2017, 1:44 am
by Auryona
There is not. The functionality was removed several years ago because addons/macros were using the ability to target pets as conditionals for combat (ie. if "TargetPet" exists, use Spell1, otherwise use Spell2). Companion pets now no longer have unit IDs until they are targeted/focused, and can no longer be summoned in combat.

For Crackers, you could have two macros and do something like:

macro 1:

/summonpet Crackers
/script SetCVar("UnitNameNoncombatCreatureName", 1)

macro 2, press while mouseovering Crackers:

/target [@mouseover,exists]
/script SetCVar("UnitNameNoncombatCreatureName", 0)

(The CVar lines are to toggle critter/companion names, to make it a little easier to see and mouseover.)

For pets in general, I'd recommend turning on critter name plates under options (Interface > names > critters and companions) or macroing the SetCVar lines listed above to make them a easier to see when you're trying to find them.

Re: Is there a way to macro targeting a pet?

Posted: August 1st, 2017, 5:08 am
by Morlis
Thanks for the response Auryona, I vaguely recall being able to use /target on companion pets years ago. I will try the macro you outlined and see how that goes. In my search for a macro solution, I did find that the reason /target was not allowed these days had something to do with combat but not the specifics, so that's a little clearer now, thanks again.