<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.amuletsandarmor.com/index.php?action=history&amp;feed=atom&amp;title=ScriptIf</id>
		<title>ScriptIf - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.amuletsandarmor.com/index.php?action=history&amp;feed=atom&amp;title=ScriptIf"/>
		<link rel="alternate" type="text/html" href="http://wiki.amuletsandarmor.com/index.php?title=ScriptIf&amp;action=history"/>
		<updated>2026-05-05T09:08:05Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://wiki.amuletsandarmor.com/index.php?title=ScriptIf&amp;diff=1917&amp;oldid=prev</id>
		<title>PeeWeeRotA at 01:29, 18 October 2016</title>
		<link rel="alternate" type="text/html" href="http://wiki.amuletsandarmor.com/index.php?title=ScriptIf&amp;diff=1917&amp;oldid=prev"/>
				<updated>2016-10-18T01:29:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 01:29, 18 October 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot; &gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	End()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	End()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;----&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Back to [[Scripting]] Main Page&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PeeWeeRotA</name></author>	</entry>

	<entry>
		<id>http://wiki.amuletsandarmor.com/index.php?title=ScriptIf&amp;diff=1750&amp;oldid=prev</id>
		<title>PeeWeeRotA: Created page with &quot;'''If( [Result], [ScriptNum])'''  Checks the result of the last Compare statement and jumps to the specified script number if the results match. This is used...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.amuletsandarmor.com/index.php?title=ScriptIf&amp;diff=1750&amp;oldid=prev"/>
				<updated>2014-03-05T16:33:26Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;If( [Result], [ScriptNum])&amp;#039;&amp;#039;&amp;#039;  Checks the result of the last &lt;a href=&quot;/index.php?title=ScriptCompare&quot; title=&quot;ScriptCompare&quot;&gt;Compare&lt;/a&gt; statement and jumps to the specified script number if the results match. This is used...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''If( [Result], [ScriptNum])'''&lt;br /&gt;
&lt;br /&gt;
Checks the result of the last [[ScriptCompare|Compare]] statement and jumps to the specified script number if the results match. This is used like conditional goto statements in assembly languages. The code will stop executing from the current script and move to the new script without returning.&lt;br /&gt;
&lt;br /&gt;
One trick is to use an empty script function, normally #99, to end execution. In the Code Example below, the If statement jumps to an empty block if the switch has already been activated. This prevents further uses of the same switch.&lt;br /&gt;
&lt;br /&gt;
Possible Result comparisons are:&lt;br /&gt;
* Equal&lt;br /&gt;
* NotEqual&lt;br /&gt;
* LessThan&lt;br /&gt;
* NotLessThan&lt;br /&gt;
* GreaterThan&lt;br /&gt;
* NotGreaterThan&lt;br /&gt;
* LessThanOrEqual&lt;br /&gt;
* GreaterThanOrEqual&lt;br /&gt;
&lt;br /&gt;
===Arguments===&lt;br /&gt;
&lt;br /&gt;
'''Result''' - Result comparison to check if true  &lt;br /&gt;
&lt;br /&gt;
'''ScriptNum''' - Script number to jump into.&lt;br /&gt;
&lt;br /&gt;
===Code Example===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
defnum	NOT_COMPLETE	0&lt;br /&gt;
defnum	COMPLETE		1&lt;br /&gt;
&lt;br /&gt;
// Variables are defined with defvar and you have 1..255 of them&lt;br /&gt;
defvar	ExitSwitch		1&lt;br /&gt;
defvar	Block1			2&lt;br /&gt;
&lt;br /&gt;
Initialize:&lt;br /&gt;
0: // Script run when the level is loaded&lt;br /&gt;
	Set(ExitSwitch, NOT_COMPLETE);&lt;br /&gt;
	Unblock(Block1);&lt;br /&gt;
	End()&lt;br /&gt;
&lt;br /&gt;
40:  // raise exit floor with switch&lt;br /&gt;
	Compare(ExitSwitch, COMPLETE);&lt;br /&gt;
	If (Equal, 99); &lt;br /&gt;
	Block(Block1);   &lt;br /&gt;
	ChangeSideTexture(1373,&amp;quot;SWIT1U&amp;quot;);&lt;br /&gt;
	AreaSound(6007,-2943,-12,300,255);&lt;br /&gt;
	SlideFloorNice(114, -400, -64, 100, -1);&lt;br /&gt;
	Set(ExitSwitch, COMPLETE);&lt;br /&gt;
	Unblock(Block1);&lt;br /&gt;
	End()&lt;br /&gt;
&lt;br /&gt;
99: //Escape function&lt;br /&gt;
	End()&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>PeeWeeRotA</name></author>	</entry>

	</feed>