Difference between revisions of "LUA:IsStunned"

(Created page with "= LUA Functions: AddHate() = Adds hate to ''param2'' from ''param1'' ==== Syntax ==== AddHate(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...")
 
 
Line 1: Line 1:
= LUA Functions: AddHate() =
+
= LUA Functions: IsStunned() =
Adds hate to ''param2'' from ''param1''
+
Checks to see if the given spawn is stunned
  
  
 
==== Syntax ====
 
==== Syntax ====
AddHate(param1, param2, param3)
+
IsStunned(param1)
  
  
 
==== Parameters ====
 
==== Parameters ====
; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (sint32)
+
; Required - ''param1'' (Spawn)
: ''param1'' is the spawn that is adding hate
+
: ''param1'' is the spawn we want to check
: ''param2'' is the spawn recieving the hate
 
: ''param3'' is the amount of hate to add
 
  
 
==== Usage ====
 
==== Usage ====
 
<pre>
 
<pre>
function cast(Caster, Target)
+
function hailed(NPC, Spawn)
     -- Add 50 hate to the target
+
     if IsStunned(NPC) then
    AddHate(Caster, Target, 50)
+
        Say(NPC, "I am stunned")
 +
    end
 
end
 
end
 
</pre>
 
</pre>
  
This is a simple taunt spell that adds 50 hate to the target.
+
This will make the spawn respond if it is stunned when it is hailed
  
 
== Notes ==
 
== Notes ==
If this is called from a spell script then the target/targets will be determined by the spell data(encounter AE, true AE, single target, etc...), the param is still required though.
+
Returns a bool, true if it is stunned

Latest revision as of 20:09, 28 August 2013

LUA Functions: IsStunned()

Checks to see if the given spawn is stunned


Syntax

IsStunned(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn we want to check

Usage

function hailed(NPC, Spawn)
    if IsStunned(NPC) then
        Say(NPC, "I am stunned")
    end
end

This will make the spawn respond if it is stunned when it is hailed

Notes

Returns a bool, true if it is stunned