This is what i am using in my global_player.lua
Just a snippet from a rather long set of spell checks, can post more of the code if need be.
Code:
function event_cast(e)
local PLVL = e.self:GetLevel();
local Mana = e.self:GetMana();
local ManaCost = (PLVL*5);
local NewMana = (Mana - ManaCost);
local Spell_ID = e.spell:ID();
local Spell_Name = e.spell:Name();
local Target = e.self:GetTarget();
local Target_ID = Target:GetNPCTypeID();
if(Spell_ID == 12000) then --spell id check ------------------------------------------------
e.self:Message(5, "I CASTED SPELL: " ..Spell_ID);
e.self:Message(5, "I CASTED SPELL: " ..Spell_Name);
end
end