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
romciom
Beginner


Joined: 15 Oct 2002
Posts: 10
Location: Poland

PostPosted: Tue Apr 08, 2003 8:10 pm   

Multiline colouring
 
Hello!

I tried to make a trigger which would colour everything till the dot sign, which can appear in the first line as well as in the third one. It works when there are only two lines, like this:

The frowning bearded warrior screams in agony as you drive your unholy
halberd through his legs. You withdraw it quickly, allowing his body to fall.

but fails whe three lines come from mud:

With a look of grim determination, you throw all your weight into a strike on
the massive Roman-nosed warrior's body, causing bones to snap and blood to
spray.

It colours just first and last line and does not change the colour of the middle one.

The script looks like this:

#COLOR 10;#TEMP {(*)} {#IF %ends(%1,".") {#COLOR 10} {#COLOR 10;#TEMP {(*)} {#IF %ends(%1,".") {#COLOR 10} {#COLOR 10;#TEMP {.} {#color 10}}}}}


Does anybody know how to change the script so it would work? Or maybe make it more simple.
I use Zmud 6.05
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Apr 08, 2003 11:52 pm   
 
It's difficult to remember what will work with such an old version, but I think I remember labels working in 5.55, so I'll use that instead of nesting temp triggers. It's best to start with the #COLOR trigger disabled. If labels don't work, you could do the same thing by creating a class named Green, disable when connecting, and putting the color trigger inside it.

#TR {unknown trigger phrase to start using green} {#T+ Green}
#TR "Green" {*} {#COLOR 10} {} {disable}
#TR {.$} {#T- Green}

LightBulb
Advanced Member
NOTE: There have been two PUBLIC versions released (6.16 and 6.40) since the BETA version you're using. I'd recommend upgrading.
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