9
3

ElliasenkaCroosinaden.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/ElliasenkaCroosinaden.lua
  3. Script Purpose : Elliasenka Croosinaden
  4. Script Author : Dorbin
  5. Script Date : 07.03.2022
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local HailCheck = false
  10. function spawn(NPC)
  11. AddTimer(NPC, 5000, "EmoteLoop")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. HailCheck = true
  18. Dialog1(NPC, Spawn)
  19. AddTimer(NPC,26000,"HailReset")
  20. end
  21. function Dialog1(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. Dialog.New(NPC, Spawn)
  24. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  25. Dialog.AddDialog("Unless you possess the knowledge we seek and will help us, I suggest you leave us with this human. Now, go, leave us to our business!")
  26. Dialog.AddVoiceover("voiceover/english/elliasenka_croosinaden/qey_village02/elliasenkacroosinaden000.mp3", 4184348378, 3631028960)
  27. if GetQuestStep (Spawn, 5603)==1 then
  28. Dialog.AddOption("I've actually got a note here from Armsdealer Barrik. The dagger you ordered is ready to be picked up.","Delivered")
  29. end
  30. Dialog.AddOption("You seem to be busy. I'll find someone else to talk to. ")
  31. Dialog.Start()
  32. end
  33. function Delivered(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. Dialog.New(NPC, Spawn)
  36. SetStepComplete(Spawn, 5603, 1)
  37. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  38. Dialog.AddDialog("Ahh. It appears my dagger is ready. Did you hear that Zentomaron?")
  39. Dialog.AddVoiceover("voiceover/english/elliasenka_croosinaden/qey_village02/elliasenkacroosinaden001.mp3", 362437188, 601086800)
  40. Dialog.AddOption("... I'll let Barrik know you'll be picking it up soon.")
  41. Dialog.Start()
  42. end
  43. function HailReset(NPC)
  44. HailCheck = false
  45. end
  46. function EmoteLoop(NPC)
  47. if HailCheck == true then
  48. AddTimer(NPC,26100,"EmoteLoop")
  49. else
  50. local emoteChoice = MakeRandomInt(1,6)
  51. if emoteChoice == 1 then
  52. -- shame
  53. PlayAnimation(NPC, 12216)
  54. AddTimer(NPC, MakeRandomInt(11000,12000), "EmoteLoop")
  55. elseif emoteChoice == 2 then
  56. -- point
  57. PlayAnimation(NPC, 12028)
  58. AddTimer(NPC, MakeRandomInt(6000,8000), "EmoteLoop")
  59. elseif emoteChoice == 3 then
  60. -- ponder
  61. PlayAnimation(NPC, 12030)
  62. AddTimer(NPC, MakeRandomInt(12000,14000), "EmoteLoop")
  63. elseif emoteChoice == 4 then
  64. -- shakefist
  65. PlayAnimation(NPC, 12214)
  66. AddTimer(NPC, MakeRandomInt(12000,13500), "EmoteLoop")
  67. elseif emoteChoice == 5 then
  68. -- tapfoot
  69. PlayAnimation(NPC, 13056)
  70. AddTimer(NPC, MakeRandomInt(12000,13500), "EmoteLoop")
  71. elseif emoteChoice == 6 then
  72. -- no
  73. PlayAnimation(NPC, 11881)
  74. AddTimer(NPC, MakeRandomInt(5000,6000), "EmoteLoop")
  75. end
  76. end
  77. end