FeignDeath.lua 680 B

12345678910111213141516171819202122232425
  1. --[[
  2. Script Name : Spells/Fighter/Brawler/FeignDeath.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.01.13 07:01:36
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Feigns Death with 58% chance of success
  9. function cast(Caster, Target, Chance)
  10. -- Die animtaion and restricts movement
  11. SetServerControlFlag(Caster, 5, 1, 1);
  12. local roll = math.random(1, 100);
  13. if roll <= Chance then
  14. ClearHate(Target, Caster)
  15. SendMessage(Caster, "Your feign death succeeded", "yellow")
  16. else
  17. SendMessage(Caster, "Your feign death attempt failed", "yellow")
  18. end
  19. end
  20. function remove(Caster, Target)
  21. SetServerControlFlag(Caster, 5, 1, 0);
  22. end