Making prettier chat messages
View Single Post
07-26-09, 06:12 AM
A Chromatic Dragonspawn
Join Date: Dec 2006
Originally Posted by
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.
View Public Profile
Send a private message to Waverian
Find More Posts by Waverian