9
3

Assassinate.lua 812 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : Spells/Scout/Predator/Assassin/Assassinate.lua
  3. Script Author : neatz09
  4. Script Date : 2019.08.12 08:08:47
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 2007 - 3345 melee damage on target
  9. -- You must be stealthed to use this ability
  10. function precast(Caster, Target)
  11. -- You must be sneaking to use this ability.
  12. if IsStealthed(Caster) then
  13. return true
  14. end
  15. SendMessage(Caster, "You must be sneaking to use this ability.", "yellow")
  16. return false
  17. end
  18. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  19. -- Inflicts 2007 - 3345 melee damage on target
  20. if MaxVal ~= nil and MinVal < MaxVal then
  21. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  22. else
  23. SpellDamage(Target, DmgType, MinVal)
  24. end
  25. end