9
3

OpenShot.lua 802 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : Spells/Scout/Predator/OpenShot.lua
  3. Script Author : neatz09
  4. Script Date : 2020.11.04 12:11:29
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 24 - 40 ranged damage on target
  9. -- Inflicts 24 - 40 ranged damage on target
  10. -- If weapon equipped in Ranged
  11. function precast(Caster, Target)
  12. -- Requires bow
  13. local item = GetEquippedItemBySlot(Caster, 16)
  14. if not item or GetItemType(item) ~= 2 then
  15. -- no item or item is not a ranged item (no way to determine different range items currently)
  16. return false, 68
  17. end
  18. return true
  19. end
  20. function cast(Caster, Target, DmgMin, DmgMax)
  21. SpellDamage(Target, DmgMin, DmgMax)
  22. if LastSpellAttackHit() then
  23. SpellDamage(Target, DmgMin, DmgMax)
  24. end
  25. end