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
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Sat Jun 05, 2004 2:15 am   

Echo back ANSI-tagged strings
 
Sample ANSI-tagged string here:

 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

This has every color I want to echo back. I am not sure how to display the color associated with each tag back on the screen though.
Reply with quote
Starflight
Newbie


Joined: 30 May 2004
Posts: 4
Location: Australia

PostPosted: Sat Jun 05, 2004 4:06 am   
 
Depending on how you send text to your mud, you should just be able to include it as part of that. For example:

send_to_char("ANSI 123456 ANSI.rn", ch)

Replace the first ANSI with the escape sequence for the color you want, and the second ANSI with the escape sequence for normal text color (the first escape sequence in your list).

When you've got a handle on it, you can map the escape sequence values to something else more easily written in your text (eg. &r for red, &g for green, etc)

Note that while zMUD does include a few escape sequences, the whole ANSI system is generally dealt with by your mud's code and is independant of zMUD.
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