You are viewing an old version of this page. Return to the latest version.
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...") |
|||
| Line 1: | Line 1: | ||
| − | = LUA Functions: | + | = LUA Functions: ProcDamage() = |
| − | + | Does spell damage to a given spawn | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | ProcDamage(param1, param2, param3, param4, param5, [param6], [param7], [param8]) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (int32) | + | ; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (int8), ''param4'' (string), ''param5'' (int32) |
| − | : ''param1'' is the | + | : ''param1'' is the caster |
| − | : ''param2'' is the | + | : ''param2'' is the target |
| − | : ''param3'' is the | + | : ''param3'' is the damage type |
| − | ; Optional - '' | + | : ''param4'' is the proc name |
| − | : '' | + | : ''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 ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function cast(Caster, Target) |
| − | + | ProcDamage(Caster, Target, 7, "Glorious Strike", 40, 0, "You cast Glorious Strike on %t") | |
end | end | ||
</pre> | </pre> | ||
| − | + | Will cast the "Glorious Strike" proc on the target which will do 40 damage | |
| − | |||
| − | |||
| − | |||
Revision as of 16:48, 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 (int8), param4 (string), param5 (int32)
- param1 is the caster
- param2 is the target
- param3 is the damage type
- param4 is the proc name
- 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