9
3

AngeliaClayton.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/AngeliaClayton.lua
  3. Script Purpose : Angelia Clayton
  4. Script Author : Dorbin
  5. Script Date : 06.29.2022
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local HailCheck = false
  10. function spawn(NPC)
  11. AddTimer(NPC, 5000, "EmoteLoop")
  12. ProvidesQuest(NPC,239)
  13. end
  14. function HailReset(NPC)
  15. HailCheck = false
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if GetFactionAmount(Spawn,11)<0 then
  20. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  21. else
  22. Dialog1(NPC, Spawn)
  23. end
  24. end
  25. function Dialog1(NPC, Spawn)
  26. HailCheck = true
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC, Spawn)
  29. PlayFlavor(NPC, "", "", "curtsey", 0, 0, Spawn)
  30. Dialog.AddDialog("Hello to you! If you enjoy my dancing please be sure to leave a tip on the counter!")
  31. Dialog.AddVoiceover("voiceover/english/angelia_clayton/qey_village02/angeliaclayton.mp3", 1086160097, 3441597850)
  32. if not HasCompletedQuest (Spawn, 239) and not HasQuest (Spawn, 239) then
  33. Dialog.AddOption("You put on quite the show here!","Dialog2")
  34. end
  35. if GetQuestStep (Spawn, 239)==2 then
  36. Dialog.AddOption("Sorry for interrupting your routine. I've actually returned with a letter from your sister.","Delivered")
  37. end
  38. Dialog.AddOption("Thanks. I'll consider it.")
  39. Dialog.Start()
  40. AddTimer(NPC,32000,"HailReset")
  41. end
  42. function Dialog2(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. Dialog.New(NPC, Spawn)
  45. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  46. Dialog.AddDialog("Oh, I try! If erudites had their way we would all be sitting quietly with our noses in a book. My dancing isn't appreciated either- or at least that's what my empty coin purse leads me to believe... I wonder if my sister in Nettleville Hovel is doing well. She's a dancer too!")
  47. Dialog.AddVoiceover("voiceover/english/angelia_clayton/qey_village02/angeliaclayton000.mp3", 4082583317, 1566761938)
  48. Dialog.AddOption("It's hard to say about your sister. I'd guess anything is better than your reception here.", "Dialog3")
  49. Dialog.AddOption("Well, good luck with all that!")
  50. Dialog.Start()
  51. end
  52. function Dialog3(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  56. Dialog.AddDialog("Well, anyway. You seem to be a nice enough person. Do you think you could take a note to her from me? Her name is Karrie Clayton. I don't have any money to pay you, but I really would appreciate it!")
  57. Dialog.AddVoiceover("voiceover/english/angelia_clayton/qey_village02/angeliaclayton001.mp3", 1437539405, 2726710155)
  58. Dialog.AddOption("I'd be happy to deliver this letter to your sister.", "QuestBegin")
  59. Dialog.AddOption("A few drinks for me on the house and I'm more than happy to help.", "QuestBegin")
  60. Dialog.AddOption("Sadly, I won't be that way anytime soon.")
  61. Dialog.Start()
  62. end
  63. function QuestBegin (NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. OfferQuest(NPC, Spawn, 239)
  66. end
  67. function Delivered(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. Dialog.New(NPC, Spawn)
  70. SetStepComplete(Spawn, 239, 2)
  71. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  72. Dialog.AddDialog("It's good to see you again! My coin purse is still empty, but I'm happy for the note! It says here she's the main attraction in the village! I just might accept this offer to be a backup dancer!")
  73. Dialog.AddVoiceover("voiceover/english/angelia_clayton/qey_village02/angeliaclayton003.mp3", 1761828198, 3995688486)
  74. Dialog.AddOption("Hope it works out! Thanks for the drinks.")
  75. Dialog.Start()
  76. end
  77. function EmoteLoop(NPC)
  78. if HailCheck == true then
  79. AddTimer(NPC,26100,"EmoteLoop")
  80. else
  81. local emoteChoice = MakeRandomInt(1,4)
  82. if emoteChoice == 1 then
  83. -- flirt
  84. PlayAnimation(NPC, 11557)
  85. AddTimer(NPC, MakeRandomInt(23000), "EmoteLoop")
  86. elseif emoteChoice == 2 then
  87. -- kiss
  88. PlayAnimation(NPC, 11762)
  89. AddTimer(NPC, MakeRandomInt(5000,8000), "EmoteLoop")
  90. elseif emoteChoice == 3 then
  91. -- dance
  92. PlayAnimation(NPC, 11298)
  93. AddTimer(NPC, MakeRandomInt(10000,12000), "EmoteLoop")
  94. elseif emoteChoice == 4 then
  95. -- curtsey
  96. PlayAnimation(NPC, 11286)
  97. AddTimer(NPC, MakeRandomInt(4000,5000), "EmoteLoop")
  98. end
  99. end
  100. end