|
graywolf Apprentice
Joined: 21 Jul 2001 Posts: 116 Location: USA
|
Posted: Wed Aug 06, 2003 1:39 am
Multi - line trigger |
-- There are six obvious exits: north, south, west, east,
northwest and northeast.
>
#TRIGGER {^-- There [is|are] %w obvious [exit|exits]: *.} {#beep}
Works fine when the directions fot on one line, but doesn't work at all if its more than one line.
thanks for any help |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Aug 06, 2003 7:54 am |
Right. So try to remove the excess stuff that makes it sometimes go over one line.
#TR {^-- There [is|are] %w obvious exit} {#beep} |
|
|
|
graywolf Apprentice
Joined: 21 Jul 2001 Posts: 116 Location: USA
|
Posted: Wed Aug 06, 2003 4:21 pm |
thats a good idea except i didn't tell you the whole story. the next step i am going to do is to write a trigger that collects all the room contents and puts them in an array.
i was wondering if something like this would work...
#TRIGGER {^-- There [is|are] %w obvious [exit|exits]: [*.|*$*.]} {#beep} |
|
|
|
graywolf Apprentice
Joined: 21 Jul 2001 Posts: 116 Location: USA
|
Posted: Wed Aug 06, 2003 4:36 pm |
I was able to get
#TRIGGER {^-- There [is|are] %w obvious [exit|exits]:*$*.} {#beep}
this to work on multiple line exit descriptions. but i can't see a way to make one trigger work for both instances of single line or multiple line exit descriptions.
thanks again for any insight into this :) |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Wed Aug 06, 2003 6:22 pm |
You cannot place a wildcard in one of those [either|or] elements. You will have to make two triggers -- one for single line, one for double line.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Aug 06, 2003 9:10 pm |
#TR {^-- There {is|are} %w obvious exit{s|}: (*)$} {Exits="%1";#IF (%ends(@Exits,".")) {#BEEP;Exits=%leftback(@Exits,1)}}
#COND {^(*).$} {Exits=%concat(@Exits,"%1");#BEEP} {within|param=1}
I decided to go ahead and add the script to capture the exits, if you don't find it needed feel free to strip it. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Aug 06, 2003 9:16 pm |
You should also note that {is|are} matches only "is" or "are". [is|are] matches any combination of "a", "e", "i", "r", "s", and "|". That is, "is", "are", "seer", "raise", "s|r", etc.
|
|
|
|
|
|