Back to OmaTips

Wait. Wait! WAIT!! bah!
Need a pause in your script? Former zMud users probably are familiar with #wait. It's a handy command. If you don't know, here's what it basically does... Somewhere in your script you want the process to pause for a length of time, then continue executing. Well MM doesn't have such a command, although it's been asked for a number of times.
But MM DOES have the ability to do this, and it's simple, very simple.

You need a couple vars, nothing important. One's for a time stamp, another is just for junk (temp).
Then just a simple /while statement.

/var {wtime} {0}
/var {temp} {null}
...in the script where you want a pause just add the following:
[previous command];/var {wtime} {@Time()};/while {@Math(@Time()-$wtime)<=5} {/var temp null};[continue on with commands]

Because /while is like an if and a loop, the /while process will effectively "wait" for the given duration (in the above example for 5 seconds). Then the script will continue on.