Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Starling
Beginner


Joined: 24 Dec 2001
Posts: 16
Location: USA

PostPosted: Sun Jan 26, 2003 3:22 am   

An updated Didi
 
Hi,

Here's a little script that simply colorizes your text. I've updated this as a class for simplification reasons.

Set variables @scheme and @syntax to suit your needs; by default this is setup for the Aber-Phoenix color coding system:

@scheme = rRYWYR
@syntax = &+

Resulting in &+r for low red, &+R for high, &+Y for hi yellow, ad nauseam. I'm pretty confident that this can be converted easily to other coloring syntax variations.

Usage: didi <channel> <message>
Example: didi chat Hello, World!

--------------------------------

#CLASS {didi}
#ALIAS didi {#var syntax {&+};#var scheme {rRYWYR};#var fscheme {};#var text {%-2};#var target {};#if (%len( @text)=0) {#var text {I obviously forgot what I was doing!}};#if (%len( @text)>%len( @scheme)) {#while (%len( @fscheme)<%len( @text)) {#var fscheme @fscheme@scheme}} {#loo 1,%len( @text) {#var fscheme @fscheme%copy( @scheme, %i, 1)}};#loo 1,%len( @text) {#var target {@target@syntax%copy( @fscheme, %i, 1)%copy( @text, %i, 1)}};%1 @target}
#CLASS 0

--------------------------------

Aber-Phoenix: phoenix.betterbox.net:6716
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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