<?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=ScriptGosub</id>
		<title>ScriptGosub - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.amuletsandarmor.com/index.php?action=history&amp;feed=atom&amp;title=ScriptGosub"/>
		<link rel="alternate" type="text/html" href="http://wiki.amuletsandarmor.com/index.php?title=ScriptGosub&amp;action=history"/>
		<updated>2026-04-29T12:27:14Z</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=ScriptGosub&amp;diff=1760&amp;oldid=prev</id>
		<title>PeeWeeRotA: Created page with &quot;Gosub( [ScriptNum] )  Executes the specified script, and then continue executing the current script.  '''Note:''' Unlike Goto and If commands, Gosu...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.amuletsandarmor.com/index.php?title=ScriptGosub&amp;diff=1760&amp;oldid=prev"/>
				<updated>2014-03-05T18:20:30Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Gosub( [ScriptNum] )  Executes the specified script, and then continue executing the current script.  &amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; Unlike &lt;a href=&quot;/index.php?title=ScriptGoto&quot; title=&quot;ScriptGoto&quot;&gt;Goto&lt;/a&gt; and &lt;a href=&quot;/index.php?title=ScriptIf&quot; title=&quot;ScriptIf&quot;&gt;If&lt;/a&gt; commands, Gosu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Gosub( [ScriptNum] )&lt;br /&gt;
&lt;br /&gt;
Executes the specified script, and then continue executing the current script.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
Unlike [[ScriptGoto|Goto]] and [[ScriptIf|If]] commands, Gosub finishes executing the current script block. This happens because the specified script is added to the scope and then returns control to the existing script, instead of changing control.&lt;br /&gt;
&lt;br /&gt;
===Arguments===&lt;br /&gt;
&lt;br /&gt;
'''ScriptNum''' - Script to execute&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
18:     // druid room switch 3&lt;br /&gt;
   Compare(TrapComplete, COMPLETE);&lt;br /&gt;
   If(Equal, 99);&lt;br /&gt;
   Block(Block6);&lt;br /&gt;
   Set(TrapDoor, ACTIVATED);&lt;br /&gt;
   ChangeSideTexture(1592,&amp;quot;SWIT1U&amp;quot;);&lt;br /&gt;
   AreaSound(6007,173,1144,300,255);&lt;br /&gt;
   Delay(300);&lt;br /&gt;
   Gosub(23);&lt;br /&gt;
   Delay(160);&lt;br /&gt;
   ChangeSideTexture(1592,&amp;quot;SWIT1D&amp;quot;);&lt;br /&gt;
   AreaSound(6007,173,1144,300,255);&lt;br /&gt;
   Gosub(20);&lt;br /&gt;
   Unblock(Block6);&lt;br /&gt;
   End();&lt;br /&gt;
&lt;br /&gt;
20:     // missiles in trap&lt;br /&gt;
   GenerateMissile(4015, 39, 866, 45, -24, 866, 45, 50);&lt;br /&gt;
   GenerateMissile(4015, 39, 986, 45, -24, 986, 45, 50);&lt;br /&gt;
   End();&lt;br /&gt;
&lt;br /&gt;
23:    // open last door&lt;br /&gt;
   Block(Block9);&lt;br /&gt;
   SlideCeilingNice(168,0,120,50,-1);&lt;br /&gt;
   AreaSound(5003, 2, 824, 500, 255);&lt;br /&gt;
   Delay(90);&lt;br /&gt;
   SlideCeilingNice(168,0,0,50,-1);&lt;br /&gt;
   AreaSound(5003, 2, 824, 500, 255);&lt;br /&gt;
   Delay(70);&lt;br /&gt;
   Unblock(Block9);&lt;br /&gt;
   End();&lt;br /&gt;
&lt;br /&gt;
99:     // all purpose ender&lt;br /&gt;
   End();&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>PeeWeeRotA</name></author>	</entry>

	</feed>