BladeFlurry.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : Spells/Scout/Predator/BladeFlurry.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/31/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- On a melee hit this spell may cast Swipe on target of attack. Triggers about 2.0 times per minute.
  9. -- Inflicts 35 - 58 melee damage on target
  10. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  11. AddProc(Target, 3, 5)
  12. end
  13. function proc(Caster, Target, Type, DmgType, MinVal, MaxVal)
  14. Level = GetLevel(Caster)
  15. SpellLevel = 17
  16. Mastery = SpellLevel + 10
  17. StatBonus = GetStr(Caster) / 10
  18. if Level < Mastery then
  19. LvlBonus = Level - SpellLevel
  20. else LvlBonus = Mastery - SpellLevel
  21. end
  22. DmgBonus = LvlBonus + StatBonus
  23. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  24. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  25. if Type == 3 then
  26. Spell = GetSpell(2550396, GetSpellTier())
  27. SetSpellDataIndex(Spell, 0, DmgType)
  28. SetSpellDataIndex(Spell, 1, MinDmg)
  29. SetSpellDataIndex(Spell, 2, MaxDmg)
  30. CastCustomSpell(Spell, Caster, Target)
  31. end
  32. end
  33. function remove(Caster, Target)
  34. RemoveProc(Target)
  35. end