Quantcast
Print Skill Icon into Chat. - WoWInterface
Thread Tools Display Modes
10-25-12, 03:47 PM   #1
Basso
A Fallenroot Satyr
 
Basso's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 22
Print Skill Icon into Chat.

Is there any way to print a skill icon into the chat ?

I got this Line:
" "..aUser.." -> "..GetSpellLink(PspellID).. " XXX "..GetSpellLink(spellID)
printing

PlayerName -> UsedSpell XXX KickedSpell

Basso -> [Kick] XXX [Lesser Healing]

into the chat if i kick something, but i want to replace the XXX by a specific spell icon.
that it looks like this:

Basso -> [Kick] [Lesser Healing]

if possible it shouldnt be bigger then the text but i think you get what i want now

is there anyway to do this ?
looked up the wow api but i havent found a clue.
i only got the path to the icon......
  Reply With Quote
10-25-12, 03:56 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You can print textures into your own chat frame, but you cannot send them to other players (well, you can send them, but WoW will simply remove the textures and other players will only recieve the text of the message).

Code:
local _, _, icon = GetSpellInfo(PspellID)
print(aUser, "->", GetSpellLink(PspellID), "|T"..icon..":0|t", GetSpellLink(spellID)
See <http://www.wowpedia.org/UI_escape_sequences#Textures> for details about embedding textures in font strings.

Alternatively, you could use an addon like ChatLinkIcons that adds icons next to all spell/item links you see in chat.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Donít message me about addon bugs or programming questions.
  Reply With Quote
10-25-12, 03:56 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,795
http://www.wowpedia.org/UI_escape_sequences
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Print Skill Icon into Chat.

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