NPC Testing Macros

Forum rules
Treat others with respect. Report, don't respond. Read the complete forum rules.
Message
Author
User avatar
Wain
The Insane
The Insane
Posts: 11659
Joined: Tue Jul 27, 2010 1:54 am
Gender: Male

NPC Testing Macros

#1 Unread post by Wain » Mon Sep 10, 2018 10:04 am

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: Select all

/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: Select all

/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.

Post Reply