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
Bruner
Beginner


Joined: 17 Dec 2002
Posts: 18
Location: USA

PostPosted: Sat Oct 11, 2003 10:05 pm   

capturing ansi color specific text
 
I was wondering if there is a way to capture ansi colored text. I turned off that "Emulate Control Codes" to get the ansi. But I have no clue how to use it. I would like to get it so it tags a certain ansi color to my exit paragraph. I really have no clue about ansi, so If someone could break down the "27>[36m <27>[37m<27>[36m" type of code perhaps just tell me what it means? Also, I have looked at that "tag" command, but I haven't figured out how to use it. So, If somone could show me that as well.

Here's a sample from the mud output. :

<27>[33mZaphar Promenade. <27>[0;37m
The magnificent white marble promenade continues southward curving gently as it
accommodates the meandering Pachacacha River to the west. A little way along
the promenade to the south, one of the two great gates in the western wall of
the city stands as a sentinel to the interior. To the east lies the wall
itself, massive, domineering and implacable, it stands resolute over the
western section of the city. Beyond the wall, one can glimpse the palace of the
Sultan, which dominates the high ground at the centre of the city.<27>[36m <27>[37m<27>[36mA runic
totem is planted solidly in the ground. <27>[37m<27>[36mA nebulous water weird is here. <27>[37m
<27>[1;33mYou see exits leading <27>[0;37m<27>[1;33mnortheast and south.
<27>[0;37m<27>[32m1706h, <27>[37m<27>[32m1820m <27>[37mex-

Thanks
Bruner
Reply with quote
Daagar
Magician


Joined: 25 Oct 2000
Posts: 461
Location: USA

PostPosted: Sat Oct 11, 2003 10:29 pm   
 

There is an easy way to set up triggers that respond to ANSI - it is amazingly powerful for setting up some otherwise very difficult triggers. Reset your options so things display as normal (ie., in color, and without the ANSI codes).

In the options tab for the trigger you are creating, turn on 'ANSI Trigger'. Now, cut and paste an example from your mud. As long as you have 'ANSI Trigger' enabled, zmud will automatically paste in the appropriate ANSI code for you (it will be in the form of %e[1;33m for example, where %e is the control code for 'escape', and [1;33m is the code for a specific color, such as in your exit line above). This way you don't need to worry about what code corresponds to each color, and setting up triggers is greatly simplified.
Reply with quote
Bruner
Beginner


Joined: 17 Dec 2002
Posts: 18
Location: USA

PostPosted: Sat Oct 11, 2003 10:56 pm   
 
Thank you for Answering so quickly. And I'm sure that works. I'll get home and try it out. But I'd also like to know the store behind it... I'd like know in with the examples I showed, what code means it setting the color for the following text, I really don't wanna know the code for every color. :) And I don't really know how I would tag the code so it would be my exit paragraph. If someone could put the syntax, and maybe an example up there using my example, I would be very greatful.


Thanks
Bruner
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