Lua IsCreature

From ArcEmu-Wiki
Jump to: navigation, search

Contents

IsCreature()

Usage

 IsCreature() 
- No parameters

Function

Returns whether or not the selected target is a creature or a player. True if it is, false if it isn't.

Example

function Unit_OnCombat(pUnit, event)
if not pUnit:IsCreature() then
    <actions here>
end
end

In that example, it checks if the target is NOT a creature, and if it isn't, it performs the actions specified at <actions here>.

Personal tools