Thread Tools Display Modes
09/28/14, 06:34 PM   #1
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Get Player Info Method

is there a way to display a persons information? such as the Location, Level, Alliance and other player specific information just by passing a "character name" ?
  Reply With Quote
09/28/14, 07:38 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by skobyjay View Post
is there a way to display a persons information? such as the Location, Level, Alliance and other player specific information just by passing a "character name" ?
No, it's not possible to get such information from character name.

You can get this kind of information only if that person has unitTag, i.e. if it is player himself ("player"), target ("target", "reticleoverplayer") or group member ("group<num>").

As for the character name - you can build lookup table for friends and guild members, you can get the same information as in friend list/guild roster. I don't think that there is much more you can do. Maybe you can store some information for all "reticleoverplayer" and group members you have met, but it probably won't be helpful.
  Reply With Quote
09/28/14, 08:46 PM   #3
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
thanks for the information.
  Reply With Quote
09/28/14, 11:16 PM   #4
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
You can get location, level, alliance, class, and character name from the guild list or friends list functions.

From API page on wiki:

Code:
     GetFriendInfo(luaindex friendIndex)
        Returns: string displayName, string note, integer playerStatus, integer secsSinceLogoff 

    GetFriendCharacterInfo(luaindex friendIndex)
        Returns: bool hasCharacter, string characterName, string zoneName, integer classType, integer alliance, integer level, integer veteranRank 

     GetGuildMemberInfo(integer guildId, luaindex memberIndex)
        Returns: string name, string note, luaindex rankIndex, integer playerStatus, integer secsSinceLogoff 

    GetGuildMemberCharacterInfo(integer guildId, luaindex memberIndex)
They operate on an index, so you have to iterate through the list to find a player with certain name.
  Reply With Quote
09/29/14, 05:56 PM   #5
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
awesome thanks!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Get Player Info Method

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off