All pastes #974269 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-04-06 18:13 UTC
rendered paste body
Utils.matchPut = function(command, matches) {
	var wait = matches.match("...wait");
	var queue = matches.match("Sorry, you may only type");
	var match = 0;
	while (true) {
		script.waitForRoundtime();
		script.put(command);
		match = matches.matchWait();

		if (match == wait) {
			script.waitForRoundtime();
		} else if (match == queue) {
			script.pause(0.5);
		} else {
			return match;
		}
	}
}