BestowalofVitality.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : Spells/Priest/Cleric/BestowalofVitality.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/28/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinVal, MaxVal, Triggers)
  9. AddProc(Target, 15, 100)
  10. SetSpellTriggerCount(Triggers, 1)
  11. end
  12. function proc(Caster, Target, Type, MinVal, MaxVal, Triggers)
  13. Level = GetLevel(Caster)
  14. SpellLevel= 19
  15. Mastery = SpellLevel + 10
  16. StatBonus = GetWis(Caster) / 10
  17. if Level < Mastery then
  18. LvlBonus = Level - SpellLevel
  19. else LvlBonus = Mastery - SpellLevel
  20. end
  21. HealBonus = LvlBonus + StatBonus
  22. MinHeal = math.floor(HealBonus) * 2 + MinVal
  23. MaxHeal = math.floor(HealBonus) * 2 + MaxVal
  24. if Type == 15 then
  25. Spell = GetSpell(5455, GetSpellTier())
  26. SetSpellDataIndex(Spell, 0, MinHeal)
  27. SetSpellDataIndex(Spell, 1, MaxHeal)
  28. CastCustomSpell(Spell, Caster, Target)
  29. RemoveTriggerFromSpell()
  30. end
  31. end
  32. function remove(Caster, Target)
  33. RemoveProc(Target)
  34. end