JugularSlice.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : Spells/Scout/Predator/Assassin/JugularSlice.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.04.17 05:04:09
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. -- You must be sneaking to use this ability.
  10. if IsStealthed(Caster) then
  11. return true
  12. end
  13. SendMessage(Caster, "You must be sneaking to use this ability.", "yellow")
  14. return false
  15. end
  16. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  17. -- Inflicts 217 - 362 slashing damage on target
  18. if MaxVal ~= nil and MinVal < MaxVal then
  19. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  20. else
  21. SpellDamage(Target, DmgType, MinVal)
  22. end
  23. -- Stifles target
  24. -- If Target is not Epic
  25. if not IsEpic(Target) then
  26. AddControlEffect(Target, 2)
  27. end
  28. -- Resistibility increases against targets higher than level 29.
  29. end
  30. function remove(Caster, Target)
  31. RemoveControlEffect(Target, 2)
  32. end