Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
mgoho
Beginner


Joined: 22 Jun 2004
Posts: 17

PostPosted: Sat Aug 14, 2004 10:01 pm   

Help with Default Color
 
I'm trying working with Ansi Triggers.....but I can't get the mud to recognize the Default color when it starts at the beginning of a line. When it comes after other colors, I get the code %e[0m but if I try to put that at the start of a line to trigger on an all-default-color line, it won't work.

I've read many other similar situations and solutions, including making the trigger only go off for that specific line color, but this does not work. If anyone knows what I might do to trigger on default text, please help!

Mark
Reply with quote
SCORNME
Novice


Joined: 25 Jul 2004
Posts: 48
Location: aka Falan

PostPosted: Sun Aug 15, 2004 6:01 am   Re: Help with Default Color
 
mgoho wrote:
but I can't get the mud to recognize the Default color when it starts at the beginning of a line.


Are you referring to the MUD prompt? If so:

http://www.emobius.com/phpbb/viewtopic.php?t=15567&start=0&postdays=0&postorder=asc&highlight=ansi+prompt
Reply with quote
mgoho
Beginner


Joined: 22 Jun 2004
Posts: 17

PostPosted: Mon Aug 16, 2004 2:09 am   
 
No, I'm not referring to the prompt. But it is mud color that I'm referring to. Basically, I'm trying to recognize the default text color as an ansi color. As in when you go to Preferences, Colors, Color Schemes, and choose a Defualt Text color, mine happens to be grey. The text I see on my screen from the mud comes in many different colors (8 actually, each with bright and dim). So when I see grey text on my screen (as in the Default color) I want to recognize it, and trigger on it. But when I copy a "default colored" line of text and open up the Trigger Settings box, create a new trigger, click ANSI Trigger, and then paste the text in, there is NO color code. However, when I copy text in that starts with an actual "color" but also has the "default" color (grey) in it, I get this code: %e[0m.

The first thing I thought to do to get the triggers to work on "default colored"-only lines (where no ANSI code copied in) was to manually paste this code in myself, but this did not work. Also, the Line Color option in the Trigger Options (when set to grey text and black background) also has no bearing on the trigger working.

Please help!
Reply with quote
SCORNME
Novice


Joined: 25 Jul 2004
Posts: 48
Location: aka Falan

PostPosted: Mon Aug 16, 2004 7:16 am   
 
Goto the Options tab of the trigger and make sure there IS a checkmark next to ANSI Trigger and IS NOT a checkmark next to Trigger on Trigger.

Quote:
ANSI Trigger

Turn this option on to allow patterns to contain ANSI color sequences. An ANSI color sequence looks like %e[xxm where xx is the ANSI color value. To trigger on specific color patterns, turn this option on, select the line from the MUD output window that contains the pattern you want to match, and paste (Ctrl-V) this line into the trigger pattern field. If the Ansi Trigger option was on when you pasted the line, any ANSI color codes will be pasted into the Pattern field along with the rest of the text.

Trigger on Trigger

When on, zMUD executes trigger matching on any output displayed by this trigger. Care should be used with this option to avoid an infinite loop of trigger matching.
Reply with quote
mgoho
Beginner


Joined: 22 Jun 2004
Posts: 17

PostPosted: Mon Aug 16, 2004 11:01 pm   Thanks...but it didn't work
 
Ok...this basically didn't change anything. I really appreciate the help though! The more wrong solutions I eliminate, the closer I come to the correct one.

Anyway, these are the triggers, for a more explicit question:

#TRIGGER {Caleb gives you 1 platinum.} {tell Caleb Thanks!} "" {notrig|color}

This should trigger when Caleb actually gives me 1 platinum. It DOES trigger on default color (no problems there).


#TRIGGER {%e[36mCaleb gives you 1 platinum.} {tell Caleb That won't work!} "" {notrig|color}

This should trigger if Caleb emotes the pattern, in other words, trying to trick my trigger. The following is what's happening.

(assume black is the default text, blue is the emote...and I have Show Triggers activated)

Caleb gives you 1 platinum.
[Caleb gives you 1 platinum.-> tell Caleb Thanks!]
tell Caleb Thanks!
[%e[36mCaleb gives you 1 platinum.-> tell Caleb That won't work!]
tell Caleb That won't work!

Caleb gives you 1 platinum.
[Caleb gives you 1 platinum.-> tell Caleb Thanks!]
tell Caleb Thanks!

So, basically, the trigger (that has the ANSI option on) but with no escape code is recognizing the blue text for just the text, but no color and is firing along with the other one. I'm getting aggrevated at zMud...perhaps a Guru could help?
Reply with quote
Falan
Wanderer


Joined: 17 Aug 2004
Posts: 98
Location: OK, USA

PostPosted: Tue Aug 17, 2004 6:35 am   
 
You're matching the same pattern with two triggers, but only want one to fire if it also matches color?

There's this link where a color matching trigger is used. I'd get rid of the pattern matching trigger and use two color matching triggers.
_________________
zMUD 7.05a
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net