VisionofMadness.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : Spells/Fighter/Warrior/Berserker/VisionofMadness.lua
  3. Script Author : neatz09
  4. Script Date : 2020.12.01 12:12:20
  5. Script Purpose :
  6. : Subspell 5460 Madness
  7. --]]
  8. -- On death this spell will cast Madness on caster. Lasts for 5.0 seconds.
  9. -- Heals caster for 2.7% of max health instantly and every second
  10. -- This effect cannot be critically applied.
  11. -- If target is not berserk
  12. -- Heals caster for 13.5% of max health instantly and every second
  13. -- This effect cannot be critically applied.
  14. -- If target is berserk
  15. -- Grants a total of 1 trigger of the spell.
  16. -- Grants a total of 1 trigger of the spell.
  17. function cast(Caster, Target, RegHeal, ModHeal)
  18. AddProc(Target, 13, 100)
  19. SetSpellTriggerCount(1, 1)
  20. end
  21. function proc(Caster, Target, Type, RegHeal, ModHeal)
  22. Spell = GetSpell(5460, GetSpellTier())
  23. if Type == 13 then
  24. SetSpellDataIndex(Spell, 0, RegHeal)
  25. SetSpellDataIndex(Spell, 1, ModHeal)
  26. CastCustomSpell(Spell, Caster, Target)
  27. end
  28. RemoveTriggerFromSpell()
  29. end
  30. function remove(Caster, Target)
  31. RemoveProc(Target)
  32. end