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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Stevestones01
Beginner


Joined: 25 May 2010
Posts: 14

PostPosted: Fri Jun 25, 2010 10:30 pm   

coloring an exact pattern
 
ok, I know how to color words. But I can't get it to color the word if it's only by itself.

I'm using the trigger:

Code:

#TRIGGER {{@en}} {#CW %eval(%color(red)+%color(hi))}


And while this does color the word's I want it to. It colors the word even if it's in the middle of another word. For example...

I have the word 'orc' in the list, so I want it to only highlight orc if it's by itself, not if it's in the middle of a word or name like, 'authorcan', or even if it's at the end or beginning of a word. I tried changing the trigger to this....

Code:

#TRIGGER {~ {@en}~ } {#CW %eval(%color(red)+%color(hi))}


and that works for most things. But when the word I want highlighted is the first word in the sentence and there's no space it won't highlight it. Like if some one is entering or leaving a room.

Not sure if I'm being very clear with this so if I'm not please let me know. Is there any way to do what I'm trying to do?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jun 25, 2010 11:11 pm   
 
Use %q. For example{%q@en%q}.
_________________
EDIT: I didn't like my old signature
Reply with quote
Stevestones01
Beginner


Joined: 25 May 2010
Posts: 14

PostPosted: Sat Jun 26, 2010 1:25 am   
 
%q worked perfectly, thank you. However when I put it inside the brackets it crashed cmud... so I just put them on the outside and everything seems to work just fine.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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