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


Joined: 08 Mar 2008
Posts: 4

PostPosted: Sat Mar 08, 2008 9:42 am   

Question about the 'Highlight' Script set on the finished scripts forum.
 
Say I wanted to alter that script so I could use different colors for different phrases?

Example: hl green I want this text to be green.
hl blue I want THIS text to be blue!

How would I go about doing that...I tried to think of a way, but couldn't figure out how
to get _which_ phrase the trigger was reacting to when using the {@hl} pattern and stuff.

Any help? :-(

Thanks in advance to any who try!
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Mar 08, 2008 4:03 pm   
 
Do you want to send the text to your MUD coloured (using your MUD's colour syntax) or do you want to print the text to your screen coloured?
_________________
Rorso's syntax colouriser.

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


Joined: 08 Mar 2008
Posts: 4

PostPosted: Mon Mar 10, 2008 4:15 am   
 
Whenever the word/phrase comes up on the screen, I want it to be colored in the color I specified with my highlight alias.

I don't want to always type the word in that color though.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 10, 2008 4:50 am   
 
You could just make triggers yourself for this:

#trig {whatever you want here} {#cw blue}
#trig {whatever you want here} {#color blue}

#cw will only colour the part the trigger matches - #color will colour the whole line.
_________________
Rorso's syntax colouriser.

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


Joined: 08 Mar 2008
Posts: 4

PostPosted: Tue Mar 11, 2008 6:01 pm   
 
Yeah, I know, but that's too many triggers to sort through when I open my list :-P
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Mar 11, 2008 10:15 pm   
 
Use a class for colour-related triggers, use the search function, and/or use a single trigger for each colour:

#trig {{pattern 1|pattern 2}} {#cw blue}

But you can't use wildcards in those patterns unless you enable that option.
_________________
Rorso's syntax colouriser.

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


Joined: 08 Mar 2008
Posts: 4

PostPosted: Thu Mar 13, 2008 11:47 pm   
 
Yeah I guess I could just make separate ones for each color. Thanks.
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