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


Joined: 12 Nov 2000
Posts: 7
Location: USA

PostPosted: Fri Apr 09, 2004 3:28 am   

#PCOL function.
 
I simply cannot understand #PCOL. I'm trying to color only a certain part of a line. The line is "Player casts <spell name>." Also, the spell name is sometimes one, two, three or more words. So, one example would be "Timmy casts fireball." and I want the fireball part to be colored green. Let me know if this is enough information for you to help me. Thanks a bunch.
Reply with quote
FatDaddyCatfish
Newbie


Joined: 12 Nov 2000
Posts: 7
Location: USA

PostPosted: Fri Apr 09, 2004 4:24 am   
 
Also, although I already set up a color trigger for every single spell to be colored green, I do not want it this way. I want the spell as green text ONLY when it is in the context of "Play casts <spell name>." Thanks.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Apr 09, 2004 5:06 am   
 
#HELP PCOL

PCOL

Syntax: #PCOL color [XStart] [XEnd] [YStart] [YEnd
Related: #COLOR, #CW

Colors part of a line on the screen. Color is the name of the color, or the numeric value (given by %color). HTML color names (listed in %colorname) or hexadecimal format can be used. If the color name conflicts with an ANSI color name, put "mxp" in front of the name (e.g. mxpred) to get the HTML version.
If XStart is omitted, the start of the line is used. If XEnd is omitted, the end of the line is used. YStart and YEnd are relative to the current line. If missing, the current line is used. If 1, the previous line is used, etc.

The %x1..%x99 system variables can be used for the "XStart XEnd" values of matched trigger patterns in a trigger command.

PCOL Example

#TRIGGER {(%w) tells you} {#PCOL mxpblue %x1}

Colors the text matched by the (%w) in the pattern (XStart and XEnd given by %x1 variable) bright blue.


So try this
#TR {%w casts (*)} {#Pcol green %x1}
Reply with quote
FatDaddyCatfish
Newbie


Joined: 12 Nov 2000
Posts: 7
Location: USA

PostPosted: Fri Apr 09, 2004 5:41 am   
 
That worked great. Thanks a lot!
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