Why is this simple script not working? The mob just cast the spell on himself instead of on the player attacking him , how do i make him cast the spell on the player attacking him , instead of the closest player or on himself? Also is there a way to make him yell also?
function GuardianofQuelThalas_MurmursWrath (pUnit, Event)
tarGet = pUnit:GetClosestPlayer()
pUnit:CastSpellOnTarget (33331,tarGet)
end
RegisterUnitEvent (50095, 1, "GuardianofQuelThalas_MurmursWrath")
Well i just want to know how to make this script cast murmur's wrath on the player attacking the npc and to make the npc yell 'no pvp here' when hes done casting