StingingBarrage.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : Spells/Commoner/StingingBarrage.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.10.16 01:10:50
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinVal, MaxVal, MinDoT, MaxDoT)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 8
  11. Mastery = SpellLevel + 50
  12. if Level < Mastery then
  13. LvlBonus = Level - SpellLevel
  14. else LvlBonus = Mastery - SpellLevel
  15. end
  16. MinDmg = MinVal + LvlBonus
  17. MaxDmg = MaxVal + LvlBonus * 2
  18. SpellDamage(Target, 2, MinDmg, MaxDmg)
  19. if LastSpellAttackHit() then
  20. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  21. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  22. end
  23. end
  24. function tick (Caster, Target, MinVal, MaxVal, MinDoT, MaxDoT)
  25. Level = GetLevel(Caster)
  26. SpellLevel = 8
  27. Mastery = SpellLevel + 50
  28. if Level < Mastery then
  29. LvlBonus = Level - SpellLevel
  30. else LvlBonus = Mastery - SpellLevel
  31. end
  32. DoTMin = MinDoT + LvlBonus
  33. DoTMax = MaxDot + LvlBonus * 2
  34. SpellDamage(Target, 9, DoTMin, DoTMax)
  35. if IsPlayer(Target) and GetClientVersion(Target) <= 526 then
  36. SpawnSet(Target,"visual_state",2774)
  37. else
  38. SpawnSet(Target,"visual_state",2774)
  39. end
  40. end
  41. function remove(Caster, Target)
  42. SpawnSet(Target,"visual_state",35542)
  43. end