9
3

CerebralLash.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Mage/Enchanter/CerebralLash.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.12.04 07:12:28
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DoTType, DoTMin, DoTMax, DDType, DDMin, DDMax)
  9. if DoTMax ~= nil and DoTMin < DoTMax then
  10. SpellDamage(Target, DoTType, math.random(DoTMin, DoTMax))
  11. else
  12. SpellDamage(Target, DoTType, DoTMin)
  13. end
  14. AddTimer(23900, "migraine")
  15. end
  16. function migraine(Caster, Target, DoTType, DoTMin, DoTMax, DDType, DDMin, DDMax)
  17. Spell = GetSpell(5505, GetSpellTier())
  18. SetSpellDataIndex(Spell, 0, DDType)
  19. SetSpellDataIndex(Spell, 1, DDMin)
  20. SetSpellDataIndex(Spell, 2, DDMax)
  21. CastCustomSpell(Spell, Caster, Target)
  22. end
  23. function tick(Caster, Target, DoTType, DoTMin, DoTMax)
  24. if DoTMax ~= nil and DoTMin < DoTMax then
  25. SpellDamage(Target, DoTType, math.random(DoTMin, DoTMax))
  26. else
  27. SpellDamage(Target, DoTType, DoTMin)
  28. end
  29. end