Difference between revisions of "LUA:ProcDamage"

(Created page with "= LUA Functions: Knockback() = Plays the knockback animation and can push a player back ==== Syntax ==== Knockback(param1, param2, param3, [param4], [param5], [param6]) ==== P...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= LUA Functions: Knockback() =
+
= LUA Functions: ProcDamage() =
Plays the knockback animation and can push a player back
+
Does spell damage to a given spawn
  
 
==== Syntax ====
 
==== Syntax ====
Knockback(param1, param2, param3, [param4], [param5], [param6])
+
ProcDamage(param1, param2, param3, param4, param5, [param6], [param7], [param8])
  
  
 
==== Parameters ====
 
==== Parameters ====
; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (int32)
+
; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (string), ''param4'' (int8), ''param5'' (int32)
: ''param1'' is the spawn performing the knockback
+
: ''param1'' is the caster
: ''param2'' is the spawn being knocked back
+
: ''param2'' is the target
: ''param3'' is the animation duration in milliseconds
+
: ''param3'' is the proc name
; Optional - ''param4'' (float), ''param5'' (float), ''param6'' (int8)
+
: ''param4'' is the damage type
: '' param4'' is the vertical movement
+
: ''param5'' is the proc minimum damage
: ''param4'' is the horizontal movement
+
; Optional - ''param6'' (int32), ''param7'' (string), ''param8'' (string)
: ''param5'' is use player heading
+
: ''param6'' is the proc maximum damage
 +
: ''param7'' is the success message
 +
: ''param8'' is the effect message
  
 
==== Usage ====
 
==== Usage ====
 
<pre>
 
<pre>
function hailed(NPC, Spawn)
+
function cast(Caster, Target)
     Knockback(NPC, Spawn, 4000)
+
     ProcDamage(Caster, Target, 7, "Glorious Strike", 40, 0, "You cast Glorious Strike on %t")
 
end
 
end
 
</pre>
 
</pre>
  
When the NPC is hailed it will knockback the spawn that hailed it
+
Will cast the "Glorious Strike" proc on the target which will do 40 damage
 
 
== Notes ==
 
To get the knocked on back set ''param3'' to at least 4000 (4 seconds), any thing lower will play the knocked to knees animation
 

Latest revision as of 17:37, 6 December 2013

LUA Functions: ProcDamage()

Does spell damage to a given spawn

Syntax

ProcDamage(param1, param2, param3, param4, param5, [param6], [param7], [param8])


Parameters

Required - param1 (Spawn), param2 (Spawn), param3 (string), param4 (int8), param5 (int32)
param1 is the caster
param2 is the target
param3 is the proc name
param4 is the damage type
param5 is the proc minimum damage
Optional - param6 (int32), param7 (string), param8 (string)
param6 is the proc maximum damage
param7 is the success message
param8 is the effect message

Usage

function cast(Caster, Target)
    ProcDamage(Caster, Target, 7, "Glorious Strike", 40, 0, "You cast Glorious Strike on %t")
end

Will cast the "Glorious Strike" proc on the target which will do 40 damage