<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.herc.ws/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.herc.ws/w/index.php?action=history&amp;feed=atom&amp;title=Input</id>
		<title>Input - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.herc.ws/w/index.php?action=history&amp;feed=atom&amp;title=Input"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Input&amp;action=history"/>
		<updated>2026-05-02T22:30:48Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/w/index.php?title=Input&amp;diff=474&amp;oldid=prev</id>
		<title>Via: Created page with &quot;==Syntax== *'''input''' &lt;variable&gt;[, &lt;min value&gt;[, &lt;max value&gt;]]; *'''input'''(&lt;variable&gt;[, &lt;min value&gt;[, &lt;max value&gt;]]);  ==Description== This command will make an input box ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Input&amp;diff=474&amp;oldid=prev"/>
				<updated>2013-06-10T22:15:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Syntax== *&amp;#039;&amp;#039;&amp;#039;input&amp;#039;&amp;#039;&amp;#039; &amp;lt;variable&amp;gt;[, &amp;lt;min value&amp;gt;[, &amp;lt;max value&amp;gt;]]; *&amp;#039;&amp;#039;&amp;#039;input&amp;#039;&amp;#039;&amp;#039;(&amp;lt;variable&amp;gt;[, &amp;lt;min value&amp;gt;[, &amp;lt;max value&amp;gt;]]);  ==Description== This command will make an input box ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Syntax==&lt;br /&gt;
*'''input''' &amp;lt;variable&amp;gt;[, &amp;lt;min value&amp;gt;[, &amp;lt;max value&amp;gt;]];&lt;br /&gt;
*'''input'''(&amp;lt;variable&amp;gt;[, &amp;lt;min value&amp;gt;[, &amp;lt;max value&amp;gt;]]);&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This command will make an input box pop up on the client connected to the [[RID#Usage|invoking character]], to allow entering of a string or digits only, depending on variable's type.&lt;br /&gt;
&lt;br /&gt;
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}}.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* For '''strings''' min and max specify the minimum and maximum string length. The return value is -1, if the string was too short, 1, if it was too long, otherwise 0.&lt;br /&gt;
* For '''numbers''' min and max specify the minimum and maximum value, the variable is allowed to be set to. If the entered value is outside the specified range [min,max], it is capped to the nearest valid value. The return value is -1 for too small values, 1 for too large values, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
 [[mes]] &amp;quot;[Woman]&amp;quot;;&lt;br /&gt;
 mes &amp;quot;Try and guess the number I am thinking of.&amp;quot;;&lt;br /&gt;
 mes &amp;quot;The number will be between 1 and 10.&amp;quot;;&lt;br /&gt;
 [[next]];&lt;br /&gt;
 &lt;br /&gt;
 [[set]] .@number, [[rand]](1, 10);&lt;br /&gt;
 [[while]](input(.@guess, 1, 10))&lt;br /&gt;
 {&lt;br /&gt;
     mes &amp;quot;[Woman]&amp;quot;;&lt;br /&gt;
     mes &amp;quot;Didn't you listen before? The number is between 1 and 10.&amp;quot;;&lt;br /&gt;
     next;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 mes &amp;quot;[Woman]&amp;quot;;&lt;br /&gt;
 [[if]](.@guess==.@number)&lt;br /&gt;
 {&lt;br /&gt;
     mes &amp;quot;Well done, that was the number I was thinking of.&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
     mes &amp;quot;Sorry, that wasn't the number I was thinking of.&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 [[close]];&lt;br /&gt;
&lt;br /&gt;
 mes &amp;quot;[Man]&amp;quot;;&lt;br /&gt;
 mes &amp;quot;You need a password to pass.&amp;quot;;&lt;br /&gt;
 next;&lt;br /&gt;
 &lt;br /&gt;
 input .@pwd$;&lt;br /&gt;
 if(.@pwd$!=&amp;quot;s3cr3t&amp;quot;)&lt;br /&gt;
 {&lt;br /&gt;
     mes &amp;quot;[Man]&amp;quot;;&lt;br /&gt;
     mes &amp;quot;Get out.&amp;quot;;&lt;br /&gt;
     close;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Via</name></author>	</entry>

	</feed>