From Kolmafia
Jump to navigation Jump to search

Function Syntax

void wait(int secs )

  • secs is the number of seconds you want to delay further action.

This function will initiate a countdown from secs seconds to 0, during which time nothing else will be acted on. It essentially pauses a script. In addition, a countdown prints to the CLI at varying intervals (every 15 secs for large numbers, 5 seconds for smaller numbers and every second from 5 seconds down).

Minimum wait is 1 second, even if secs is 0.

Code Samples

The following example will give a 5 second countdown before running dj's EatDrink script, if you have it.

print("Running the EatDrink script in...");
if (svn_exists("therazekolmafia-eatdrink"))
else print("You currently do not have EatDrink script, check the forums for it!", "blue");

CLI Equivalent

The CLI command "wait" functions the same and can be used to pause basic .txt scripts.

See Also