|
Winslow Novice
Joined: 17 Feb 2007 Posts: 48
|
Posted: Wed Aug 22, 2007 3:29 am
Question on wildcards... |
Okay, I want a trigger to only trigger when the exact line is hit, no text before or after. But, I also have wildcards inside my trigger. Example:
#Trigger {Joe (*) cake}
Now this could trigger on:
"Joe gives you some cake"
or
"Joe gives you some cake which you eat" (which I don't want)
It could also trigger on a room description such as:
blah, Joe, blah blah blah, etc, etc cake. (which I also don't want)
What I am trying to resolve, is this trigger does not have a period at the end so I don't have anything which shows end of line or end of trigger. The "^" symbol apparently makes it so it will only trigger when it is on a new line and there is no text before it. Is there another type of symbol that I can use at the end which says "no other text will follow"? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Aug 22, 2007 3:36 am |
Yes, $.
#trig {Joe (*) cake$}
Matches "Joe gives you some cake" but not "Joe gives you some cake." or "Joe gives you some cake which you eat"
See Pattern Matching. |
|
|
|
Winslow Novice
Joined: 17 Feb 2007 Posts: 48
|
Posted: Wed Aug 22, 2007 3:37 am |
Wow, works excellent...
One more now that I'm on a roll..
I want to change the color of some text using the color command. However the trigger is set for "... hums!" on equipment. When using the color command, I only want to change the color of that quote, not the whole line. How do I do this? |
|
|
|
tomcat025 Wanderer
Joined: 30 Dec 2001 Posts: 66 Location: USA
|
Posted: Wed Aug 22, 2007 9:25 am |
#CW can be used to color the text that is triggered.
#CO is for coloring a complete line. |
|
_________________ You can pick your nose. You can pick your friends... but you can't pick your friends nose.
~Arwin Hochhauser |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Aug 22, 2007 11:06 am |
You can also use #sub and MXP <color> tags for more exact control of colours.
|
|
|
|
Zhiroc Adept
Joined: 04 Feb 2005 Posts: 246
|
Posted: Wed Aug 22, 2007 12:50 pm |
You can use #COLOR and #CW with any color, not just the ansi ones, by the way. And there's also #PCOLOR to color text groups captured in triggers.
I tend to only use the color tags when embedding into a #SHOW. One drawback to those tags is that you can't use them in #PSUBs at the moment (well, never probably in zMUD). |
|
|
|
|
|