ConjurorsPact.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : Spells/Mage/Summoner/Conjuror/ConjurorsPact.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.03.12 06:03:31
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, BonusAmt)
  9. -- When damaged this spell has a 25% chance to cast Exposed Elements on target's attacker. Lasts for 20.0 seconds.
  10. AddProc(Target, 2, 25.0)
  11. -- On any combat or spell hit this spell may cast Exposed Elements on target of attack. Lasts for 20.0 seconds. Triggers about 5.0 times per minute.
  12. AddProc(Target, 1, 25.0)
  13. end
  14. function proc(Caster, Target, Type, BonusAmt)
  15. if Type == 1 or Type == 2 then
  16. -- When damaged this spell has a 25% chance to cast Exposed Elements on target's attacker. Lasts for 20.0 seconds.
  17. -- Decreases Mitigation of target vs elemental and arcane damage by 141
  18. local active = GetTempVariable(Target, "CONJURORS_PACT_PROC_ACTIVE")
  19. if active == nil or active == "False" then
  20. SetTempVariable(Target, "CONJURORS_PACT_PROC_ACTIVE", "True")
  21. AddSpellBonus(Target, 201, BonusAmt)
  22. AddSpellBonus(Target, 203, BonusAmt)
  23. AddSpellTimer(20000, "RemoveProcEffect", Caster, Target)
  24. end
  25. end
  26. end
  27. function RemoveProcEffect(Caster, Target)
  28. SetTempVariable(Target, "CONJURORS_PACT_PROC_ACTIVE", "False")
  29. RemoveSpellBonus(Target)
  30. end
  31. function remove(Caster, Target)
  32. RemoveProc(Target)
  33. end