Page 1 of 1
NPC ID macro issues
Posted: Sun Jul 06, 2014 8:16 am
by Wain
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.
Re: NPC ID macro issues
Posted: Sun Jul 06, 2014 6:44 pm
by Xota
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:
Code: Select all
/dump tonumber((UnitGUID("target")):sub(-13, -9), 16)
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.
Re: NPC ID macro issues
Posted: Sun Jul 06, 2014 10:18 pm
by Wain
OK thank you

I'll try that tonight!
Re: NPC ID macro issues
Posted: Mon Jul 07, 2014 5:50 am
by Wain
Sadly /dump doesn't seem to be doing anything on the beta, but it was a good thought. Thanks again

Re: NPC ID macro issues
Posted: Sun Jul 20, 2014 4:21 pm
by Xota
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
Posted: Sun Jul 20, 2014 7:32 pm
by Wain
Oh that's great to know! Thanks

Re: NPC ID macro issues
Posted: Mon Jul 21, 2014 10:32 am
by Wain
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 :/
Re: NPC ID macro issues
Posted: Mon Jul 21, 2014 2:12 pm
by Xota
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
Posted: Mon Jul 21, 2014 8:33 pm
by Wain
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 :/
Re: NPC ID macro issues
Posted: Tue Jul 22, 2014 4:59 am
by Xella
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:
Code: Select all
Dump: value=UnitGUID("target")
[1]="Creature:0:971:870:3:64149:00004DE8C4"
So at least the UID _is_ still in there, haha.
Re: NPC ID macro issues
Posted: Tue Jul 22, 2014 5:19 am
by Wain
OK this seems to work now:
/run print("Target NPC ID:", tonumber(UnitGUID("target"):sub(-16, -12)))
Re: NPC ID macro issues
Posted: Fri Jul 25, 2014 7:58 pm
by Xota
Wain wrote:OK this seems to work now:
/run print("Target NPC ID:", tonumber(UnitGUID("target"):sub(-16, -12)))
That may not work, especially if it doesn't show leading zeros in the new GUID format.
/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
Posted: Tue Aug 05, 2014 7:55 am
by Wain
Damn, I missed this. You are completely right, the GUID format isn't composed of consistent string lengths. Thanks for the improved version!