<?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%3AHasSpellEffect</id>
	<title>LUA:HasSpellEffect - 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%3AHasSpellEffect"/>
	<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:HasSpellEffect&amp;action=history"/>
	<updated>2026-07-15T03:35:58Z</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:HasSpellEffect&amp;diff=4956&amp;oldid=prev</id>
		<title>Jabantiz: Created page with &quot;= LUA Functions: HasSpellEffect() = Will check to see if the given spawn has the given spell effect   ==== Syntax ==== HasSpellEffect(param1, param2, [param3])   ==== Parameters ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:HasSpellEffect&amp;diff=4956&amp;oldid=prev"/>
		<updated>2013-08-30T20:48:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= LUA Functions: HasSpellEffect() = Will check to see if the given spawn has the given spell effect   ==== Syntax ==== HasSpellEffect(param1, param2, [param3])   ==== Parameters ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= LUA Functions: HasSpellEffect() =&lt;br /&gt;
Will check to see if the given spawn has the given spell effect&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
HasSpellEffect(param1, param2, [param3])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
; Required - ''param1'' (Spawn), ''param2'' (int32)&lt;br /&gt;
: ''param1'' is the spawn we want to check&lt;br /&gt;
: ''param2'' is the spell id we want to check for&lt;br /&gt;
; Optional - ''param3'' (int8)&lt;br /&gt;
: ''param3'' is the tier of the spell we want to check for&lt;br /&gt;
&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;
    if HasSpellEffect(Spawn, 12345) then&lt;br /&gt;
        Say(NPC, &amp;quot;You already have the buff&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        CastSpell(Spawn, 12345, 5, NPC)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause the NPC to cast a spell on the player who hailed it if they don't already have the spell on them.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
If a tier is not given it will just look for a matching spell id&lt;br /&gt;
&lt;br /&gt;
This will work on both Players and NPC's&lt;/div&gt;</summary>
		<author><name>Jabantiz</name></author>
		
	</entry>
</feed>