This command will make an input box pop up on the client connected to the
RID#Usage, to allow entering of a string or digits
only, depending on variable's type.
Normally you cannot input a negative number with this command, to prevent
exploits in badly written scripts, which would let people, for example, put
negative amounts of [Zeny] into a bank script and receive free Zeny as
result. The default values for min value and max value are specified as
input_min_value and input_max_value respectively in
{{git|conf/script.conf}}.
The command has two additional optional arguments and a return value to safely
override this behavior, when required. Depending on the variable type used,
the min, max, and return value have different meanings:
[Mes] "[Woman]";
mes "Try and guess the number I am thinking of.";
mes "The number will be between 1 and 10.";
[Next];
[Set] .@number, [Rand](1, 10);
[While](input(.@guess, 1, 10))
{
mes "[Woman]";
mes "Didn't you listen before? The number is between 1 and 10.";
next;
}
mes "[Woman]";
[If](.@guess==.@number)
{
mes "Well done, that was the number I was thinking of.";
}
else
{
mes "Sorry, that wasn't the number I was thinking of.";
}
[Close];
mes "[Man]";
mes "You need a password to pass.";
next;
input .@pwd$;
if(.@pwd$!="s3cr3t")
{
mes "[Man]";
mes "Get out.";
close;
}