<?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%3ASetPlayerProximityFunction</id>
	<title>LUA:SetPlayerProximityFunction - 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%3ASetPlayerProximityFunction"/>
	<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:SetPlayerProximityFunction&amp;action=history"/>
	<updated>2026-07-11T11:30:44Z</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:SetPlayerProximityFunction&amp;diff=4793&amp;oldid=prev</id>
		<title>Thefoof: /* Usage */</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:SetPlayerProximityFunction&amp;diff=4793&amp;oldid=prev"/>
		<updated>2013-05-10T01:48:32Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:48, 10 May 2013&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-l10&quot; &gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&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: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; 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: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; 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: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&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: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When a player enters within 10 meters of a spawn with this function in their script, a function &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;name &lt;/del&gt;InRange will be called, and when they leave LeaveRange will be called.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;When a player enters within 10 meters of a spawn with this function in their script, a function &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;named &lt;/ins&gt;InRange will be called, and when they leave LeaveRange will be called.&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: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&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: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&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: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[LUA:MiscFunctions|Back to LUA General Functions Index]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[LUA:MiscFunctions|Back to LUA General Functions Index]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thefoof</name></author>
		
	</entry>
	<entry>
		<id>https://oldwiki.eq2classic.com/index.php?title=LUA:SetPlayerProximityFunction&amp;diff=4792&amp;oldid=prev</id>
		<title>Thefoof: Created page with &quot;This sets a range around a spawn to detect when a player is within the set range, and when they leave the range, calling functions each time. The out of range parameter is option...&quot;</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:SetPlayerProximityFunction&amp;diff=4792&amp;oldid=prev"/>
		<updated>2013-05-10T01:48:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This sets a range around a spawn to detect when a player is within the set range, and when they leave the range, calling functions each time. The out of range parameter is option...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This sets a range around a spawn to detect when a player is within the set range, and when they leave the range, calling functions each time. The out of range parameter is optional.&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
SetPlayerProximityFunction(target, range, &amp;quot;In range function&amp;quot;, [&amp;quot;out of range function&amp;quot;])&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function spawn(NPC)&lt;br /&gt;
	SetPlayerProximityFunction(NPC, 10, &amp;quot;InRange&amp;quot;, &amp;quot;LeaveRange&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When a player enters within 10 meters of a spawn with this function in their script, a function name InRange will be called, and when they leave LeaveRange will be called.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[LUA:MiscFunctions|Back to LUA General Functions Index]]&lt;/div&gt;</summary>
		<author><name>Thefoof</name></author>
		
	</entry>
</feed>