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: Tue Dec 04, 2007 3:59 am   

Can't Remember.
 
I, about a year ago, had an alias that would set the text color of all capital letters to one color, all lower case letters to another, and all symboles (!,@,#,$, etc...) with another.

Does anyone have this alias or remember it? I reformatted and lost it.

I would greatly appreciate it if someone could repost it for me.

Thanks.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Dec 04, 2007 5:14 am   
 
Well, this depends on what you mean. Because you're saying alias and not trigger, I assume you mean colouring text that you send to the MUD and not text you receive from the MUD. If that's the case, we need to know the syntax that your MUD uses for colouring text. In addition, I'm guessing you don't want to colour ALL text that you send, since some stuff will just be commands like "look", so when exactly do you want this to be used?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Pocket_Balrog
Newbie


Joined: 09 Feb 2006
Posts: 6

PostPosted: Tue Dec 04, 2007 10:38 pm   
 
It was basically used for OOC, CHAT, and SAY, so that the words "spoken" by my character would be sent pre-colored so I didn't have to type all the &C, &P, &G, etc... before every letter. So yes, it was only text sent to the mud. It is runs a modified EOSII code with ANSI text color (I hope that answers the syntax question) and again, it is used only to color words spoken by my character.

Thanks
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Tue Dec 04, 2007 11:07 pm   
 
I have an alias similar to this, but I was never so rude to other players that it colorized so many different colors in every chat :P

Code:

#alias color {%1 ~&%item( y|c|m|w|g|Y|C|M|W|G|B|R, %random( 1, 12))%-2~&n}


Then just use color <channel> <message>
And it colors the entire message with a single random color. The string list inside the %item is the valid color codes, and the ampersands are the color key for the MUD I play. Change it to fit your MUD. I'm sure you could do more, but why? I mean, when people use multiple colors on chat I find it ugly and annoying.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Dec 04, 2007 11:42 pm   
 
Stealing part ralgith's code, the code you're looking for will be something like this:

#alias color {%1 %subregex(%subregex(%subregex(%-2,"([A-Z])","%concat(~"&C~",%1)"),"([a-z])","%concat(~"&N~",%1)"),"([^A-Za-z])","%concat(~"&S~",%1)")}

where &C is the colour for caps, &N is the colour for non-caps, and &S is the colour for symbols. I've never used nested %subregexes, so I'm not sure how the %nn parameters work, but I think this is it.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Dec 05, 2007 12:28 am   
 
I actually faked mine there, I have multiple aliases that are the first 2 or 3 letters of each channel for less keystrokes on the command line ;)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
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