GarsinsFuneralMarch.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : Spells/Scout/Bard/Dirge/GarsinsFuneralMarch.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.12 10:10:40
  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. RemoveControlEffect(Target, 6)
  29. end
  30. end
  31. function remove(Caster, Target)
  32. RemoveControlEffect(Target, 6)
  33. RemoveProc(Target)
  34. end