Register forum user name Search FAQ

Gammon Forum

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 ➜ Bug reports ➜ Triggers matching on color not working

Triggers matching on color not working

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Norry   (16 posts)  Bio
Date Wed 20 Dec 2006 03:38 AM (UTC)
Message
I have a bunch of triggers that color various channels and they are no longer working on 3.84. I think I've narrowed it down to the color matching. If I try to match on a foreground color, the trigger will not go off. Matching on the background color works fine, however (with foreground set to "any").

Example trigger that doesn't work:

<triggers>
  <trigger
   back_colour="8"
   bold="y"
   custom_colour="15"
   enabled="y"
   group="color"
   match="^\w+ (chat|chats) \'.*$"
   match_back_colour="y"
   match_bold="y"
   match_inverse="y"
   match_italic="y"
   match_text_colour="y"
   regexp="y"
   sequence="100"
   text_colour="14"
  >
  </trigger>
</triggers>
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 22 Dec 2006 03:04 AM (UTC)
Message
That seemed to work for me. Remember that the colour testing applies to the first matching character, so that the cyan-on-black would have to be the very first character on the line.

Also, you are testing for a match on bold. There was a bug in version 3.83 where it turned boolean attributes on when loading world files, so maybe you are not testing for what you think you are.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Norry   (16 posts)  Bio
Date Reply #2 on Fri 22 Dec 2006 04:11 AM (UTC)
Message
I did upgrade to 3.83 and things worked ok, but the upgrade to 3.84 broke the triggers. I changed the color matching, trying various combinations, including any-on-black, and playing with the checkboxes. The only way I got the trigger to match at all was either not checking for color, or using the any-on-black match.

It's supposed to be bold cyan on black so I should be matching on the right thing. Even using the greyed out check on the bold choice (bold/not bold) wouldn't work.

I even tried making a few new triggers and the same thing happened. I didn't try on a new, empty world, however.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 22 Dec 2006 05:06 AM (UTC)
Message
I tested it by going into Game -> Test Trigger, and entering this:


(blank line)
\1B[36m\1B[40m\1B[1mNick chats 'hi there


Now they are the code for cyan text, black background, and bold.

If I go into Display -> Text Attributes -> Line Info, I get this (with the trigger disabled):


Line 872 (872), Friday, December 22, 4:55:37 PM
 Flags = End para: YES, Note: no, User input: no, Log: YES, Bookmark: no
 Length = 20, last space = 14
 Text = "Nick chats 'hi there"

1 style run

1: Offset = 0, Length = 20, Text = "Nick chats 'hi there"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour ANSI  : 6 (Cyan)
 Background colour ANSI  : 0 (Black)

20 columns in 1 style run

------ (end line information) ------


You can see from that that the text is indeed Cyan on Black, with bold (Hilite) set.

You may want to investigate if the line shows up like that in Text Attributes.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 22 Dec 2006 05:07 AM (UTC)
Message
Quote:

I didn't try on a new, empty world, however.


That shouldn't make any difference, unless you have another trigger that fires first.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Norry   (16 posts)  Bio
Date Reply #5 on Fri 22 Dec 2006 10:13 PM (UTC)

Amended on Sat 23 Dec 2006 03:13 AM (UTC) by Norry

Message
Heh, I tried testing the triggers a bunch of times. Any triggers that matched on color (to prevent spoofing) were not going off at all. So something, somewhere, got corrupted I guess. Here's the result I got from pasting in your example:

Line 2 (2), Friday, December 22, 5:48:25 PM
 Flags = End para: YES, Note: no, User input: no, Log: YES, Bookmark: no
 Length = 20, last space = 14
 Text = "Nick chats 'hi there"

1 style run

1: Offset = 0, Length = 20, Text = "Nick chats 'hi there"
 No action.
 Flags = Hilite: YES, Underline: no, Blink: no, Inverse: no, Changed: no
 Foreground colour RGB   : R=0, G=254, B=254
 Background colour RGB   : R=0, G=0, B=0

20 columns in 1 style run

------ (end line information) ------


However, on another world (that I didn't open with 3.83) where the color triggers still work, the same text got me this:

Line 20 (20), Friday, December 22, 5:49:56 PM
 Flags = End para: YES, Note: no, User input: no, Log: YES, Bookmark: no
 Length = 20, last space = 14
 Text = "Nick chats 'hi there"

1 style run

1: Offset = 0, Length = 20, Text = "Nick chats 'hi there"
 No action.
 Flags = Hilite: no, Underline: no, Blink: no, Inverse: no, Changed: YES
 Custom colour: 14 (Chat)

20 columns in 1 style run

------ (end line information) ------


So the second one set the trigger off, but the first one didn't. Funny thing was, even newly made triggers wouldn't work either. I guess it was fallout from the bug in 3.83. Anyway, making a new world and copying everything back in fixed the problem.

EDIT: Ok, things were working until I logged on my mud. The color triggers were broken again. *sigh* But only on this world. So I played with settings then realized the non-broken worlds did not have "Use custom color 16 as default" checked. I unchecked it on the broken world, and voila, matching on color works again.
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.


17,777 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.