9
3

DanielleClothspinner.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/DanielleClothspinner.lua
  3. Script Purpose : Danielle Clothspinner
  4. Script Author : Dorbin
  5. Script Date : 2022.04.23
  6. Script Notes : Auto-Generated Conversation from PacketParser Data + Quest dialogue. Dye quest is improvised. Her VOs do not work.
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local pelts = 5539
  10. local dyes = 5538
  11. function spawn(NPC)
  12. ProvidesQuest(NPC,pelts)
  13. ProvidesQuest(NPC,dyes)
  14. AddTimer(NPC, 5000, "EmoteLoop")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function hailed(NPC, Spawn)
  20. if GetFactionAmount(Spawn,11)<0 then
  21. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  22. else
  23. if not HasCompletedQuest(Spawn,pelts) or not HasCompletedQuest(Spawn,dyes)then
  24. Dialog1(NPC, Spawn)
  25. RandomGreeting(NPC, Spawn)
  26. else
  27. RandomGreeting(NPC, Spawn)
  28. PlayFlavor(NPC,"","Gah! Stuck my finger again... Oh, its you! Thank you again for all your help. I've got so many orders right now, but please use our shop as you wish.","doh",0,0,Spawn)
  29. end
  30. end
  31. end
  32. function Dialog1(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. PlayFlavor(NPC,"","","grumble",0,0,Spawn)
  35. Dialog.New(NPC, Spawn)
  36. Dialog.AddDialog("Whatever shall I do? I'm out of dyes, and I simply must finish these yards of cloth today! I'll certainly never make it all the way across town to get more and still have time to finish with my sewing!")
  37. -- Dialog.AddVoiceover("voiceover/english/danielle_clothspinner/qey_north/danielleclothspinner.mp3", 2670222455, 1687224055)
  38. if not HasQuest(Spawn,dyes) and not HasCompletedQuest(Spawn,dyes)then
  39. Dialog.AddOption("Surely someone in the city must have dyes?", "DialogA")
  40. end
  41. if not HasQuest(Spawn,pelts) and not HasCompletedQuest(Spawn,pelts)then
  42. Dialog.AddOption("I'm very sorry to hear this. I don't know much about dyes, but is there anything else you may need assistance with?", "Dialog3")
  43. end
  44. if GetQuestStep(Spawn,pelts)==2 then
  45. Dialog.AddOption("I have all the preserved bear hides that you requested.", "Dialog2")
  46. end
  47. if GetQuestStep(Spawn,dyes)==2 then
  48. Dialog.AddOption("Here are your two tubs of dye from Khali’Mun.", "DialogC")
  49. end
  50. Dialog.AddOption("Boy, guess you're out of luck.")
  51. Dialog.Start()
  52. end
  53. function Dialog2(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. PlayFlavor(NPC,"","","thank",0,0,Spawn)
  57. Dialog.AddDialog("Perfect, once I am done with all the sewing and dying for this job I can get started on some top notch pelt work.")
  58. Dialog.AddVoiceover("voiceover/english/danielle_clothspinner/qey_north/danielleclothspinner004.mp3", 237301026, 160623065)
  59. Dialog.AddOption("Glad I could be of assistance!","PeltsDone")
  60. Dialog.Start()
  61. end
  62. function Dialog3(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  66. Dialog.AddDialog("Well, I am always having a problem getting bear pelts of a quality that I can work with and truly make shine. If you could bring me four preserved bear hides, I can reward you for your efforts.")
  67. Dialog.AddVoiceover("voiceover/english/danielle_clothspinner/qey_north/danielleclothspinner003.mp3", 3729469841, 921407790)
  68. Dialog.AddOption("I would be happy to gather those for you.", "Dialog4")
  69. Dialog.Start()
  70. end
  71. function Dialog4(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. OfferQuest(NPC, Spawn,pelts)
  74. end
  75. function DialogA(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  78. Dialog.New(NPC, Spawn)
  79. Dialog.AddDialog("Oh, there is. I just haven't had the time to make it to the Herb Shop in the southern part of the city to pick up my regular supply. Khali’Mun most certainly has my tubs of dye ready. If you happen to have some time, could you see if he has them? I would give you the coin to pay for them, of course.")
  80. Dialog.AddVoiceover("voiceover/english/danielle_clothspinner/qey_north/danielleclothspinner003.mp3", 3729469841, 921407790)
  81. Dialog.AddOption("Certainly. I'll head that way and bring back your order if he has them.", "DialogB")
  82. Dialog.AddOption("Actually, I don't think I have time either.","Sigh")
  83. Dialog.Start()
  84. end
  85. function Sigh(NPC, Spawn)
  86. PlayFlavor(NPC,"","","sigh",0,0,Spawn)
  87. end
  88. function DialogB(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC, Spawn,dyes)
  91. end
  92. function PeltsDone(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. SetStepComplete(Spawn,pelts, 2)
  95. end
  96. function DialogC(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. Dialog.New(NPC, Spawn)
  99. PlayFlavor(NPC,"","","thanks",0,0,Spawn)
  100. Dialog.AddDialog("Excellent. Now I can get this fabric looking like it should. You have done me a great service. Please, take this little something I put together with my extra fabric.")
  101. Dialog.AddVoiceover("voiceover/english/danielle_clothspinner/qey_north/danielleclothspinner002.mp3", 237301026, 160623065)
  102. Dialog.AddOption("Thanks. Glad I could help.","DyeDone")
  103. Dialog.Start()
  104. end
  105. function DyeDone(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. SetStepComplete(Spawn,dyes, 2)
  108. end
  109. function RandomGreeting(NPC, Spawn)
  110. local choice = MakeRandomInt(1,2)
  111. if choice == 1 then
  112. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1039.mp3", 0, 0, Spawn)
  113. elseif choice == 2 then
  114. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1021.mp3", 0, 0, Spawn)
  115. end
  116. end
  117. function EmoteLoop(NPC)
  118. local emoteChoice = MakeRandomInt(1,3)
  119. if emoteChoice == 1 then
  120. -- ponder
  121. PlayAnimation(NPC, 12030)
  122. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  123. elseif emoteChoice == 2 then
  124. -- sniff
  125. PlayAnimation(NPC, 12329)
  126. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  127. else
  128. -- tapfoot
  129. PlayAnimation(NPC, 13056)
  130. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  131. end
  132. end