delay method?

Posted by Mannoman on Sun 03 Sep 2006 09:17 AM — 2 posts, 14,993 views.

#0
is there a delay/pause method in JScript that just pauses the code for the specified time?

- Mannoman
Australia Forum Administrator #1
Pausing scripts literally is not usually a good idea as that will pause the client too.

If you simply want to send something to the MUD after a few seconds, use DoAfter:

http://www.gammon.com.au/scripts/doc.php?function=DoAfter

If you want to do more scripting after a few seconds, use DoAfterSpecial:

http://www.gammon.com.au/scripts/doc.php?function=DoAfterSpecial

If you are prepared to switch to scripting in Lua, you can use coroutines to effectively pause in the middle of a script. See this post:

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