9
3

JugularSlice.lua 969 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 in stealth.
  10. if not IsStealthed(Caster) then
  11. SendMessage(Caster, "You must be in stealth.", "yellow")
  12. return false
  13. end
  14. return true
  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