MatsyRollingpin.lua 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. --[[
  2. Script Name : SpawnScripts/Antonica/MatsyRollingpin.lua
  3. Script Purpose : Matsy Rollingpin
  4. Script Author : geordie0511
  5. Script Date : 2019.03.14
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Achoo = 464
  9. local Blub = 465
  10. local Killing = 466
  11. local Care = 467
  12. local Pie = 468
  13. local Mail = 469
  14. function spawn(NPC)
  15. SetPlayerProximityFunction(NPC, 15, "InRange")
  16. ProvidesQuest(NPC,"Achoo")
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange(NPC, Spawn)
  22. if HasCompletedQuest(Spawn, Achoo) then
  23. ProvidesQuest(NPC, Blub)
  24. SetInfoFlag(NPC)
  25. SetVisualFlag(NPC)
  26. elseif HasCompletedQuest(Spawn, Blub) then
  27. ProvidesQuest(NPC, Killing)
  28. SetInfoFlag(NPC)
  29. SetVisualFlag(NPC)
  30. elseif HasCompletedQuest(Spawn, Killing) then
  31. ProvidesQuest(NPC, Care)
  32. SetInfoFlag(NPC)
  33. SetVisualFlag(NPC)
  34. elseif HasCompletedQuest(Spawn, Care) then
  35. ProvidesQuest(NPC, Pie)
  36. SetInfoFlag(NPC)
  37. SetVisualFlag(NPC)
  38. elseif HasCompletedQuest(Spawn, Pie) then
  39. ProvidesQuest(NPC, Mail)
  40. SetInfoFlag(NPC)
  41. SetVisualFlag(NPC)
  42. end
  43. end
  44. --[[ if choice == 1 then
  45. PlayFlavor(NPC, "", "I need the extra fish if I am going to make more chowder. Were you still going to fetch that for me?", "", 1689589577, 4560189, Spawn)
  46. elseif choice == 2 then
  47. PlayFlavor(NPC, "", "That poor soul, is he still staggering around? Aroof is such a large one, you'd think he could hold his liquor better then most.", "", 1689589577, 4560189, Spawn)
  48. elseif choice == 3 then
  49. PlayFlavor(NPC, "", "Did you take that letter to Jacque yet?", "", 1689589577, 4560189, Spawn)
  50. elseif choice == 4 then
  51. PlayFlavor(NPC, "", "I need that pepper as soon as possible...oh my water is boiling.", "", 1689589577, 4560189, Spawn)
  52. elseif choice == 5 then
  53. PlayFlavor(NPC, "", "Please give Blarton the cookies and my best wishes. Sweets to sweeten a sour disposition I always say.", "", 1689589577, 4560189, Spawn)
  54. elseif choice == 6 then
  55. PlayFlavor(NPC, "", "As soon as you can gather those ingredients for me, we will make something new and scrumptious!", "", 1689589577, 4560189, Spawn)
  56. elseif choice == 7 then
  57. PlayFlavor(NPC, "", "I need that pepper as soon as possible...oh, my water is boiling.", "", 1689589577, 4560189, Spawn)
  58. else
  59. end
  60. end
  61. ]]--
  62. function hailed(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. conversation = CreateConversation()
  65. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1039.mp3", "", "", 0, 0, Spawn)
  66. if GetQuestStep(Spawn, Achoo) == 1 then
  67. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1039.mp3", "I need that pepper as soon as possible...oh my water is boiling.", "tapfoot", 1689589577, 4560189, Spawn)
  68. elseif GetQuestStep(Spawn, Achoo) == 2 then
  69. AddConversationOption(conversation, "Thanks a lot. I'm starving!")
  70. StartConversation(conversation, NPC, Spawn, "Oh my! Pepper! That is exactly what I needed! Here, eat something. You look flush. Have you seen my ladle?")
  71. SetStepComplete(Spawn, Achoo, 2)
  72. elseif GetQuestStep(Spawn, Blub) == 1 then
  73. PlayFlavor(NPC, "", "I need the extra fish if I am going to make more chowder. Were you still going to fetch that for me?", "happy", 1689589577, 4560189, Spawn)
  74. elseif GetQuestStep(Spawn, Blub) == 2 then
  75. SetStepComplete(Spawn, Blub, 2)
  76. elseif GetQuestStep(Spawn, Killing) == 1 then
  77. PlayFlavor(NPC, "", "That poor soul, is he still staggering around? Aroof is such a large one, you'd think he could hold his liquor better then most.", "sigh", 1689589577, 4560189, Spawn)
  78. elseif GetQuestStep(Spawn, Killing) == 2 then
  79. SetStepComplete(Spawn, Killing, 2)
  80. elseif GetQuestStep(Spawn, Care) == 1 then
  81. PlayFlavor(NPC, "", "Please give Blarton the cookies and my best wishes. Sweets to sweeten a sour disposition I always say.", "nod", 1689589577, 4560189, Spawn)
  82. elseif GetQuestStep(Spawn, Care) == 2 then
  83. SetStepComplete(Spawn, Care, 2)
  84. elseif HasQuest(Spawn,Pie) and GetQuestStep(Spawn, Pie) ~= 4 then
  85. PlayFlavor(NPC, "", "As soon as you can gather those ingredients for me, we will make something new and scrumptious!", "", 1689589577, 4560189, Spawn)
  86. elseif GetQuestStep(Spawn, Pie) == 4 then
  87. SetStepComplete(Spawn, Pie, 4)
  88. elseif HasQuest(Spawn,Mail) then
  89. PlayFlavor(NPC, "", "Did you take that letter to Jacque yet?", "hello", 0, 0, Spawn, 0)
  90. elseif HasCompletedQuest(Spawn, Achoo) == false and HasQuest(Spawn, Achoo) == false then
  91. AddConversationOption(conversation, "I have time. What did you need?", "dlg_1_2")
  92. AddConversationOption(conversation, "Sorry, I'm kind of busy.")
  93. StartConversation(conversation, NPC, Spawn, "I'm making a lovely, warm chowder to share with those in need. However, I seem to have forgotten an ingredient. Could you be a doll and run an errand for me?")
  94. elseif HasCompletedQuest(Spawn, Blub) == false and HasQuest(Spawn, Blub) == false and HasCompletedQuest(Spawn, Achoo) then
  95. AddConversationOption(conversation, "Sure, I will go get that now.", "dlg_0_2")
  96. AddConversationOption(conversation, "I don't have time for that today.")
  97. StartConversation(conversation, NPC, Spawn, "So many hungry folks. I am afraid I haven't made enough for everyone! If you want to eat, you'll need to fetch me some extra Coldwind fish so I can stir up another pot.")
  98. elseif HasCompletedQuest(Spawn, Killing) == false and HasQuest(Spawn, Killing) == false and HasCompletedQuest(Spawn, Blub) then
  99. AddConversationOption(conversation, "Sure, I will take it to him now.", "dlg_8_2")
  100. AddConversationOption(conversation, "Sorry, I don't have time for this.")
  101. StartConversation(conversation, NPC, Spawn, "If there is one thing wholesome, hot food is good for it's warming the soul. That, and it helps those who have partaken of the good ale a bit heavily as well. Please, take this to Aroof.")
  102. elseif HasCompletedQuest(Spawn, Care) == false and HasQuest(Spawn, Care) == false and HasCompletedQuest(Spawn, Killing) then
  103. AddConversationOption(conversation, "Sure, I will do that for you.", "dlg_21_2")
  104. AddConversationOption(conversation, "Sorry, no time today.")
  105. StartConversation(conversation, NPC, Spawn, "You have been so helpful today! My cousin, Blarton Blumble, has happened on some terrible luck and broke his leg while fishing. He is the sad sack today and in such a terrible mood. If you could deliver these lovely cookies to him for me, there will be plenty for you when you return!")
  106. elseif HasCompletedQuest(Spawn, Pie) == false and HasQuest(Spawn, Pie) == false and HasCompletedQuest(Spawn, Care) then
  107. AddConversationOption(conversation, "Ok, I will go get those ingredients for you.", "Quest5")
  108. AddConversationOption(conversation, "Sorry, I have to meet someone.")
  109. StartConversation(conversation, NPC, Spawn, "Every cook has their experimental side, which must be nurtured! If you could run out and rustle up these ingredients for me, I think we would make something new and exciting!")
  110. elseif HasCompletedQuest(Spawn, Mail) == false and HasQuest(Spawn, Mail) == false and HasCompletedQuest(Spawn, Pie) then
  111. AddConversationOption(conversation, "Sure I'll take the letter. I'll head that way shortly.", "Quest6")
  112. AddConversationOption(conversation, "Sorry, I'm not heading that way.")
  113. StartConversation(conversation, NPC, Spawn, "I need this letter delivered to Jacques in The Thundering Steppes, so he can take it to Blarton.")
  114. end
  115. end
  116. function Quest1(NPC, Spawn)
  117. OfferQuest(NPC, Spawn, Achoo)
  118. end
  119. function Quest2(NPC, Spawn)
  120. OfferQuest(NPC, Spawn, Blub)
  121. end
  122. function Quest3(NPC, Spawn)
  123. OfferQuest(NPC, Spawn, Killing)
  124. end
  125. function Quest4(NPC, Spawn)
  126. OfferQuest(NPC, Spawn, Care)
  127. end
  128. function Quest5(NPC, Spawn)
  129. OfferQuest(NPC, Spawn, Pie)
  130. end
  131. function Quest5(NPC, Spawn)
  132. OfferQuest(NPC, Spawn, Mail)
  133. end
  134. ------------- Blub
  135. function dlg_0_2(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  139. AddConversationOption(conversation, "I will return as quickly as I can.", "Quest2")
  140. StartConversation(conversation, NPC, Spawn, "Wonderful! I'll be waiting for your return.")
  141. end
  142. -------------- Achoo
  143. function dlg_1_2(NPC, Spawn)
  144. FaceTarget(NPC, Spawn)
  145. conversation = CreateConversation()
  146. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  147. AddConversationOption(conversation, "Alright.", "dlg_1_3")
  148. StartConversation(conversation, NPC, Spawn, "I need you to purchase some pepper from Merchant Novak and bring it back here. She makes her stand out by the lighthouse near the docks.")
  149. end
  150. function dlg_1_3(NPC, Spawn)
  151. FaceTarget(NPC, Spawn)
  152. conversation = CreateConversation()
  153. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  154. AddConversationOption(conversation, "Sure, you bet!", "Quest1")
  155. StartConversation(conversation, NPC, Spawn, "Be as swift as you can... I wouldn't want my roux to clump!")
  156. end
  157. ---------------- Killing
  158. function dlg_8_2(NPC, Spawn)
  159. FaceTarget(NPC, Spawn)
  160. conversation = CreateConversation()
  161. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  162. AddConversationOption(conversation, "Let's hope that's not the case.", "Quest3")
  163. StartConversation(conversation, NPC, Spawn, "If he doesn't sober up we will be needing more than food to save him!")
  164. end
  165. --------------- Care
  166. function dlg_21_2(NPC, Spawn)
  167. FaceTarget(NPC, Spawn)
  168. conversation = CreateConversation()
  169. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  170. AddConversationOption(conversation, "I will return.", "Quest4")
  171. StartConversation(conversation, NPC, Spawn, "Bless your heart.")
  172. end