WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Print player name link (https://www.wowinterface.com/forums/showthread.php?t=57535)

Moonscarlet 09-23-19 11:59 AM

Print player name link
 
Hey,

Is it possible to print player name link? So that if I want to whisper that player I'd just click it instead of typing it?

Kanegasi 09-23-19 12:18 PM

If you are whispering someone that's in chat, open your text box and shift click the player name in chat.

Moonscarlet 09-23-19 12:46 PM

I meant something like what's mentioned here (for an addon):
https://wow.gamepedia.com/UI_escape_sequences
scroll down to the player part:

Quote:

player
player : name : lineID : chatType : [chatTarget]

lineID Message ID for reporting.

Examples:
"|Hplayer:Kilastra-DefiasBrotherhood:90:CHANNEL:2|h[|cff8686ecKilastra|r]|h"
"|Hplayer:Ketho-Anasterian:8:PARTY:|h[|cfffefefeKetho|r]|h"
I was able to do it using the example above but I don't understand the lineID: chatType parts.
I replaced the name I wanted here but I don't know what "90:CHANNEL:2" means and if it's ok to just use it for everything.

"|Hplayer:Kilastra-DefiasBrotherhood:90:CHANNEL:2|h[|cff8686ecKilastra|r]|h"

Like this:
DEFAULT_CHAT_FRAME:AddMessage("|Hplayer:Moonscarlet-ServerName:90:CHANNEL:2|hMoonscarlet|h");

SDPhantom 09-23-19 01:41 PM

You can leave those out. They only provide data for the reporting action in the context menu.
Code:

|Hplayer:Moonscarlet-ServerName|hCustom Text|h
For future reference, the display portion of the link can be changed however you want to suit your needs. The only time formatting is enforced is when sending links embedded in a chat message and only a handful of link types are allowed.

Alternatively, Blizzard has a shortcut function for this.

Moonscarlet 09-23-19 03:07 PM

Great, thanks a lot.

Ketho 09-24-19 12:31 PM

woops, updated the docs


All times are GMT -6. The time now is 05:13 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI