Assail.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : Spells/Scout/Assail.lua
  3. Script Author : neatz09
  4. Script Date : 2020.11.06 07:11:13
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 26 - 44 melee damage on target
  9. -- You must be sneaking to use this ability.
  10. --[[function precast(Caster, Target)
  11. -- You must be sneaking to use this ability.
  12. if not IsStealthed(Caster) then
  13. SendMessage(Caster, "You must be sneaking to use this ability.", "yellow")
  14. return false
  15. end
  16. end
  17. function cast(Caster, Target)
  18. SpellDamage(Target, DmgType, MinVal, MaxVal)
  19. end --]]
  20. function precast(Caster, Target)
  21. -- You must be sneaking to use this ability.
  22. if IsStealthed(Caster) then
  23. return true
  24. end
  25. SendMessage(Caster, "You must be sneaking to use this ability.", "yellow")
  26. return false
  27. end
  28. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  29. -- Inflicts 14 - 24 melee damage on target
  30. if MaxVal ~= nil and MinVal < MaxVal then
  31. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  32. else
  33. SpellDamage(Target, DmgType, MinVal)
  34. end
  35. end