9
3

TheOverlord.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : SpawnScripts/EastFreeport/TheOverlord.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.04.28 03:04:40
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. visage01(NPC,Spawn)
  10. end
  11. function hailed(NPC, Spawn)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. local EndSpeech = true
  17. function visage01(NPC, Spawn)
  18. EndSpeech = false
  19. EmoteLoop(NPC)
  20. end
  21. function EmoteLoop(NPC)
  22. math.randomseed(os.time())
  23. local choice = math.random(1,12)
  24. if choice == 1 then
  25. PlayAnimation(NPC, 13042)
  26. AddTimer(NPC, 5200, "Idle")
  27. elseif choice == 2 then
  28. PlayAnimation(NPC, 13043)
  29. AddTimer(NPC, 4400, "Idle")
  30. elseif choice == 3 then
  31. PlayAnimation(NPC, 13044)
  32. AddTimer(NPC, 6950, "Idle")
  33. elseif choice == 4 then
  34. PlayAnimation(NPC, 13045)
  35. AddTimer(NPC, 5300, "Idle")
  36. elseif choice == 5 then
  37. PlayAnimation(NPC, 13046)
  38. AddTimer(NPC, 3900, "Idle")
  39. elseif choice == 6 then
  40. PlayAnimation(NPC, 13047)
  41. AddTimer(NPC, 4900, "Idle")
  42. elseif choice == 7 then
  43. PlayAnimation(NPC, 13048)
  44. AddTimer(NPC, 4500, "Idle")
  45. elseif choice == 8 then
  46. PlayAnimation(NPC, 13049)
  47. AddTimer(NPC, 3700, "Idle")
  48. elseif choice == 9 then
  49. PlayAnimation(NPC, 13050)
  50. AddTimer(NPC, 3200, "Idle")
  51. elseif choice == 10 then
  52. PlayAnimation(NPC, 13051)
  53. AddTimer(NPC, 4700, "Idle")
  54. elseif choice == 11 then
  55. PlayAnimation(NPC, 13052)
  56. AddTimer(NPC, 3500, "Idle")
  57. else
  58. PlayAnimation(NPC, 13053)
  59. AddTimer(NPC, 3200, "Idle")
  60. end
  61. end
  62. function Idle(NPC)
  63. PlayAnimation(NPC, 13042)
  64. EmoteCheck(NPC)
  65. end
  66. function EndLoop(NPC)
  67. EndSpeech = true
  68. end
  69. function EmoteCheck(NPC)
  70. if EndSpeech == false then
  71. EmoteLoop(NPC)
  72. else
  73. PlayAnimation(NPC, 13042)
  74. end
  75. end