CheapShot.lua 742 B

12345678910111213141516171819202122232425262728
  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. -- Applies Cheap Shot on termination. Lasts for 2.0 seconds.
  14. -- Stuns target
  15. -- Does not affect Heroic or Epic targets.
  16. if not IsHeroic(Target) then
  17. AddControlEffect(Target, 4)
  18. SpawnSet(Target,"visual_state",1684)
  19. end
  20. end
  21. function remove(Caster, Target)
  22. -- Remove Mez Effect
  23. RemoveControlEffect(Target, 4)
  24. SpawnSet(Target,"visual_state",0)
  25. end