<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://oldwiki.eq2classic.com/index.php?action=history&amp;feed=atom&amp;title=LUA%3AGetSpawn</id>
	<title>LUA:GetSpawn - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://oldwiki.eq2classic.com/index.php?action=history&amp;feed=atom&amp;title=LUA%3AGetSpawn"/>
	<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:GetSpawn&amp;action=history"/>
	<updated>2026-07-13T05:31:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.3</generator>
	<entry>
		<id>https://oldwiki.eq2classic.com/index.php?title=LUA:GetSpawn&amp;diff=4986&amp;oldid=prev</id>
		<title>Jabantiz: Created page with &quot;= LUA Functions: GetSpawn() = Gets a spawn by the given spawn id.   ==== Syntax ==== var = GetSpawn(param1, param2)   ==== Parameters ==== ; Required - ''param1'' (Spawn), ''para...&quot;</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:GetSpawn&amp;diff=4986&amp;oldid=prev"/>
		<updated>2013-09-12T00:45:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= LUA Functions: GetSpawn() = Gets a spawn by the given spawn id.   ==== Syntax ==== var = GetSpawn(param1, param2)   ==== Parameters ==== ; Required - &amp;#039;&amp;#039;param1&amp;#039;&amp;#039; (Spawn), &amp;#039;&amp;#039;para...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= LUA Functions: GetSpawn() =&lt;br /&gt;
Gets a spawn by the given spawn id.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
var = GetSpawn(param1, param2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
; Required - ''param1'' (Spawn), ''param2'' (int32)&lt;br /&gt;
: ''param1'' is a known spawn in the same zone, usually the player&lt;br /&gt;
: ''param2'' is DB id of the spawn you want&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function hailed(NPC, Spawn)&lt;br /&gt;
    local spawn2 = GetSpawn(Spawn, 1234)&lt;br /&gt;
    local distance = GetDistance(Spawn, Spawn2)&lt;br /&gt;
    Say(NPC, &amp;quot;Distance to spawn: &amp;quot; .. distance)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NPC will respond with the distance to the closest spawn to the player with an id of 1234&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
Returns a spawn&lt;br /&gt;
&lt;br /&gt;
Gets the closest spawn to the spawn given as the first param&lt;/div&gt;</summary>
		<author><name>Jabantiz</name></author>
		
	</entry>
</feed>