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.
Entire forum
➜ MUSHclient
➜ Plugins
➜ Problem with slow_speedwalk plugin
Problem with slow_speedwalk plugin
|
You need to log onto the forum to reply or create new threads.
Refresh page
Posted by
| Apotheos
(3 posts) Bio
|
Date
| Mon 14 Oct 2024 02:18 AM (UTC) |
Message
| I am tryin to use the plugin that Nick posted on June 3 2008 for a slow_speedwalk:
https://www.gammon.com.au/forum/?id=6008
I am having trouble with what I believe is this portion:
<!ENTITY exits_trigger
"^((?P<exits>\\[Exits\\: .+\\])|(.*)Alas, you cannot go that way\\.)$" >
]>
The exits are not the first line that is printed when I move to another room. When I create my own trigger to match something like this, I can use "keep evaluating". I dont have much LUA scripting experience or any knowledge of plugins..how can I modify Nick's to accomodate this? | Top |
|
Posted by
| Apotheos
(3 posts) Bio
|
Date
| Reply #1 on Mon 14 Oct 2024 12:11 PM (UTC) |
Message
| To add a bit more for clarity - my game descriptions look something like this:
On the Ocean
Here, porpoises and manatees swim, splashing dutifully into the
sea. You marvel at the schools of sharks that streak through the
ocean as though they were birds coating in the air. On the
ocean's surface, you note seaweed floating gently beside you.
[ Exits: north east south west ]
So when I create a trigger to recognize moving to a new room, I just use *Exits* and check the box to Keep Evaluating. But, I don't know how to "Keep Evaluating" when the trigger is built into a plugin function. | Top |
|
Posted by
| Nick Gammon
Australia (23,100 posts) Bio
Forum Administrator |
Date
| Reply #2 on Mon 14 Oct 2024 08:24 PM (UTC) Amended on Mon 14 Oct 2024 08:29 PM (UTC) by Nick Gammon
|
Message
| In the plugin, locate the line which does "wait.regexp":
-- now wait for an appropriate response
line, wildcards = wait.regexp ("&exits_trigger;", &timeout_secs;):
Add the flag trigger_flag.KeepEvaluating to that call, like this:
-- now wait for an appropriate response
line, wildcards = wait.regexp ("&exits_trigger;", &timeout_secs;, trigger_flag.KeepEvaluating):
Reload that plugin and it should keep evaluating. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Apotheos
(3 posts) Bio
|
Date
| Reply #3 on Mon 14 Oct 2024 08:49 PM (UTC) |
Message
| Thanks for the quick response Nick and thanks for being so available to support all who use the awesome Mushclient!
Unfortunately, I made the adjustment to the plugin and am still seeing an error in the traceback:
TRACE: Fired timer wait_trigger_8949
TRACE: Executing timer script "wait.timer_resume"
Speedwalk timed-out
I went and modified the trigger to capture an even broader range:
<!ENTITY exits_trigger
"*Exits*" >
and I still can't get it to work. It is strange - I built that exact trigger outside of the plugin and it fires (when using Keep Evaluating). | Top |
|
Posted by
| Nick Gammon
Australia (23,100 posts) Bio
Forum Administrator |
Date
| Reply #4 on Mon 14 Oct 2024 08:59 PM (UTC) |
Message
| That's not a valid regular expression. You want:
Besides, perhaps the "keep evaluating" should be on the trigger which matches the line first. Why do you want to keep evaluating anyway? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
443 views.
You need to log onto the forum to reply or create new threads.
Refresh page
top