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

Work with other players to create your own special custom interfaces and macros.
Post Reply
User avatar
chickenbutt
Donor
Posts: 1586
Joined: 16 Sep 2010 17:57
Location: IKEAland

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

#1 » Post by chickenbutt » 04 Aug 2021 15:49

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.
:=) My Mini Enhancement Shaman PvE Guide

https://soundcloud.com/open_minded_97/fullat - a punk song I wrote and produced with a friend from music community college in 2019

User avatar
Kniteknite
Posts: 1909
Joined: 09 Feb 2013 16:40
Location: Great Lakes

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

#2 » Post by Kniteknite » 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 ....
" French fries are like steaks, where the potato is the cow and gets cut up, like meat does, only on a smaller scale. "

User avatar
chickenbutt
Donor
Posts: 1586
Joined: 16 Sep 2010 17:57
Location: IKEAland

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

#3 » Post by chickenbutt » 18 Aug 2021 19:26

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..
:=) My Mini Enhancement Shaman PvE Guide

https://soundcloud.com/open_minded_97/fullat - a punk song I wrote and produced with a friend from music community college in 2019

User avatar
Kniteknite
Posts: 1909
Joined: 09 Feb 2013 16:40
Location: Great Lakes

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

#4 » Post by Kniteknite » 19 Aug 2021 04:10

sad part is ....You once knew all the spells in the togues of men, elves and orcs...
" French fries are like steaks, where the potato is the cow and gets cut up, like meat does, only on a smaller scale. "

User avatar
Brennus
Posts: 533
Joined: 17 Jan 2013 05:25
Location: Argent Tournament Grounds

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

#5 » Post by Brennus » 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 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.
•     Currently No longer Once again retired (now it's for real)     •
 
Image

User avatar
chickenbutt
Donor
Posts: 1586
Joined: 16 Sep 2010 17:57
Location: IKEAland

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

#6 » Post by chickenbutt » 20 Aug 2021 19:50

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.
:=) My Mini Enhancement Shaman PvE Guide

https://soundcloud.com/open_minded_97/fullat - a punk song I wrote and produced with a friend from music community college in 2019

User avatar
chickenbutt
Donor
Posts: 1586
Joined: 16 Sep 2010 17:57
Location: IKEAland

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

#7 » Post by chickenbutt » 21 Aug 2021 02:11

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
:=) My Mini Enhancement Shaman PvE Guide

https://soundcloud.com/open_minded_97/fullat - a punk song I wrote and produced with a friend from music community college in 2019

User avatar
Brennus
Posts: 533
Joined: 17 Jan 2013 05:25
Location: Argent Tournament Grounds

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

#8 » Post by Brennus » 21 Aug 2021 07:32

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.
•     Currently No longer Once again retired (now it's for real)     •
 
Image

User avatar
Kniteknite
Posts: 1909
Joined: 09 Feb 2013 16:40
Location: Great Lakes

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

#9 » Post by Kniteknite » 22 Aug 2021 04:41

Thanks for being around Brennus ~ :D
" French fries are like steaks, where the potato is the cow and gets cut up, like meat does, only on a smaller scale. "

User avatar
chickenbutt
Donor
Posts: 1586
Joined: 16 Sep 2010 17:57
Location: IKEAland

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

#10 » Post by chickenbutt » 22 Aug 2021 18:36

Thanks to everyone for helping out ^^
:=) My Mini Enhancement Shaman PvE Guide

https://soundcloud.com/open_minded_97/fullat - a punk song I wrote and produced with a friend from music community college in 2019

User avatar
Kniteknite
Posts: 1909
Joined: 09 Feb 2013 16:40
Location: Great Lakes

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

#11 » Post by Kniteknite » 23 Aug 2021 14:38

success ?
" French fries are like steaks, where the potato is the cow and gets cut up, like meat does, only on a smaller scale. "

User avatar
Brennus
Posts: 533
Joined: 17 Jan 2013 05:25
Location: Argent Tournament Grounds

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

#12 » Post by Brennus » 25 Aug 2021 18:06

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.
•     Currently No longer Once again retired (now it's for real)     •
 
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest