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 CheckRaceType(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
This will check both the race and base race