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
Maximus
Wanderer


Joined: 21 May 2001
Posts: 59
Location: USA

PostPosted: Wed Mar 05, 2003 2:51 am   

#CW inside a trigger
 
I have a trigger with this pattern:

(%w) enters the room

Now, what I need to do is #COLOR the line, and then #CW %1, but when #CW is given a non-color parameter, it makes a new trigger. Is there a way to get around this?

-Maximus
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Mar 05, 2003 2:58 am   
 
Try
#TRIGGER {(%w) enters the room} {#CO 30;#PCOL 71 %x1}

Ton Diening
Reply with quote
Maximus
Wanderer


Joined: 21 May 2001
Posts: 59
Location: USA

PostPosted: Wed Mar 05, 2003 4:43 am   
 
Works beautifully. Thank you.

-Maximus
Reply with quote
Oracle
Apprentice


Joined: 29 May 2002
Posts: 121

PostPosted: Wed Mar 05, 2003 7:20 am   
 
quote:

Try
#TRIGGER {(%w) enters the room} {#CO 30;#PCOL 71 %x1}

Ton Diening



What does this mean? Please explain.

{#CO 30;#PCOL 71 %x1}
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Mar 05, 2003 7:41 am   
 
1)
#COLOR

Colors the line.

2)
quote:

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 ANSI attribute value (given by %color). HTML color names 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.



Colors the first matched patern.

So that will color the whole line yellow text on a blue back ground (#COLOR 30) then
highlight the pattern (%w) with white text on a red background (#PCOL 71 %x1).


Ton Diening
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