WoWInterface - View Single Post - Making prettier chat messages
View Single Post
07-26-09, 06:12 AM   #4
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Originally Posted by Hat View Post
Thanks for that pointer on chat filters, that's very useful. It's CHAT_MSG_SYSTEM for rolls btw.

But I can't get your examples of changing chat colours to work in-game. If I enter /script print("|cffFF0000This text is red|r This text is white |cff00FF00This text is green|r |cff0000FFThis text is blue|r") into a chat window, the colour codes aren't removed, they're printed verbatim.
The chat system doesn't interpret the pipe character | correctly. If you're doing this via an editbox in game, you have to use \124 which is the escape code for said character.

print("\124cffFF0000This text is red\124r")

The pipe character will work correctly when used in an addon's lua file, though.
  Reply With Quote