Register forum user name Search FAQ

Gammon Forum

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 ➜ General ➜ Question about Slow speedwalker plugin

Question about Slow speedwalker plugin

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Petethemeat   (9 posts)  Bio
Date Mon 27 Dec 2010 07:22 PM (UTC)
Message
Im trying to get the plugin to work, theres two things I cant work out.

First, and this is almost embarassing, but I want the exit_trigger to trigger on "Hot desert" and "A savanna" but I dont seem to have any luck with that, where shall I put the words to trigger on in the exits_trigger below?

"^((?P<exits>Exits: .*\.)|(.*)Alas, you cannot go that way\.)$" >

Second, I would like the speedwalker to randomly wait 0.5-3 secs before it walks to the next room.

Pete
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 28 Dec 2010 08:28 AM (UTC)
Message
Petethemeat said:

Second, I would like the speedwalker to randomly wait 0.5-3 secs before it walks to the next room.


Near the start of the plugin was this:


  <!ENTITY delay_secs "0.5" >


That is the delay before walking.

As for the exits, do you mean "Hot desert" appears instead of Exits?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Petethemeat   (9 posts)  Bio
Date Reply #2 on Tue 28 Dec 2010 10:07 AM (UTC)
Message
Yes, both Hot desert and a savanna!


When delay are set to 0.5, will it wait for exactly 0.5 secs ? I want it to choose a random number between 0.5 and 3 secs every time it takes a step!
regards
Pete
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 29 Dec 2010 05:51 AM (UTC)

Amended on Wed 29 Dec 2010 05:52 AM (UTC) by Nick Gammon

Message
Original post:

http://www.gammon.com.au/forum/?id=6008

To randomize the delay, down in the plugin where it says:


 if &delay_secs; &gt; 0 then
      wait.time (&delay_secs;)
 end -- if pause wanted


Change it to:



  wait.time (math.random (5, 30) / 10)  -- wait 0.5 to 3 seconds


To match on the "hot desert" stuff try changing:


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


to:


<!ENTITY exits_trigger 
      "^((?P<exits>(Hot desert|A savanna))|(.*)Alas, you cannot go that way\\.)$" > 


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Petethemeat   (9 posts)  Bio
Date Reply #4 on Thu 30 Dec 2010 07:10 AM (UTC)

Amended on Thu 30 Dec 2010 03:35 PM (UTC) by Petethemeat

Message
Thanks Nick, that works great :)
Since we are talking about slow speedwalker plugin, I have another question!
I have two triggers to match when I step into a room with a single enemy or a mob; One trigger sends "pause speedwalker" to execute and one trigger sends to script and start killing stuff!
Now to my problem; The pause speedwalk trigger works just fine, doing what its supposed to do, but the second trigger wont fire unless I disable the first trigger, witch is ruining the whole idea since the speedwalk wont pause!

So, in short terms, Im having problem with two triggers matching the exact same pattern!
Is it possible to merge this two triggers into one or do I have to keep them as they are ? What if, what will they look like then?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 30 Dec 2010 08:49 PM (UTC)
Message
Set both triggers to "Keep evaluating" (tick the checkbox). Then they will both match.

- 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.


21,384 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.