Warlock Pet attack macro?

The two generic pet macros I have for both warlock and hunter are these:

/petDefensive
/petAttack

and

/petPassive

You can imagine them as “Sic!” and “Heel!”, respectively. These lines can be combined with your main nuke easily, such as:

#showtooltip
/cast Shadow Bolt
/petDefensive
/petAttack

This will ensure every time you press Shadow Bolt, your pet will stop being on passive and will attack what you are shadowbolting. THIS is where you can get into problems as stated above:

Angry wording aside, this is accurate. This is why you need the /petPassive macro above – when you execute /petAttack on a target, you effectively put your target on your pet’s threat table (the way a random mob would have you on theirs). A side effect of this is until combat drops, your pet will assume they need to die eventually, after you’ve killed everything else.

Example:

You have two packs of 3 in the distance during your 5-person dungeon. You target a mob in the first pack (that your tank is fighting) and press your Shadow Bolt macro, and things work right. As that mob is dying, you very briefly tab target the mob in the distance and press Shadow Bolt, but realize immediately that isn’t who you want to attack yet, so you (say) step to the side to cancel the cast, target a mob in the current pack and fight. Your pet veers off the previous attack and goes after who you are now fighting, Great, right? Well, that second mob dies and before you can shadowbolt the third mob, your pet has run off to the second mob you briefly commanded them to attack, and everyone in your group shouts stuff like bruh your pet, what are you doiiiiing etc.

If you ever accidentally /petAttack a mob you didn’t mean to during a pull, it is your responsibility to babysit the pet and periodically use /petPassive to pull on their leash until combat drops. Only then will they reset and stop trying to dutifully go after the mob you told them to kill.