WoW Petopia Community

A fun place to chat about hunter pets in the World of Warcraft.
Visit the Petopia homepage Petopia Homepage
It is currently Fri Dec 14, 2018 2:52 am

All times are UTC - 5 hours [ DST ]


Forum Rules: Treat others with respect. Report, don't respond. Read the complete rules.




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: NPC Testing Macros
Unread postPosted: Mon Sep 10, 2018 10:04 am 
Offline
The Insane
The Insane
User avatar

Joined: Tue Jul 27, 2010 1:54 am
Posts: 11328
Gender: Male
For checking creatures for Petopia, the following macro will give you the NPC ID and pet family (if it exists) for a targeted NPC:
Code:
/run print("Target NPC Family: ", UnitCreatureFamily("target"), " ID: ", strmatch(UnitGUID("target"),"-(%d*)-%x*$"))



The following macro will do the same thing, but it also opens a dressing room window that shows the NPC in one of its randomly-chosen looks / colours (thanks to Xota):
Code:
/run local npcid = tonumber(strmatch(UnitGUID("target"),"-(%d*)-%x*$")) print("Target NPC Family: ", UnitCreatureFamily("target"), " ID: ", npcid) ShowUIPanel(DressUpFrame) DressUpModel:SetCreature(npcid)

If the NPC can appear in multiple colours / looks, then repeatedly hitting the button for that macro will eventually reveal all of them. Note that the chance of it displaying a particular look is the same as in the game, so if an NPC colour is set to only appear rarely, say 1 in 10 times, then the same will be true of this macro. There seems to be only a few NPCs with looks that do that, though.

_________________
Shaman avatar by Spiritbinder.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group