Lockdown.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : Spells/Mage/Enchanter/Illusionist/Lockdown.lua
  3. Script Author : Cynnar
  4. Script Date : 2016.28.09
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target)
  9. -- Roots target
  10. SetSpeedMultiplier(Target, 0)
  11. -- Applies Stifle. Lasts for 4.0 seconds.
  12. -- Stifles target
  13. AddControlEffect(Target, 2)
  14. AddSpellTimer(4000, "RemoveStifle")
  15. -- 100% chance to dispel when target takes damage
  16. AddProc(Target, 2, 100.0)
  17. -- Blurs vision of target
  18. -- Dispelled when target takes damage
  19. -- Epic targets gain an immunity to Stifle effects of 12.0 seconds and duration is reduced to 1.3 seconds.
  20. -- Resistibility increases against targets higher than level 34.
  21. -- Epic targets gain an immunity to Root effects of 54.0 seconds and duration is reduced to 6.0 seconds.
  22. -- Resistibility increases against targets higher than level 29.
  23. end
  24. function RemoveStifle(Caster, Target)
  25. RemoveControlEffect(Target, 2)
  26. end
  27. function proc(Caster, Target, Type)
  28. if Type == 2 then
  29. -- Dispell stifle when target takes damage
  30. RemoveControlEffect(Target, 2)
  31. -- 5% chance to dispel root when target takes damage
  32. if math.random(1, 100) <= 5 then
  33. CancelSpell()
  34. end
  35. end
  36. end
  37. function tick(Caster, Target)
  38. -- code to process each call_frequency (tick) set in spell_tiers
  39. end
  40. function remove(Caster, Target)
  41. -- code to remove the spell
  42. SetSpeedMultiplier(Target, 1.0)
  43. end