StormofSteel.lua 773 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : Spells/Scout/Rogue/Swashbuckler/StormofSteel.lua
  3. Script Author : neatz09
  4. Script Date : 2019.09.23 01:09:55
  5. Script Purpose :
  6. :
  7. --]]
  8. -- If weapon equipped in Ranged
  9. function precast(Caster, Target)
  10. -- If weapon equipped in Ranged
  11. local item = GetEquippedItemBySlot(Caster, 16)
  12. if item then
  13. if GetItemType(item) == 2 then
  14. return true
  15. end
  16. end
  17. return false, 68
  18. end
  19. -- Inflicts 298 - 497 ranged damage on targets in Area of Effect
  20. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  21. if MaxVal ~= nil and MinVal < MaxVal then
  22. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  23. else
  24. SpellDamage(Target, DmgType, MinVal)
  25. end
  26. end