Get character name from whisper
Hi,
Is there a way to find out the character name for someone who whisper me? So far the EVENT_CHAT_MESSAGE_CHANNEL returns both @account name for the fromName and fromDisplayName even tho the wiki states fromName is suppose to be character name? https://wiki.esoui.com/EVENT_CHAT_MESSAGE_CHANNEL Thanks! |
Not really. The only way to get the character name from a whisper is if the whisperer is in a group or a guild with you. You can use the group or guild to find out the character name from the account name.
|
If you wish to display it to the user, I believe you can pipe the @ name into ZO_LinkHandler_CreatePlayerLink and that will create a link to the player, which you then may be able to retrieve character name from? either that or maybe zo_strformat("<<1>>", player)
I have no idea if this works, this is just how I saw Kill counter do it, but they are calling from an event, so idk |
zo_strformat("<<1>>", player) is just removing any special gender suffix ^f e.g. at the end of the character name.
And I guess the ZO_LinkHandler will just use the @displayName in the link and if you click it use the @displayName as well. As you can see here: https://github.com/esoui/esoui/blob/...ndler.lua#L100 Lua Code:
Afai found out Shadowfen is completely correct here. You would need any kind of "lookup" tables which are given if you are in the same group/guild. Else you'd have to build and safe your own lookup tables for the server and enhance it each time someone writs with a charactername in chat. And I would not recommand doing/building such a big table. It will grow your SavedVariables and make every loading screen slow after a short time already, as the filesize would grow constantly and would need a transfer to file/read from file on each reloadui/zone change/login/logout. |
Thnak you all for the insight.
Much appreciated! |
All times are GMT -6. The time now is 06:29 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI