Page 1 of 1

Get own ID?

Posted: Mon Dec 19, 2011 1:07 pm
by gloover
Hey guys and experts

rock, lisa how can I get the players id?
NPC's and objects can be readed in runsdatabase, but I dont know how to get the players id (own or target player)
Is it possible, when yes: how?

thx in advance

Re: Get own ID?

Posted: Mon Dec 19, 2011 7:28 pm
by lisa
players ID is 1001

I think you might be after the address?

Re: Get own ID?

Posted: Mon Dec 19, 2011 9:59 pm
by rock5
I think there are 4 player id depending on race and sex. I think it's 1001 to 1004.

Re: Get own ID?

Posted: Mon Dec 19, 2011 10:08 pm
by Administrator
Maybe he's looking for the GUID (Global Unique Identifier) instead?

Re: Get own ID?

Posted: Tue Dec 20, 2011 2:27 am
by gloover
Of course, Admin - thats what I'm looking for.

It could be realized with API's UPDATE_MOUSEOVER_UNIT (arg1,arg2) or UNIT_TARGET_CHANGED but I dont know how exactly?
In WoW it was easier using UnitGUID("target"), but here in rom I'm out of basics to create something like that.

May U know, admin, rock, lisa?

PS: I've tried this one /run DEFAULT_CHAT_FRAME:AddMessage(UnitGUID("player"))
but I get a variable number depending on the zone and the number was something between 50 - 3000.
I know the GUID must be something above 130.000 - so back to beginning :-(

Re: Get own ID?

Posted: Tue Dec 20, 2011 4:47 am
by lisa
you mean you want

Code: Select all

player.GUID
?

Re: Get own ID?

Posted: Tue Dec 20, 2011 5:42 am
by gloover
Yes lisa, thats what i mean

player GUID and target GUID, well formated such like the npc format XXXXXX i.e. 104146 for Mendoza Ayekin

Re: Get own ID?

Posted: Tue Dec 20, 2011 6:25 am
by lisa
I think you are getting confused.

mobs and NPC have an Id, in your example the Id of Mendoza Ayekin is 104146.

You can get the target's Id by using

Code: Select all

rom/getid.lua
and then point your mouse at any object/npc/mob and the ID will be on micromacro window.

If you were trying to use the Id in code then you use it like this.

after you have targeted something then

Code: Select all

target = player:getTarget();
then the id is

Code: Select all

target.Id
If I knew what you were trying to do it would be a lot easier to help you.