|
Maximus Wanderer
Joined: 21 May 2001 Posts: 59 Location: USA
|
Posted: 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 |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Mar 05, 2003 2:58 am |
Try
#TRIGGER {(%w) enters the room} {#CO 30;#PCOL 71 %x1}
Ton Diening |
|
|
|
Maximus Wanderer
Joined: 21 May 2001 Posts: 59 Location: USA
|
Posted: Wed Mar 05, 2003 4:43 am |
Works beautifully. Thank you.
-Maximus |
|
|
|
Oracle Apprentice
Joined: 29 May 2002 Posts: 121
|
Posted: 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} |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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 |
|
|
|
|
|