SelfPreservation.lua 807 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Scout/Rogue/SelfPreservation.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.01.04 01:01:45
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, Hate)
  9. AddProc(Caster, 1, 30)
  10. end
  11. function proc(Caster, Target, Type, Hate)
  12. Level = GetLevel(Caster)
  13. SpellLevel = 17
  14. Mastery = SpellLevel + 10
  15. if Level < Mastery then
  16. LvlBonus = Level - SpellLevel
  17. else LvlBonus = Mastery - SpellLevel
  18. end
  19. HateMod = LvlBonus *2 + Hate
  20. Spell = GetSpell(2550383, GetSpellTier())
  21. if Type == 1 then
  22. SetSpellDataIndex(Spell, 0, HateMod)
  23. CastCustomSpell(Spell, Caster, Target)
  24. end
  25. end
  26. function remove(Caster, Target)
  27. RemoveProc(Caster)
  28. end