Slow speedwalk plugin question

Posted by Terrori on Sat 20 Jun 2020 10:12 AM — 3 posts, 13,304 views.

#0
Hello all,

First of all thanks very much Nick for the amazing speedwalk plugin, it works wonders. I am having one small issue which may be an elementary fix, but I can't seem to understand how to do it.

If I set the speedwalk to 0.1 instead of the default delay time of 0.5, then it tends to walk too fast and actually go past <TARGET> mobs.

If I am right, I suspect it is because it is seeing the [Exits: north south] before it sees the [TARGET] in the room which I am triggering off to pause the speedwalk, and so it steps to the next room, then pauses it and has nothing to attack.

Is there a way I can trigger off part of my prompt instead? e.g. if I put the word MELON next to my hp/mana so that I see 100 100 MELON every return, then it would see that AFTER the exits and hopefully allow quicker walking between targets.

I tried playing with the XML but am not proficient enough to change the part I think I need to change.

I amended the original:

<!ENTITY exits_trigger
"^((?P<exits>\\[Exits\\: .+\\])|(.*)Alas, you cannot go that way\\.)$" >

to

<!ENTITY exits_trigger
"^((?P*100 100 MELON*)|(.*)Alas, you cannot go that way\\.)$" >

And when I tried to enable the plugin, and use it in a speedwalk it gave me:

Run-time error
Plugin: Slow_speedwalk (called from world: MUDworld)
Function/Sub: func_handle_speedwalk called by alias
Reason: processing alias ""
C:\Program Files (x86)\MUSHclient\lua\wait.lua:178: C:\Program Files (x86)\MUSHclient\lua\wait.lua:110: Bad regular expression syntax
stack traceback:
[C]: ?
C:\Program Files (x86)\MUSHclient\lua\wait.lua:178: in function 'make'
[string "Plugin: Slow_speedwalk"]:10: in function <[string "Plugin: Slow_speedwalk"]:8>

Could somebody possibly help, and let me know where I may be going wrong? Or if in fact I'm completely wrong in my train of thought.

Much appreciated.
Australia Forum Administrator #1
Quote:

"^((?P*100 100 MELON*)|(.*)Alas, you cannot go that way\\.)$" >


Regular expressions don't use a single "*" as a wildcard. Like the second half, if you want to match <anything>100 100 MELON<anything> then you need: .*100 100 MELON.*

But will those numbers always be 100?

If not, why not use:


.*MELON.*


Then the numbers are part of <anything>.
Amended on Sat 20 Jun 2020 10:44 AM by Nick Gammon
#2
Hmm thank you for the suggestion, I tried that and it did get rid of the compile error, however I am facing the same issue.

With:

<!ENTITY delay_secs "0.1" >
<!ENTITY exits_trigger "^((.*MELON.*)|(.*)Alas, you cannot go that way\\.)$" >

It is still walking past targets somehow. If for example there were 3 rooms in a line, with room 2 having a <TARGET> in, then it seems to be processing like:

EAST

<TARGET> spotted
Pause Speedwalk

EAST

attack target

They are not here.

I can't fathom how it's managing to recognise that the target is there, pausing speedwalk but then still inputting the next east. Is it just that 0.1 sec is too fast? I didn't think it would matter if it is designed to stop on sight of a target.

Hope I'm making sense, and not just rambling on!

Thank you again for replying too.


*** EDIT ***

I've played around with it some more, and now when it sees a <TARGET> I'm triggering to just pause speedwalk and nothing else.

This seems to work 100% fine with no walking past targets, so I suspect it is something to do with me chaining commands off the <TARGET>?

My original trigger was:

*<TARGET>* sends

Execute ("pause speedwalk")
Send ("attack' @target")
EnableTriggerGroup("master", false)
EnableTriggerGroup("switch", true)

And that was somehow saying it had paused speedwalk, walked past the mob, then tried to attack. With only Execute ("pause speedwalk") instead now, it is stopping 100% of the time.

Any thoughts?