No categories assigned

LUA:SpellDamage

Revision as of 14:41, 12 September 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: SpellDamage() = Does damage to the given spawn ==== Syntax ==== SpellDamage(param1, param2, param3, param4) ==== Parameters ==== ; Required - ''param1'' (Spa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: SpellDamage()

Does damage to the given spawn


Syntax

SpellDamage(param1, param2, param3, param4)


Parameters

Required - param1 (Spawn), param2 (sint32), param3 (int32), param4 (int32)
param1 is the spawn to take damage
param2 is the type of damage to do
param3 is the minimum damage
param4 is the maximum damage


Usage

function cast(Caster, Target)
    SpellDamage(Target, 5, 123, 456)
end

When this spell is cast it will do 123 to 456 magic damage to the target

Notes

If used in a spell script it will attempt to use the spells targets to do the damage


Damage types:

0 Slash

1 Crush

2 Pierce

3 Heat

4 Cold

5 Magic

6 Mental

7 Divine

8 Disease

9 Poison

10 Drown

11 Falling

12 Pain