Forums » Community Projects


Mar 05, 2012 Pizzasgood link
Ever wish you could assign a color to a specific numeric channel? Wish granted!

It operates on a per-character basis, so that you can emphasize different channels on different alts.

Run /ChanColors for a list of commands. To set a color, do this:
/ChanColors set 11 AA0000

That would set [11] to be a dark red. If you aren't familiar with hex color specifications, go here: and play with it. Don't use the # when setting it in this plugin though, because I'm too lazy to filter that out :)

That's about all there is too it really. Note that the colors might spill over, as I don't return it to the default at the end. Finding out how to query the default color is on my list of things to do someday. By "spill over" I mean if another plugin or game feature tries to print text after a colored channel chat happens, that text might also get colored, if it doesn't set its own color.
Mar 05, 2012 Pizzasgood link
derp, looks like there's a bug. Don't use this for now. I'll fix it up shortly.

EDIT: Updated to version 1.2; problem solved.
Mar 05, 2012 meridian link
I took I quick peek at the code to make sure you using weren't using some silly implementation to color the chat (no worries, I approve of your method), and one thing that struck me is how you enable the plugin every time it gets loaded (last line). I think it would be better to save the enabled state to the config file so that it persists when the player reloads the interface or restarts the client (also if they log out and back in with targetless installed).

To prevent the colors from spilling over, change line 25 to:
data.msg = '\127' .. color .. data.msg .. '\127o'

EDIT: FYI, to actually query the chat color (shouldn't be necessary if you just do what I posted above), chatinfo[CHAT_EVENT_NAME][1] will contain a color of the format '\127ffffff'.
e.g. chatinfo["CHAT_MSG_CHANNEL_ACTIVE"][1]
Mar 05, 2012 Pizzasgood link
cool, thanks
Mar 07, 2012 Pizzasgood link
Hmm... I updated the visible part of the link, but forgot to update the link itself.

Anyway, I've now updated it to 1.3, which fixes another startup bug, this time that it wasn't actually loading the database when you started the game. It was trying to load before you selected a character. So I changed it to wait until PLAYER_ENTERED_GAME.

Took meridian's advice and made it save enabled/disabled status in the db along with the channel information.

Added an example to the Usage() function, and tweaked a couple other outputs.

Adjusted color setting to reset to the previous color to avoid bleeding.
Apr 17, 2012 Pizzasgood link
Updated to 1.4, which fixes it so that it cooperates more consistently with other plugins that modify chatreceiver. Previously due to the order it did things, plugins that changed chatreceiver after this one but before the player entered the game would get ignored.