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
➜ Plugins
➜ Slow speedwalk plugin question
Slow speedwalk plugin question
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Terrori
(3 posts) Bio
|
Date
| Sat 20 Jun 2020 10:12 AM (UTC) |
Message
| 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 20 Jun 2020 10:43 AM (UTC) Amended on Sat 20 Jun 2020 10:44 AM (UTC) by Nick Gammon
|
Message
|
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:
Then the numbers are part of <anything>. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Terrori
(3 posts) Bio
|
Date
| Reply #2 on Sat 20 Jun 2020 11:13 AM (UTC) Amended on Sat 20 Jun 2020 12:24 PM (UTC) by Terrori
|
Message
| 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? | 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.
9,778 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top