|
sjleonard Beginner
Joined: 10 Jun 2002 Posts: 23 Location: United Kingdom
|
Posted: Sun Jun 29, 2003 11:59 pm
Triggering with brackets |
I'm trying to trigger certain rooms to store the room name in a variable and also highlight it. I can do this but my problem is that it also highlights other rooms and sets the location wrong if I go near a similar room, here's my trigger, you'll see what I mean.
#TRIGGER {^The White Mountains(%1, %2, %3, %4 and %5)}
{#Variable Location Guild-Hitching
#SUB %ansi( bold, yellow)"THE WHITE MOUNTAINS(E, SW, W, ENTER and N)"}
It's capturing this:
The White Mountains(e, enter, w, sw and n)
But because of the ()s each of the directions had to be used as variables. Is there a way to make the brackets part of the trigger pattern and not a bracket, if you see my point? I tried using ~ but might have gotten it wrong, any help? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jun 30, 2003 12:07 am |
#trigger {The White Mountains~(e, enter, w, sw and n~)} {}
|
|
|
|
Lalaynya Wanderer
Joined: 23 Aug 2002 Posts: 96
|
Posted: Mon Jun 30, 2003 3:31 pm |
My only comment on this is:
You should never be using %1, %2, %3, etc as part of your pattern.... this is a VERY BAD IDEA(tm)!
If you use those in patterns, you're just asking for trouble... When you post them here on the forums, you're also inviting others (read: newbs) to use them that way, as well.
Check in the help file, under the topic patterns for the list of patterns that you SHOULD be using. (I believe %1, %2, etc. function as the * pattern, though there's no gaurantee that they'll continue to function as such, seeing as they're not supposed to be used as a pattern at all.) If Zugg ever changes this so these no longer work, you're going to have a job ahead of yourself going through all your now-broken scripts, to set them up the way they should have been in the first place. |
|
|
|
|
|
|
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
|
|