Page 1 of 1

Help with LUA script /run macro to show pet info window

Posted: 04 Aug 2021 15:49
by chickenbutt
I've been looking all over the internet with no success trying to find a macro that will show the user interface window for the pet paper doll in game, i.e the window that shows the name and model of your pet with their stats like armor, stamina, strength, agility, bonus spell damage, spell school resistances, attack power, damage range, and so on.

If you're not sure what I'm talking about, classes with permanent pets like Hunter, Warlock and Unholy specced Death Knights can access this window by simply summoning their pet, opening their character paper doll (C or CTRL+C) and clicking on the "Pets" tab (where other classes normally only see their mounts/vanity pets).

The third picture in the gallery here is what the pet tab looks like as a Hunter
https://wowpedia.fandom.com/wiki/Pet_tab

I know there's a script (either /run or /script) command for this since I've used it a few years ago to check the stats of my Enhancement Shaman's Spirit Wolves. I wish to do this again and the only way to see their paper doll with the stats shown is to use a script like this, since without this script, there is no way to see this window for summoned pets like Spirit Wolf, Ebon Gargoyle, Water Elemental, etc. I think it even shows Guardians as well.

I hope someone understands what I'm asking for and has the knowledge to help me figure it out ^^ Thanks in advance.

Re: Help with LUA script /run macro to show pet info window

Posted: 06 Aug 2021 10:54
by Kniteknite
Shift+P for pet details when pet is active and hunter not mounted IDK if its a show tool tip thing or what I can't code(yet) :// ~Hunters also have Beast Lore ability to show info of other hunters' pets(beasts) but not other class's sidekicks

https://wowpedia.fandom.com/wiki/World_of_Warcraft_API

https://wowpedia.fandom.com/wiki/API_Ge ... okItemInfo i looked and looked for specifs but couldn't find any spacific macro to display the pet info page (Shift+P) yet ....

Re: Help with LUA script /run macro to show pet info window

Posted: 18 Aug 2021 19:26
by chickenbutt
Kniteknite wrote:
06 Aug 2021 10:54
Shift+P for pet details when pet is active and hunter not mounted IDK if its a show tool tip thing or what I can't code(yet) :// ~Hunters also have Beast Lore ability to show info of other hunters' pets(beasts) but not other class's sidekicks

https://wowpedia.fandom.com/wiki/World_of_Warcraft_API

https://wowpedia.fandom.com/wiki/API_Ge ... okItemInfo i looked and looked for specifs but couldn't find any spacific macro to display the pet info page (Shift+P) yet ....
Shift+p when my Spirit Wolves are out goes to the spellbook and shows their abilities, but there's no pet tab in the character info window (C / Ctrl+C), I couldn't find anything in the api to show pet stats except one that would show the pet's bonus spell power, although I couldn't get that one to work in game either..

Re: Help with LUA script /run macro to show pet info window

Posted: 19 Aug 2021 04:10
by Kniteknite
sad part is ....You once knew all the spells in the togues of men, elves and orcs...

Re: Help with LUA script /run macro to show pet info window

Posted: 20 Aug 2021 04:41
by Brennus
Is this what you need?

Code: Select all

/run if not PetPaperDollFrame:IsVisible() or PetPaperDollFramePetFrame:IsVisible() then ToggleCharacter("PetPaperDollFrame"); end; PetPaperDollFrame_SetTab(1);
Keep in mind it will toggle the pane.

Now, if you want it to just be shown but do nothing when already shown, then try the following.

Code: Select all

/run if not PetPaperDollFrame:IsVisible() then ToggleCharacter("PetPaperDollFrame"); end; PetPaperDollFrame_SetTab(1);

Edit 1:
Spoiler:
By the way

Code: Select all

/script
and

Code: Select all

/run
have the same results, with the later saving up 3 characters (which is why I used it, given the 255 character limitation of macros), feel free to change it if you want...

Edit 2:

I think I understand now, you want the Hunter/Warlock/UH HK pet interface to show stats for your Shaman's Spirit Wolves??? If so then I'm afraid it's not possible, at least not with Blizzard default frames, since they check whether your pets "deserve" to be shown on pet interface.
Basically, this

