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


Joined: 25 Jan 2006
Posts: 1

PostPosted: Wed Jan 25, 2006 8:38 pm   

highlighting multiple lines
 
ok, I've searched as much as I could, and I couldn't seem to find what I needed. So, how would you go about highlighting multiple lines of something. For example, in the mudd I play, people can "sign" their messages out, and I want to highlight it. Here is what it looks like

Code:

H:282 M:284 E:1314 W:1521 <eb>
RandomName signs: How are you?
H:282 M:284 E:1314 W:1521 <eb>


now, I can get that to highlight just fine, and the numbers and such are my prompt...but what throws me off is when I get multiple lines such as

Code:

H:282 M:284 E:1314 W:1521 <eb>
RandomName signs: Blah blah blah. La la la alalalalalalalal, umm...whatever else there is to say...just trying to take up some room..and it keeps going and going and ya....
H:282 M:284 E:1314 W:1521 <eb>


and I dont know how many lines a person is going to be signing, which is throwing me off. maybe if it keeps highlighting until it reads the prompt? I dont know. Any help would be appreciated.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jan 25, 2006 10:36 pm   
 
A really cheap way to do it is like thus:

#trigger {(* signs:)} {#mxp %1<color red>}
#condition {(H: %d)} {#mxp </color>%1}

It's not exactly a proper way to do things, and it's possible it won't work (it's very likely to not work if you play an MXP-capable MUD). To do it properly depends on the wordwrap position and status within the MUD itself and whether you can change it. If you can change it, then you need only to set it to an extreme value and a simple single-line trigger will highlight all of it. If you can't change it, then you need two triggers--one to detect the RandomName signs: line and the prompt, and one to match everything inbetween. The former trigger will enable the latter in the first state, and in the second state will disable it:

#trigger {* signs: (*)} {#pcol red %x1; #T+ tMultilineSign}
#condition {H: %d} {#T- tMultilineSign}

#trigger "tMultilineSign" {*} {#color red}
_________________
EDIT: I didn't like my old signature
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