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
➜ Changing speedwalk delay on the fly
|
Changing speedwalk delay on the fly
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Maja
(3 posts) Bio
|
| Date
| Mon 29 Sep 2003 05:46 PM (UTC) Amended on Mon 29 Sep 2003 06:46 PM (UTC) by Maja
|
| Message
| I'm trying to make a speedwalk alias that walks a little while, then climbs a hill, waits for the 5 seconds it takes to climb the hill and then walks the rest of the way. Setting the speedwalk delay to 5 seconds would work but I want a delay of 0 for everything but the climb bit so something like
2n 3e blahblahblah (climb hill/) (/$world->{SpeedWalkDelay} = 1032;/) n (/$world->{SpeedWalkDelay} = 0;/) yadayada rest of speedwalk
would be nice to do but that doesn't seem to work (?). I've tried to do some scripts that do variations of:
$world->queue($world->evaluatespeedwalk("4n"), true); $world->{SpeedWalkDelay} = 5000;
$world->queue($world->DoAfterSpeedWalk(5,"rest of speedwalk"),true);
But the the second sets the delay immediately when I run the script and the second sets the timer 5 seconds after I run it, not 5 seconds after the first speedwalk has been done. Any pointers on how to achieve what I want (if you understand what I mean) would be appreciated.
Edit: I've looked through the forum a bit and found things that almost do this, but not quite (if I haven't missed it). | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 30 Sep 2003 07:00 AM (UTC) |
| Message
| You don't want to change the speedwalk delay to introduce a single delay. It doesn't remember the delay on a per-queued item, it is a global thing.
Simply do this:
$world->send ($world->evaluatespeedwalk("4n blah blah (climb hill)"));
$world->DoAfterSpeedWalk(5,"rest of speedwalk");
What this does is immediately do the first speedwalk, and the defer the rest of it for 5 seconds later. |
- 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.
10,946 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top