Saturday, March 27, 2010

MUSHClient wait command

I'm not entirely sure if more recent versions of MUSHClient have a built-in wait function, but back when -I- started, here's how we had to make it work.

Change your Send To: to 'Script.'

In the Send box, type the following to initialize a wait:

require "wait"
wait.make (function ()

Send("Command")
Send("other Command")
wait.time(5)
Note("Five Seconds since other command.")

end)

6 comments:

  1. wouldn't it be simpler to use a DoAfterSpecial(0.5,alias) or some such?

    ylgor

    ReplyDelete
  2. Oh that is another way. But it requires you to do a DoAfterSpecial() for each and every command afterward. And every single call of the function starts at the beginning of the script execution where-as the wait.time() pauses the script for that time between two commands. I dunno..maybe I'll use DoAfter() as an experiment.

    ReplyDelete
  3. Grr..for some reason the following two got wiped from the post when I changed the comment-display settings. Phooey!

    ReplyDelete
  4. wouldn't it be simpler to use a DoAfterSpecial(0.5,alias) or some such?

    ylgor

    ReplyDelete
  5. Aaand I responded with something like:

    Probably although I only discovered that yesterday. Besides, DoAfter() is required on each and every command after you use it the first time as every instance of that function is called at the execution of the script, where-as wait.time(#) is run by itself between commands in sequential order.

    ReplyDelete
  6. It's alright. Makes sense I guess.
    -ylgor

    ReplyDelete

If you're Achaean, it'd be appreciated (although not required) to use the Name/URL selection to sign your comment. Beware: All comments are moderated, so any language will be censored. So don't even try.