Code:
local NPCID = 50
local STEALTH_ID = 11
local STEALTH_ID_B = 11
local STEALTH_ID_C = 11
local STEALTH_ID_D = 11
function Portal_A_Define_Spawn(pUnit, Event)
pUnit:RegisterEvent("Lets_Get_Ready_YOERUSOJ", 1000, 1)
end
function Lets_Get_Ready_YOERUSOJ(pUnit, Event)
pUnit:RegisterEvent("We_Need_To_check_For_players_If_there_Are_teleport", 2500, 0)
end
function We_Need_To_check_For_players_If_there_Are_teleport(pUnit, Event)
local player = pUnit:GetClosestPlayer()
if player == nil then
else
local PlayersAllAround = pUnit:GetInRangePlayers()
for a, plr in pairs(PlayersAllAround) do
if plr:HasAura(STEALTH_ID) == true then
plr:RemoveAura(STEALTH_ID)
end
if plr:HasAura(STEALTH_ID_B) == true then
plr:RemoveAura(STEALTH_ID_B)
end
if plr:HasAura(STEALTH_ID_C) == true then
plr:RemoveAura(STEALTH_ID_C)
end
if plr:HasAura(STEALTH_ID_D) == true then
plr:RemoveAura(STEALTH_ID_D)
end
end
end
end
RegisterUnitEvent(NPCID, 18, "Portal_A_Define_Spawn")
I quickly pulled this together for you, save it as a Lua file and put it in your scripts folder. At the top change the NPC ID to the npc id to a npc you want to check for stealth, next change the STEALTH_ID's to the spell id's of stealth (theres 4 different ranks I believe).
If it doesn't work tell me, good luck!