9
3

Fear.lua 1001 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --[[
  2. Script Name : Spells/Mage/Summoner/Necromancer/Fear.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.15 07:10:44
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Makes target afraid
  9. -- 30% chance to dispel when target takes damage
  10. -- Does not affect Epic targets
  11. -- Resistibility increases against targets higher than level 29.
  12. function precast(Caster, Target)
  13. -- Does not affect Epic targets
  14. if IsEpic(Target) then
  15. return false, 43
  16. end
  17. return true
  18. end
  19. function cast(Caster, Target, Chance)
  20. Say(Caster, "Resist level 29 or < not implemented.")
  21. Say(Caster, "Need a check for ifhascontroleffect")
  22. AddControlEffect(Target, 6)
  23. AddProc(Target, 15, Chance)
  24. end
  25. function proc(Caster, Target, Type, Chance)
  26. local Spell = GetSpellID()
  27. if Type == 15 and HasSpellEffect(Target, Spell) then
  28. CancelSpell()
  29. end
  30. end
  31. function remove(Caster, Target)
  32. RemoveControlEffect(Target, 6)
  33. RemoveProc(Target)
  34. end