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


Joined: 09 Feb 2006
Posts: 6

PostPosted: Thu Feb 09, 2006 6:09 am   

Text Color
 
I'm looking for a way to make the colors of text in different channels different colors without manually entering the Ansi codes.

making it something like this:

OOC - Me '&rT&zest'

just without me having to enter the &r and &z, so that all capital letters are one color, and all lower case are another.

I believe it is done with variables, but not sure.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 09, 2006 6:03 pm   
 
I can only think of a tedious way.

#ALIAS ooc {#LOOP 26 {#VAR OOCtext %replace( %-1, %char( 64+%i), %concat( ~&r, %char( 64+%i), ~&z))};#VAR OOCtext %replace( @OOCtext, "&&rr&z", "&r");~ooc @OOCtext}

I through in the replace at the end as if you use R instead of r you will make &&RR&z for the R's.

Untested.
Reply with quote
Pocket_Balrog
Newbie


Joined: 09 Feb 2006
Posts: 6

PostPosted: Thu Feb 09, 2006 9:43 pm   
 
Hmm. Didn't work, unless I did something wrong.

My friend was working on one earlier with variables, but he didn't quite get it to work. Just something where capital letters are always one color, and lower case are always another.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 09, 2006 11:47 pm   
 
Oops I'm reseting it each time.

#ALIAS ooc {#VAR OOCtext {%-1};R OOCtext %replace( @OOCtext, %char( 64+%i), %concat( ~&r, %char( 64+%i), ~&z))};#VAR OOCtext %replace( @OOCtext, "&&rr&z", "&r");~ooc @OOCtext}

Try that maybe.
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