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
musishun00
Wanderer


Joined: 16 Dec 2003
Posts: 77
Location: USA

PostPosted: Fri Dec 19, 2003 9:46 am   

storing colored text to a string
 
I know that I can store a single line of text to a string. That's easy. The hard question follows: is there any way that I can store a single line of text to a string and still keep the ansi colors of everything? I want to keep variables of everything that I have on my body, but I want the ansi to stay like it is when the MUD sends it to me.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Dec 19, 2003 6:39 pm   
 
Yup. Here is an example that grabs all lines and stores the ansi inforamtion into a variable. Depending on what you plan to do with the information after storing, you might want to replace the ansi codes with your mud color codes.

#TRIGGER {^(*)$} {#ADDITEM ansitest {%1}} "" {color}

#VAR ansitest {HP:749/749 MV:1990/1990 GP:359622 Sound:loud Tone:soft Day:night Users:6}
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