Difference between revisions of "LUA:CheckRaceType"
(Created page with "= LUA Functions: CheckRaceType() = Will check the spawns race type against the race id provided ==== Syntax ==== var = CheckRaceType(param1, param2) ==== Parameters ==== ; Re...") |
|||
| Line 20: | Line 20: | ||
-- do normal damage here | -- do normal damage here | ||
| − | if | + | if CheckRaceType(Target, 233) then |
-- do extra damage to undead here | -- do extra damage to undead here | ||
end | end | ||
| Line 29: | Line 29: | ||
== Notes == | == Notes == | ||
Race id's are defined in RaceTypes.h | Race id's are defined in RaceTypes.h | ||
| + | |||
| + | This will check both the race and base race | ||
Latest revision as of 15:01, 1 April 2014
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