9
3

aStatue.lua 2.3 KB

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