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
➜ Sending commands after DoAfter
|
Sending commands after DoAfter
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Stoned00d
(14 posts) Bio
|
| Date
| Sun 05 May 2002 10:10 PM (UTC) |
| Message
| Hypothetically, if I did the following (in VB):
world.doafter 10, AAA
world.send BBB
would command AAA or BBB be executed first? If AAA gets executed first, is there anyway to send a command between the doafter and not leave myself hanging? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 05 May 2002 10:23 PM (UTC) |
| Message
| Send is done immediately, DoAfter makes a timer. Thus, BBB would be done first.
What do you mean "is there anyway to send a command between the doafter"? Do you mean "after" the DoAfter?
Here are a couple of ways ...
world.doafter 10, "AAA"
world.doafter 11, "BBB"
That sends AAA after 10 seconds, and "BBB" a second later.
But, if you want to do AAA and BBB one after the other, do this ...
world.doafter 10, "AAA" & vbCrLf & "BBB"
The "vbCrLf" is a Carriage-return/Line Feed, in other words, a new line.
If you want to do a lot of things, just lay out your code like this ...
world.doafter 10, _
"AAA" & vbCrLf _
"BBB" & vbCrLf _
"CCC" & vbCrLf _
"DDD" & vbCrLf _
"EEE" & vbCrLf
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Stoned00d
(14 posts) Bio
|
| Date
| Reply #2 on Mon 06 May 2002 11:53 PM (UTC) |
| Message
| | nono, you explaination was great. What I was wondering was whether using DoAfter would incapacitate my ability to input additional commands after the DoAfter was entered but not yet executed. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Tue 07 May 2002 12:45 AM (UTC) |
| Message
| No it will not. Unlike the speedwalk queue, where new commands are entered at the end of the queue, DoAfter works differently. It is simply a shorthand way of creating a once-off timer. Until the timer fires you can do anything you want.
So, for example, in a fight you might do this:
/doafter 15, "cast heal self"
... and then keep fighting, knowing that after 15 seconds you will be healed. In the meantime (during those 15 seconds) you can enter as many commands as you want. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Stoned00d
(14 posts) Bio
|
| Date
| Reply #4 on Thu 09 May 2002 06:44 PM (UTC) |
| Message
| I upgraded to 3.20 yesterday, and I'm having some problems with doafter
After typing in
/world.doafter 2, "cast heal"
and waited to be healed. However, after 2 seconds nothing happened? Did I do somethign wrogn? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #5 on Fri 10 May 2002 07:39 AM (UTC) |
| Message
| What you typed was OK, but there might be one of two problems ...
- This is a script function so make sure scripting is enabled in world configuration.
- It uses timers, so make sure timers are enabled.
|
- 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.
20,587 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top