Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Tips and tricks
➜ Trigger matching before a newline
|
Trigger matching before a newline
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Suf
(5 posts) Bio
|
| Date
| Sun 03 Aug 2003 04:18 AM (UTC) |
| Message
| I am working on a set of pk triggers for ArcticMud and there is a special case that I am having trouble getting to work correctly with MUSHclient.
Normally the plugin/system will check to see if a character name is in its pk list based on a limited number of triggers.
One example sentence might be:
Quote: Murgen flies in from the west.
or
Quote: Murgen is standing here.
So far so good. There is a command called scan that will look up, down, east, west, north, and south and display mobiles and characters in the adjacent rooms. The output is the same as if the mobiles or characters were in the same room as you.
It looks like this:
Quote:
Looking north:
You see nothing special.
Murgen is standing here.
Looking east:
You see nothing special.
Looking south:
You see nothing special.
Looking west:
You see nothing special.
Looking up:
You see nothing special.
Looking down:
You see nothing special.
615H 137V 55000000X 0C Exits:NSW>
What I am currently doing to avoid the triggers firing when you see a target on scan is to set a $pkEnabled variable to temporarily disable the actions firing which starts on the "Looking north:" line and re-enables the actions when it reaches the command prompt. The actions don't get re-enabled until a newline is sent from the mud after the prompt, which normally isn't unless some other events happen. Normally this wouldn't matter, but if your target were to move into the room at around the same time that you typed scan, the mud output might appear like this:
Quote:
615H 137V 55000000X 0C Exits:NSW>Murgen flies in from the north.
Solja flies in from the north.
The triggers wouldn't fire on Murgen because the actions hadn't been re-enabled until after the new line following north.
Is there any chance a toggle could be set on triggers to fire before reaching a newline character? Or if anyone has any other suggestions. This is relatively minor, and isn't too likely to happen, so I'd probably be willing to just live with its behavior.
Thanks,
Suf | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 03 Aug 2003 07:53 AM (UTC) |
| Message
| |
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #2 on Mon 04 Aug 2003 07:29 AM (UTC) |
| Message
| | How about selecting "keep evaluating" on both triggers, and making the prompt one of higher sequence? I would think that that lets mushclient both enable the matching trigger and match on the name. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Suf
(5 posts) Bio
|
| Date
| Reply #3 on Wed 06 Aug 2003 03:02 AM (UTC) |
| Message
| I think that would work quite well actually and I may end up trying that.
What I ended up doing is matching the newline before the prompt, which worked for me in this situation.
Thanks for the advice.
suf | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
17,818 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top