Difference between revisions of "LUA:SetIllusion"

(Created page with "= LUA Functions: IsEpic() = Checks to see if the given spawn is epic ==== Syntax ==== IsEpic(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'' is the s...")
 
 
Line 1: Line 1:
= LUA Functions: IsEpic() =
+
= LUA Functions: SetIllusion() =
Checks to see if the given spawn is epic
+
Sets the illusion of the given spawn
  
 
==== Syntax ====
 
==== Syntax ====
IsEpic(param1)
+
SetIllusion(param1, param2)
  
  
 
==== Parameters ====
 
==== Parameters ====
; Required - ''param1'' (Spawn)
+
; Required - ''param1'' (Spawn), ''param2'' (int16)
: ''param1'' is the spawn to check
+
: ''param1'' is the spawn who's illusion we want to set
 +
: ''param2'' is the model id we want the illusion to be
  
  
 
==== Usage ====
 
==== Usage ====
 
<pre>
 
<pre>
function hailed(NPC, Spawn)
+
function cast(Caster, Target)
     if IsEpic(NPC) then
+
     SetIllusion(Target, 203)
        Say(NPC, "I am epic!")
 
    end
 
 
end
 
end
 
</pre>
 
</pre>
  
When the NPC is hailed it will respond if it is epic
+
When this spell is cast it will give the target the illusion of lady vox
 +
 
 +
== Notes ==
 +
Will use spell targets over the provided spawn if used in a spell script
 +
 
 +
SetIllusion(Target) or SetIllusion(Target, 0) is the same as ResetIllusion()

Latest revision as of 00:39, 14 December 2013

LUA Functions: SetIllusion()

Sets the illusion of the given spawn

Syntax

SetIllusion(param1, param2)


Parameters

Required - param1 (Spawn), param2 (int16)
param1 is the spawn who's illusion we want to set
param2 is the model id we want the illusion to be


Usage

function cast(Caster, Target)
    SetIllusion(Target, 203)
end

When this spell is cast it will give the target the illusion of lady vox

Notes

Will use spell targets over the provided spawn if used in a spell script

SetIllusion(Target) or SetIllusion(Target, 0) is the same as ResetIllusion()