Difference between revisions of "LUA:CastSpell"
(Created page with "= LUA Functions: CastSpell() = Makes a spawn cast the given spell on the given target. ==== Syntax ==== CastSpell(param1, param2, param3, [param4]) ==== Parameters ==== ; Req...") |
(No difference)
|
Latest revision as of 21:21, 15 October 2012
LUA Functions: CastSpell()
Makes a spawn cast the given spell on the given target.
Syntax
CastSpell(param1, param2, param3, [param4])
Parameters
- Required - param1 (Spawn), param2 (int32), param3 (int8)
- param1 is the target
- param2 is the spell id
- param3 is the spell tier
- Optional - param4 (Spawn)
- param4 is the caster
Usage
function hailed(NPC, Spawn)
CastSpell(Spawn, 1, 1, NPC)
end
The NPC will cast spell 1 tier 1 on the spawn that hailed it.
Notes
If left out the caster param (param4) will default to the target param (param1)