Code: Select all

/run print(tostring(HasPetUI()))
If it returns 1, Blizzard has determined your pets deserve the interface, if it returns nil, then it won't work. I mean, you can try to force show them, but it will be instantly hidden again, automatically, by the game.

Re: Help with LUA script /run macro to show pet info window

Posted: 20 Aug 2021 19:50
by chickenbutt
It shows as nil, unfortunately. The thing is that, although completely anecdotal evidence, I do very strongly recall seeing this window open for spirit wolves

Just like this window here, except without the
pet happiness icon and the pet were my wolves
Justicelight showed me the script something like two years agobut he couldn't remember it last I asked Image.

Re: Help with LUA script /run macro to show pet info window

Posted: 21 Aug 2021 02:11
by chickenbutt
Brennus wrote:
20 Aug 2021 04:41
Is this what you need?

Code: Select all

/run if not PetPaperDollFrame:IsVisible() or PetPaperDollFramePetFrame:IsVisible() then ToggleCharacter("PetPaperDollFrame"); end; PetPaperDollFrame_SetTab(1);
Keep in mind it will toggle the pane.

Now, if you want it to just be shown but do nothing when already shown, then try the following.

Code: Select all

/run if not PetPaperDollFrame:IsVisible() then ToggleCharacter("PetPaperDollFrame"); end; PetPaperDollFrame_SetTab(1);

Edit 2:

I think I understand now, you want the Hunter/Warlock/UH HK pet interface to show stats for your Shaman's Spirit Wolves??? If so then I'm afraid it's not possible, at least not with Blizzard default frames, since they check whether your pets "deserve" to be shown on pet interface.
Basically, this

Code: Select all

/run print(tostring(HasPetUI()))
If it returns 1, Blizzard has determined your pets deserve the interface, if it returns nil, then it won't work. I mean, you can try to force show them, but it will be instantly hidden again, automatically, by the game.
Justicelight was tipped off about the thread by a very nice person and so he messaged me and we nerded out for a while. This script worked!

Code: Select all

/run if not oldHasPetUI then oldHasPetUI = HasPetUI; HasPetUI = function() return true, false; end end PetTab_Update() ToggleCharacter("PetPaperDollFrame")
Level 80 Feral Spirit Wolves have 662 base attack power from 331 strength, they scale with Shaman's attack power at 30%, and with the glyph to add 30% more scaling, it's 30+30 = 60% attack power scaling

Re: Help with LUA script /run macro to show pet info window

Posted: 21 Aug 2021 07:32
by Brennus
chickenbutt wrote:
21 Aug 2021 02:11
Justicelight was tipped off about the thread by a very nice person and so he messaged me and we nerded out for a while. This script worked!

Code: Select all

/run if not oldHasPetUI then oldHasPetUI = HasPetUI; HasPetUI = function() return true, false; end end PetTab_Update() ToggleCharacter("PetPaperDollFrame")
Level 80 Feral Spirit Wolves have 662 base attack power from 331 strength, they scale with Shaman's attack power at 30%, and with the glyph to add 30% more scaling, it's 30+30 = 60% attack power scaling
Oh wow I didn't know you could overwrite the default function.
I have just learned a new thing now, thanks.

Re: Help with LUA script /run macro to show pet info window

Posted: 22 Aug 2021 04:41
by Kniteknite
Thanks for being around Brennus ~ :D

Re: Help with LUA script /run macro to show pet info window

Posted: 22 Aug 2021 18:36
by chickenbutt
Thanks to everyone for helping out ^^

Re: Help with LUA script /run macro to show pet info window

Posted: 23 Aug 2021 14:38
by Kniteknite
success ?

Re: Help with LUA script /run macro to show pet info window

Posted: 25 Aug 2021 18:06
by Brennus
Kniteknite wrote:
22 Aug 2021 04:41
Thanks for being around Brennus ~ :D
^_^ I didn't do much though, Justice and Ben just figured out how to do it.