There isn't any. The option to target pets as conditionals for battle was disabled several years ago because addons/macros were using it (ie. if "TargetPet" exists, use Spell1, otherwise use Spell2). Companion pets no longer have unit IDs until they're targeted or focused, and they can't be summoned in combat.
You may have two macros for Crackers and do something like this:
/script summonpet Crackers as a hunter target SetCVar is a variable that you can set ("UnitNameNoncombatCreatureName", 1)
While mouseovering Crackers, hit macro 2:
[@mouseover,exists] /target
/whistle \s/script SetCVar is a variable that you can set ("UnitNameNoncombatCreatureName", 0)
Is there a way to macro targeting a pet?
- Morlis
- Posts:270
- Joined:January 2nd, 2013
- Pet Score:14744
- BattleTag®:Morlis#1799
- Realm:Madoran-us
- Contact:
I have searched and all signs on this point to no.
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".
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.
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".
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.
- Morlis Alliance Kael'Thus 60 Shadow Priest (main account)
- Morlis Horde Madoran 60 Beast Master Hunter (main account)
- Altuno Horde Madoran 60 Vengeance Demon Hunter (main account)
- Vandì Horde Madoran 60 Arcane Mage (alt account)
Re: Is there a way to macro targeting a pet?
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]
/whistle
/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.
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]
/whistle
/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.
- Morlis
- Posts:270
- Joined:January 2nd, 2013
- Pet Score:14744
- BattleTag®:Morlis#1799
- Realm:Madoran-us
- Contact:
Re: Is there a way to macro targeting a pet?
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.
- Morlis Alliance Kael'Thus 60 Shadow Priest (main account)
- Morlis Horde Madoran 60 Beast Master Hunter (main account)
- Altuno Horde Madoran 60 Vengeance Demon Hunter (main account)
- Vandì Horde Madoran 60 Arcane Mage (alt account)
-
- Posts:1
- Joined:February 16th, 2022
- Contact: