9
3

SingingShot.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : Spells/Scout/Bard/SingingShot.lua
  3. Script Author : neatz09
  4. Script Date : 2020.11.06 06:11:13
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 22 - 36 mental damage on target
  9. -- Inflicts 22 - 36 mental damage on target
  10. -- Stifles target
  11. -- If Target is not Epic
  12. -- If weapon equipped in Ranged
  13. -- Resistibility increases against targets higher than level 29.
  14. function precast(Caster, Target)
  15. -- Requires bow
  16. local item = GetEquippedItemBySlot(Caster, 16)
  17. if not item or GetItemType(item) ~= 2 then
  18. -- no item or item is not a ranged item (no way to determine different range items currently)
  19. return false, 68
  20. end
  21. return true
  22. end
  23. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  24. Say(Caster, "Resistibility not Implemented.")
  25. SpellDamage(Target, DmgType, MinVal, MaxVal)
  26. if LastSpellAttackHit() then
  27. SpellDamage(Target, DmgType, MinVal, MaxVal)
  28. end
  29. if LastSpellAttackHit() and not IsEpic() then
  30. AddControlEffect(Target, 2)
  31. end
  32. end
  33. function remove(Caster, Target)
  34. RemoveControlEffect(Target, 2)
  35. end