SoothingSermon.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : Spells/Priest/Cleric/SoothingSermon.lua
  3. Script Author : LordPazuzu
  4. Script Date : 12/1/2022
  5. Script Purpose :
  6. :
  7. --]]
  8. -- When any damage is received this spell will cast Vitae on target, which can be triggered up to 9 times across all targets.
  9. -- Heals target for 40 - 49
  10. function cast(Caster, Target, MinVal, MaxVal, Triggers)
  11. AddProc(Target, 15, 100)
  12. SetSpellTriggerCount(Triggers, 1)
  13. end
  14. function proc(Caster, Target, Type, MinVal, MaxVal, Triggers)
  15. Level = GetLevel(Caster)
  16. SpellLevel = 14
  17. Mastery = SpellLevel + 10
  18. StatBonus = GetWis(Caster) / 10
  19. if Level < Mastery then
  20. LvlBonus = Level - SpellLevel
  21. else LvlBonus = Mastery - SpellLevel
  22. end
  23. HealBonus = LvlBonus + StatBonus
  24. MinHeal = math.floor(HealBonus) * 2 + MinVal
  25. MaxHeal = math.floor(HealBonus) * 2 + MaxVal
  26. if Type == 15 then
  27. Spell = GetSpell(5455, GetSpellTier())
  28. SetSpellDataIndex(Spell, 0, MinHeal)
  29. SetSpellDataIndex(Spell, 1, MaxHeal)
  30. CastCustomSpell(Spell, Caster, Target)
  31. RemoveTriggerFromSpell()
  32. end
  33. end
  34. function remove(Caster, Target)
  35. RemoveProc(Target)
  36. end