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).
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
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
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
/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.
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
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 .
Re: Help with LUA script /run macro to show pet info window
/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.
/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
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!
/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
/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 ~
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