NPC ID macro issues
Forum rules
Treat others with respect. Report, don't respond. Read the complete forum rules.
Treat others with respect. Report, don't respond. Read the complete forum rules.
NPC ID macro issues
As you may already know, the macro we've traditionally used for determining the NPC ID of beasts isn't working in the beta.
Since we'll really need this for cataloging beasts, I've posted here:
http://us.battle.net/wow/en/forum/topic/13348184978#1
Hopefully someone has some insight into macros and can help. But maybe we just have to wait.
Since we'll really need this for cataloging beasts, I've posted here:
http://us.battle.net/wow/en/forum/topic/13348184978#1
Hopefully someone has some insight into macros and can help. But maybe we just have to wait.
Shaman avatar by Spiritbinder.
Re: NPC ID macro issues
Without being able to make a lua call, I can't think of any way for a macro to look up the GUID. I doubt it will work, if all all scripting is disabled, but you could try:
The combat log probably doesn't have GUID info, but it's worth looking at.
Finally, you might have to rely on name and then looking it up on a 3rd party site like wowhead.
Code: Select all
/dump tonumber((UnitGUID("target")):sub(-13, -9), 16)
Finally, you might have to rely on name and then looking it up on a 3rd party site like wowhead.
Re: NPC ID macro issues
Sadly /dump doesn't seem to be doing anything on the beta, but it was a good thought. Thanks again
Shaman avatar by Spiritbinder.
Re: NPC ID macro issues
Addons are supposedly enabled, which means scripting probably is too. /run and /dump should both now work, either in macro or manually typed in.
Re: NPC ID macro issues
The existing MoP macro: /run print("Target NPC ID:", tonumber((UnitGUID("target")):sub(-13, -9), 16))
...is returning 'nil' for all NPC IDs currently, but at least it runs.
Unfortunately the beta seems too unstable to bother experimenting at the moment. I experience it crashing in less than two mins of login, on multiple toons :/
...is returning 'nil' for all NPC IDs currently, but at least it runs.
Unfortunately the beta seems too unstable to bother experimenting at the moment. I experience it crashing in less than two mins of login, on multiple toons :/
Shaman avatar by Spiritbinder.
Re: NPC ID macro issues
I suggest /dump UnitGUID("target") on a (non-tamed) npc you know the ID of, to see if the formatting of GUIDs have changed.
Re: NPC ID macro issues
Thanks Yeah, that's what I had to do when it changed in MoP. But the beta was so unstable today I just gave up trying to get anything out of it :/
Shaman avatar by Spiritbinder.
- Xella
- Artisan Hunter
- Posts: 681
- Joined: Mon Mar 14, 2011 11:53 pm
- Realm: Skywall-US
- Gender: Female
- Contact:
Re: NPC ID macro issues
Not sure that it'll help since I can't pull the matching live data (live servers just went down for 12h maintenance) but dumping Matron Vi Vinh in Shrine of Seven Stars (ID 64149) on beta results in the following:
So at least the UID _is_ still in there, haha.
Code: Select all
Dump: value=UnitGUID("target")
[1]="Creature:0:971:870:3:64149:00004DE8C4"
Current main: Xella-Skywall | Art Stuffs | Brains.
Re: NPC ID macro issues
OK this seems to work now:
/run print("Target NPC ID:", tonumber(UnitGUID("target"):sub(-16, -12)))
/run print("Target NPC ID:", tonumber(UnitGUID("target"):sub(-16, -12)))
Shaman avatar by Spiritbinder.
Re: NPC ID macro issues
That may not work, especially if it doesn't show leading zeros in the new GUID format.Wain wrote:OK this seems to work now:
/run print("Target NPC ID:", tonumber(UnitGUID("target"):sub(-16, -12)))
/run print("Target NPC ID:", strmatch(UnitGUID("target"),":(%d*):%x*$"))
This will return the digits between the penultimate and last colon (assuming the characters trailing the last colon are hexdecimal). It will work even for NPCs with an ID 9999 or lower and 100000 and higher.
Re: NPC ID macro issues
Damn, I missed this. You are completely right, the GUID format isn't composed of consistent string lengths. Thanks for the improved version!
Shaman avatar by Spiritbinder.