No categories assigned

LUA:IsCasting

LUA Functions: IsCasting()

Checks to see if the given spawn is casting a spell


Syntax

IsCasting(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn we want to check

Usage

function hailed_busy(NPC, Spawn)
    if IsCasting(NPC) then
        Say(NPC, "Don't bother me, I am busy casting.")
    else
        Say(NPC, "I'm busy")
    end
end

This will have the spawn respond to a hail while in combat differently if the spawn is casting or not

Notes

Returns a bool, true if casting