 |
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: Thu Sep 09, 2004 4:00 pm
Advanced triggering question |
Ok, this one has been messing with my mind a bit, so let's see what the rest of you come up with.
I have this room name from the mud.
West Gate of Bree(e, s, w, nw and n)
And I use this trigger
#regex {West Gate of Bree\(e, s, w, nw and n\)} {#CW green}
Everything is good and kosher, but the tricky programmers have the directions in the room names so they'll jumble up.
West Gate of Bree(n, e, nw, s and w)
So now the trigger doesn't fire 100% of the time, just depends when the room name is jumbled up for me.
Here's the question. How can you set up the trigger so that it will hit all combinations of those directions, but without using .* for the wildcard?
I know, I know, I'm using the PERL regens, but they are a bit faster I think. As always speed is a very good thing
Thanks! |
|
_________________ Yama |
|
|
 |
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Thu Sep 09, 2004 4:06 pm |
From Zmud help file
%t match a direction command |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Sep 09, 2004 6:39 pm |
%t won't match 'and' or the commas and spaces.
#TR {West Gate of Bree~([adensuw, ]~)} {#CW green}
Convert it to get a regular expression. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: Thu Sep 09, 2004 6:40 pm |
That will work just fine on some rooms. But here's the catch.
We have rooms that have exits called enter, out, city, gate, bridge, bathroom.
As you can see, they don't fit into %t or \T+ for the PERL people here.
What can be done so zmud can still figure out that it's highlighting the correct room? |
|
_________________ Yama |
|
|
 |
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: Thu Sep 09, 2004 9:03 pm |
Ok, thanks for the help.
for signposts that use the regular directions %t works fine, and any special names the [xyz, ] fixes them.
Thanks for the help once again. |
|
_________________ Yama |
|
|
 |
|
|
|
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
|
|