Sanctuary.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : Spells/Priest/Cleric/Templar/Sanctuary.lua
  3. Script Author : neatz09
  4. Script Date : 2020.10.27 12:10:19
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Makes group members (AE) immune to Root effects
  9. -- Makes group members (AE) immune to Stifle effects
  10. -- Makes group members (AE) immune to Stun effects
  11. -- Makes group members (AE) immune to Fear effects
  12. -- Makes group members (AE) immune to Daze effects
  13. -- Makes group members (AE) immune to Mesmerize effects
  14. -- 1% chance to dispel when target takes damage
  15. -- 1% chance to dispel when target receives hostile action
  16. function cast(Caster, Target, Chance)
  17. AddProc(Target, 15, 1, nil, 1)
  18. AddImmunitySpell(5, Target) --Root
  19. AddImmunitySpell(2, Target) --Stifle
  20. AddImmunitySpell(4, Target) --Stun
  21. AddImmunitySpell(6, Target) --Fear
  22. AddImmunitySpell(3, Target) --Daze
  23. AddImmunitySpell(1, Target) --Mez
  24. Say(Caster, "PVP Immunity not implemented.")
  25. end
  26. function proc(Caster, Target, Type, Chance)
  27. if Type == 15 then
  28. CancelSpell()
  29. end
  30. end
  31. function remove(Caster, Target)
  32. RemoveProc(Target)
  33. RemoveImmunitySpell(5, Target) --Root
  34. RemoveImmunitySpell(2, Target) --Stifle
  35. RemoveImmunitySpell(4, Target) --Stun
  36. RemoveImmunitySpell(6, Target) --Fear
  37. RemoveImmunitySpell(3, Target) --Daze
  38. RemoveImmunitySpell(1, Target) --Mez
  39. end