 |
Buba Newbie
Joined: 01 May 2002 Posts: 0
|
Posted: Wed Mar 27, 2002 9:02 pm
Matching Multi-Line Patterns |
How would I match multiple lines to a pattern for instance if i had output
You Say, "Hi"
Jack Says, "Hi"
how do i make a trigger that only activates when that exact 2 lines comes in order? |
|
|
 |
kognesty Newbie
Joined: 08 Jan 2001 Posts: 8 Location: USA
|
Posted: Wed Mar 27, 2002 9:31 pm |
If you have the latest version of zMUD, then you also have the new trigger setup. With this new setup you can combine two triggers into one, and have it set to match the first hi then turn on the second trigger to match the second line in that specific order, the action you assign would then only occur when both triggers have been activated in that specific order. For more information on how exactly to set this up, please read the help file on advanced trigger states. I have not yet used this new feature so I can not supply you an exact syntax, but it should do what you want.
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Mar 28, 2002 12:16 am |
quote:
I've not tested this, and am a rank amature myself, but I think that $ matches the end of line, so you could have a trigger that matched:
You Say, "Hi"$Jack Says, "Hi"
- LEit
I'm not sure if this syntax would work for such lines if they don't come at the same time. If it does, great, but if not and you're using version 6.16 (the last public version) then you'll probably have to use two triggers:
#trigger {You say, "Hi"} {#T+ Responses}
#trigger {(%w) says, "Hi"} {#VARIABLE WhosListening "";#ADDITEM WhosListening %1;#T- Responses}
li'l shmoe of Dragon's Gate MUD |
|
|
 |
|
|
|
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
|
|