Macros for pets?

Post Reply
Maesus
Posts: 106
Location: this account is inactive

Macros for pets?

Post by Maesus » Sat Sep 03, 2022 9:49 am

Hello there,

I have the Tab key bound to Pet Attack, but there's no baseline option in Key Bindings for any other pet action, so I need to use a macro, I just can't figure it out.

I'm looking to create a macro that would allow me to pull my pet back from combat - or to cancel an accidental attack, simply by using the Follow ability.

I looked around on some (classic) forums and most of them say that /petattack and /petpassive or /petfollow should work, but it doesn't.

Any advice is much appreciated,

User avatar
Friendz001
Posts: 74

Re: Macros for pets?

Post by Friendz001 » Sat Sep 03, 2022 10:55 am

Hi,

yea the reason why its not working is because some stuff got changed from Vanilla to TBC.

If you want to use LUA (macros/scripts) you have to check the old 1.12.1 API, wich is this one:
https://vanilla-wow-archive.fandom.com/ ... _Functions

As you can see, under Pet Functions, there are alot of functions you can use.
So, if you want your pet to attack, you have to use the "PetAttack();" function, like this:

Code: Select all

/script PetAttack();
This will cause your pet to attack.
And lets say, you want to bind it to your Auto Shot, so everytime you attack, your pet also attacks the
same target immediately, it would look like this:

Code: Select all

/script PetAttack();
/script if not IsAutoRepeatAction(1) then CastSpellByName("Auto Shot") end
The (1) refers to your ActionBar buttons, and you have to put your Auto Shot on that button.
You can change the "1" to any other button you like.
And your macro onto another button, and when you spam your macro, it will fire off Auto Shot + PetAttack.

Otherwise, just browse around in the API for what you need.

I can also strongly recommend using Super Macro, technically its not needed, but it has so many usefull
features, even outside the code - its just a way better enviroment to create your scripts,
especially because Blizzards macro interaface only offers 255 characters of code.

Hope this helped.

Maesus
Posts: 106
Location: this account is inactive

Re: Macros for pets?

Post by Maesus » Sat Sep 03, 2022 12:48 pm

Works like a charm, thank you! :)

Bigssdl
Posts: 2

Re: Macros for pets?

Post by Bigssdl » Tue Oct 11, 2022 3:11 am

i am using key "R" for auto shot and my script:

Code: Select all

/script PetAttack();
/script if not IsAutoRepeatAction(r) then CastSpellByName("Auto Shot") end
/cast Hunter's Mark
PS: great thx for Friendz001 :)
lok'tar ogar

Post Reply