You are viewing an old version of this page. Return to the latest version.
Version of 14:54, 1 April 2014 by I need to Update My Profile
No categories assigned
LUA:CheckRaceType
- Last edited 11 years ago by I need to Update My Profile
LUA Functions: CheckRaceType()
Will check the spawns race type against the race id provided
Syntax
var = CheckRaceType(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (int16)
- param1 is the spawn to check
- param2 is the race id to check against
Returns
Bool, true if the spawn is of the provided race
Usage
function cast(Caster, Target)
-- do normal damage here
if CheckRace(Target, 233) then
-- do extra damage to undead here
end
end
This spell will do extra damage to undead NPC's
Notes
Race id's are defined in RaceTypes.h