9
3

Ambush.lua 739 B

1234567891011121314151617181920212223242526
  1. --[[
  2. Script Name : Spells/Scout/Predator/Assassin/Ambush.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.04.14 02:04:06
  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 14 - 24 melee 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. end