Spellshield.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : Spells/Mage/Enchanter/Illusionist/Spellshield.lua
  3. Script Author : neatz09
  4. Script Date : 2020.01.31 06:01:36
  5. Script Purpose :
  6. :
  7. --]]
  8. -- When damaged this spell will cast Shock of Mana on target's attacker.
  9. -- Inflicts 32 - 39 magic damage on target
  10. -- Grants a total of 5 triggers of the spell.
  11. -- This effect can only trigger once every 1.0 second.
  12. function cast(Caster, Target, DmgType, MinVal, MaxVal, Triggers)
  13. AddProc(Target, 17, 100)
  14. SetSpellTriggerCount(Triggers, 1)
  15. Say(Caster, "This spell may need a based on level formula. also needs a trigger to lock out proc")
  16. end
  17. function proc(Caster, Target, Type, DmgType, MinVal, MaxVal, Triggers)
  18. Spell = GetSpell(5445, GetSpellTier())
  19. if Type == 17 then
  20. SetSpellDataIndex(Spell, 0, DmgType)
  21. SetSpellDataIndex(Spell, 1, MinVal)
  22. SetSpellDataIndex(Spell, 2, MaxVal)
  23. CastCustomSpell(Spell, Caster, Target)
  24. end
  25. end
  26. function remove(Caster, Target)
  27. RemoveProc(Target)
  28. end