Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Trigger matching on more than 0-15 for text_colour
Trigger matching on more than 0-15 for text_colour
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Drynwynn
(2 posts) Bio
|
Date
| Sun 17 Feb 2013 08:29 AM (UTC) |
Message
| 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? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 17 Feb 2013 09:18 AM (UTC) |
Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Drynwynn
(2 posts) Bio
|
Date
| Reply #2 on Sun 17 Feb 2013 09:58 AM (UTC) |
Message
| 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! | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
9,242 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top