9
3

StranglingShot.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : Spells/Scout/Rogue/StranglingShot.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.01.04 01:01:55
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. local item = GetEquippedItemBySlot(Caster, 16)
  10. if not item or GetItemType(item) ~= 2 then
  11. -- no item or item is not a ranged item (no way to determine different range items currently)
  12. return false, 68
  13. end
  14. return true
  15. end
  16. function cast(Caster, Target, MinVal, MaxVal, MinPow, MaxPow)
  17. Level = GetLevel(Caster)
  18. SpellLevel = 16
  19. Mastery = SpellLevel + 10
  20. StatBonus = GetAgi(Caster) / 10
  21. if Level < Mastery then
  22. LvlBonus = Level - SpellLevel
  23. else LvlBonus = Mastery - SpellLevel
  24. end
  25. DmgBonus = LvlBonus + StatBonus
  26. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  27. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  28. SpellDamage(Target, 2, MinDmg, MaxDmg)
  29. SpellHeal(Target, "Power", MinPow, MaxPow)
  30. end