9
3

FrozenManacles.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : Spells/Mage/Sorcerer/FrozenManacles.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.11.28 10:11:14
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster, Target)
  9. -- Does not affect Epic targets
  10. if IsEpic(Target) then
  11. return false, 43
  12. end
  13. return true
  14. end
  15. function cast(Caster, Target, Snare)
  16. Say(Caster, "Damage component not implemented. Values not yet available.")
  17. -- Roots target
  18. AddControlEffect(Target, 5)
  19. -- 10% chance to dispel when target takes damage
  20. AddProc(Target, 2, 10.0)
  21. end
  22. function proc(Caster, Target, Type, Snare)
  23. if Type == 2 then
  24. RemoveControlEffect(Target, 5)
  25. Spell = GetSpell(5501, GetSpellTier())
  26. SetSpellDataIndex(Spell, 0, Snare)
  27. CastCustomSpell(Spell, Target, Caster)
  28. end
  29. end
  30. function remove(Caster, Target, Snare)
  31. RemoveControlEffect(Target, 5)
  32. Spell = GetSpell(5501, GetSpellTier(1))
  33. SetSpellDataIndex(Spell, 0, Snare)
  34. CastCustomSpell(Spell, Target, Caster)
  35. end