9
3

PainbringerPct.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/PainbringerPct.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.18 05:10:51
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinHeal, DmgType, MinDmg, MaxDmg, DoTType, DoT)
  9. -- DD component
  10. if MaxDmg ~= nil and MinDmg < MaxDmg then
  11. dmgAmount = math.random(MinDmg, MaxDmg)
  12. SpellDamage(Target, DDType, dmgAmount)
  13. else
  14. SpellDamage(Target, DDType, MinDmg)
  15. end
  16. -- Painbringer Component (instant heal)
  17. if MinHeal ~= nil then
  18. SpellHeal("Heal", GetPCTOfHP(Caster, MinHeal),Caster, 2, 1)
  19. -- ModifyHP(Caster, MinHeal) -- heals 2 every 3 seconds for 9 seconds
  20. end
  21. end
  22. function tick(Caster, Target, MinHeal, DmgType, MinDmg, MaxDmg, DoTType, DoTAmt)
  23. -- Heal component
  24. if MinHeal ~= nil then
  25. SpellHeal("Heal", GetPCTOfHP(Caster, MinHeal),Caster, 2, 1)
  26. -- ModifyHP(Caster, MinHeal) -- heals 2 every 3 seconds for 9 seconds
  27. end
  28. -- DoT component
  29. if DoTAmt ~= nil then
  30. SpellDamage(Target, DoTType, DoTAmt) -- Disease 1 every 3 seconds for 9 seconds
  31. end
  32. end