Problem with slow_speedwalk plugin

Posted by Apotheos on Mon 14 Oct 2024 02:18 AM — 5 posts, 9,215 views.

#0
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?
#1
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.
Australia Forum Administrator #2
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.
Amended on Mon 14 Oct 2024 08:29 PM by Nick Gammon
#3
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).
Australia Forum Administrator #4
That's not a valid regular expression. You want:


"Exits"


Besides, perhaps the "keep evaluating" should be on the trigger which matches the line first. Why do you want to keep evaluating anyway?