9
3

CheapShot.lua 755 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : Spells/Scout/CheapShot.lua
  3. Script Author : Jabantiz
  4. Script Date : 2013.12.16 03:12:31
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. -- Does not affect Epic targets
  10. return (not IsEpic(Target)), 43
  11. end
  12. function cast(Caster, Target)
  13. -- Stuns target
  14. AddControlEffect(Target, 4)
  15. end
  16. function remove(Caster, Target)
  17. -- Applies Cheap Shot on termination. Lasts for 2.0 seconds.
  18. -- Stuns target
  19. -- Does not affect Heroic or Epic targets.
  20. if not IsHeroic(Target) then
  21. AddSpellTimer(2000, "RemoveStun")
  22. else
  23. RemoveControlEffect(Target, 4)
  24. end
  25. end
  26. function RemoveStun(Caster, Target)
  27. RemoveControlEffect(Target, 4)
  28. end