Root.lua 908 B

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : Spells/Priest/Druid/Warden/Root.lua
  3. Script Author : theFoof
  4. Script Date : 2014.3.13
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target)
  9. -- Roots target
  10. -- Applies Ensnare on termination. Lasts for 12.0 seconds.
  11. -- Slows target by 28.3%
  12. -- 5% chance to dispel when target receives hostile action
  13. -- 5% chance to dispel when target takes damage
  14. -- 5% chance to dispel when target takes damage
  15. -- Does not affect Epic targets
  16. -- Resistibility increases against targets higher than level 29.
  17. -- Note: Need support for snares
  18. if not IsEpic(Target) then
  19. AddControlEffect(Target, 5)
  20. AddProc(Target, 15, 5)
  21. end
  22. end
  23. function remove(Caster, Target)
  24. if not IsEpic(Target) then
  25. RemoveControlEffect(Target, 5)
  26. RemoveProc(Target)
  27. end
  28. end
  29. function proc(Caster, Target, ProcType)
  30. CancelSpell()
  31. end