Thread Tools Display Modes
09-23-19, 11:59 AM   #1
Moonscarlet
A Murloc Raider
 
Moonscarlet's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2019
Posts: 8
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?
  Reply With Quote
09-23-19, 12:18 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
If you are whispering someone that's in chat, open your text box and shift click the player name in chat.
  Reply With Quote
09-23-19, 12:46 PM   #3
Moonscarlet
A Murloc Raider
 
Moonscarlet's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2019
Posts: 8
I meant something like what's mentioned here (for an addon):
https://wow.gamepedia.com/UI_escape_sequences
scroll down to the player part:

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");
  Reply With Quote
09-23-19, 01:41 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
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.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-25-19 at 03:37 PM.
  Reply With Quote
09-23-19, 03:07 PM   #5
Moonscarlet
A Murloc Raider
 
Moonscarlet's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2019
Posts: 8
Great, thanks a lot.
  Reply With Quote
09-24-19, 12:31 PM   #6
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
woops, updated the docs
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Print player name link

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