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
dntc
Newbie


Joined: 20 Jul 2002
Posts: 4
Location: China

PostPosted: Sat Sep 28, 2002 4:56 am   

help with color trigger!
 
if there is some red text

how to write trigger to capture them?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Sep 28, 2002 2:40 pm   
 
There are two ways of doing this:
1. Triggers have an option to Trigger on Line Color and you specify which color that would be. In this case, the trigger would only check for a match in the pattern if the line color is the one specified.
2. The other, more comples method, is to create an ANSI trigger. In theory this should be easy, but right now it isn't. What you need to know is the ANSI sequence that your MUD sends for the color you want. To do this, copy the line you want to trigger on (any red line in your case should do) and open the Editor (Window|Editor). Make sure that Options|Raw Mode is selected and paste the copied line into the editor. Now you will see the ANSI sequence used (they start with a rectangle-like character and end with an "m"). Finally, copy the sequence into the pattern box for your trigger and replace the "rectangle-like character" with %e in the pattern. Also, make sure the Ansi Trigger options is selected.

Kjata
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