Trigger matching on more than 0-15 for text_colour

Posted by Drynwynn on Sun 17 Feb 2013 08:29 AM — 3 posts, 12,553 views.

#0
I didn't find a match in the forum search for this topic under trigger, colour, or text_colour, so forgive me if it's been talked about before.

My MUD uses colors (silver #C0C0C0 and teal #008080 to be exact) for the room name and description. I'm trying to make the GUI Mapper work for my MUD, but I don't know how to make the 'text_colour' option in the trigger use these colors.

From the groking I've been able to do on the forum already, it seems like this option *only* accepts ranges from 0-15 (indeed, when I print the styles out I get 12632256 and 8421376 respectively, and then use those values I get an error 'Range is 0 to 15'.

So, any recommendations on how I would solve this problem? How can I make trigger fire on a text_colour that's not 0-15?
Australia Forum Administrator #1
The "colour based" firing is based on the 16 ANSI colours. To match on more complex stuff you would have to match disregarding the colour, and then look at the style runs for that line to see if you got a match you really wanted.

The same comment applies if you want to match on multiple colours, or a colour that isn't on the first character of the matching text.
#2
Thank you Nick.

When you say that, it's kind of like an "Uh... duh!" moment. Here I am, having a function that prints out the style runs for every line so I could find the colors... and it never occurred to me to use THAT to define the match.

Sigh.

Thanks again for the help, kind sir!