|
member548 Newbie
Joined: 01 Sep 2002 Posts: 2 Location: USA
|
Posted: Sun Sep 01, 2002 4:44 am
how to trigger on anything but a excluded line |
Lets say I'm in a room with a hand full of fixed lines, and I want a trigger that trips anytime something not matching one of those lines happens. For instance I just see the following two lines commonly.
Shadow just walked in.
You fall down.
Now I need a trigger that ignores those two lines but accepts any other possible action. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Sep 01, 2002 4:54 am |
quote:
Lets say I'm in a room with a hand full of fixed lines, and I want a trigger that trips anytime something not matching one of those lines happens. For instance I just see the following two lines commonly.
Shadow just walked in.
You fall down.
Now I need a trigger that ignores those two lines but accepts any other possible action.
The trigger you asked for happens to be something like this:
#trigger {(*)} {#if (%ismember("%1", "Shadow just walked in.|You fall down.")) {#noop do nothing} {trip}}
Why you'd need this particular trigger for is still a mystery, though. Why would you need a trigger that could fire on ANY line but the specified ones? Simply curious, since the general idea of a trigger is to fire on a given line, not ignore it when the line comes up.
li'l shmoe of Dragon's Gate MUD |
|
|
|
member548 Newbie
Joined: 01 Sep 2002 Posts: 2 Location: USA
|
Posted: Sun Sep 01, 2002 9:20 pm |
Thanks Matt that seems to be doing what I need. What I'm trying to do is set up a way to pick up on anything unusual happening in a area my character trains, it'd be all to easy to be killed by some random PC if I'm not carefull. Another problem I'm having trouble with is how to add a wild card into this. So that it would work on any intance of a shadow like so.
Shadow #2 walks in.
Shadow #3 walks in.
And so on. I know I could just make a new line for each one and every action but that seems like a bit much.
Added later.
After struggling for hours to make the above command accept wild cards I finally struck on a trigger like this.
For pattern: (*)
action: #if (@sn=1) {#noop} {#pl c:click.wav}
#va sn 5
The above trigger was placed in a class folder inside the class folder the following trigger(s) are in.
Pattern: {The}*{shadow walks in.}
Action: #va sn 1
And many more triggers with patterns based for evey common action in a room can be added. Because the triggers setting the variable SN to 1 are in a "higher" class folder they beat the IF statement, then SN gets reset to 5 in order to check the next possible line. Using this someone could set up a script that will warn you of any outside the ordinary action happens in a common training area, great for muds with Pkill happy folks or tough AFK policys. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Sep 03, 2002 8:45 pm |
The next step to securing that concept is attaching time sensitivity to things.
If you are being echo'd, most times the echo'er will not respect the normal time interval to the echo'd sequence.
Ton Diening |
|
|
|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Wed Sep 04, 2002 3:37 pm |
What do you mean by that TonDiening. Could you explain that a bit more?
By the way, here is what I do.
I create a variable string list and include all my matching patterns of what I consider "common messages".
Then I create a trigger that matches anything else using the "NOT".
#tr {{^{@common_list}}} {#color bright red}
Be warned though, something I've noticed problems with this trigger.
Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.34
Zmapper Version 1.10 |
|
|
|
|
|