MatsyRollingpin.lua 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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, 10, "InRange")
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn)
  21. if HasCompletedQuest(Spawn, Achoo) then
  22. ProvidesQuest(NPC, Blub)
  23. SetInfoFlag(NPC)
  24. SetVisualFlag(NPC)
  25. elseif HasCompletedQuest(Spawn, Blub) then
  26. ProvidesQuest(NPC, Killing)
  27. SetInfoFlag(NPC)
  28. SetVisualFlag(NPC)
  29. elseif HasCompletedQuest(Spawn, Killing) then
  30. ProvidesQuest(NPC, Care)
  31. SetInfoFlag(NPC)
  32. SetVisualFlag(NPC)
  33. elseif HasCompletedQuest(Spawn, Care) then
  34. ProvidesQuest(NPC, Pie)
  35. SetInfoFlag(NPC)
  36. SetVisualFlag(NPC)
  37. elseif HasCompletedQuest(Spawn, Pie) then
  38. ProvidesQuest(NPC, Mail)
  39. SetInfoFlag(NPC)
  40. SetVisualFlag(NPC)
  41. end
  42. end
  43. --[[ if choice == 1 then
  44. 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)
  45. elseif choice == 2 then
  46. 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)
  47. elseif choice == 3 then
  48. PlayFlavor(NPC, "", "Did you take that letter to Jacque yet?", "", 1689589577, 4560189, Spawn)
  49. elseif choice == 4 then
  50. PlayFlavor(NPC, "", "I need that pepper as soon as possible...oh my water is boiling.", "", 1689589577, 4560189, Spawn)
  51. elseif choice == 5 then
  52. PlayFlavor(NPC, "", "Please give Blarton the cookies and my best wishes. Sweets to sweeten a sour disposition I always say.", "", 1689589577, 4560189, Spawn)
  53. elseif choice == 6 then
  54. PlayFlavor(NPC, "", "As soon as you can gather those ingredients for me, we will make something new and scrumptious!", "", 1689589577, 4560189, Spawn)
  55. elseif choice == 7 then
  56. PlayFlavor(NPC, "", "I need that pepper as soon as possible...oh, my water is boiling.", "", 1689589577, 4560189, Spawn)
  57. else
  58. end
  59. end
  60. ]]--
  61. function hailed(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1039.mp3", "", "", 0, 0, Spawn)
  65. if GetQuestStep(Spawn, Achoo) == 2 then
  66. AddConversationOption(conversation, "Thanks a lot. I'm starving!")
  67. StartConversation(conversation, NPC, Spawn, "Oh my! Pepper! That is exactly what I needed! Here, eat something. You look flush. Have you seen my ladle?")
  68. SetStepComplete(Spawn, Achoo, 2)
  69. elseif GetQuestStep(Spawn, Blub) == 2 then
  70. SetStepComplete(Spawn, Blub, 2)
  71. elseif GetQuestStep(Spawn, Killing) == 2 then
  72. SetStepComplete(Spawn, Killing, 2)
  73. elseif GetQuestStep(Spawn, Care) == 2 then
  74. SetStepComplete(Spawn, Care, 2)
  75. elseif GetQuestStep(Spawn, Pie) == 4 then
  76. SetStepComplete(Spawn, Pie, 4)
  77. elseif HasCompletedQuest(Spawn, Achoo) == false and HasQuest(Spawn, Achoo) == false then
  78. AddConversationOption(conversation, "I have time. What did you need?", "dlg_1_2")
  79. AddConversationOption(conversation, "Sorry, I'm kind of busy.")
  80. 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?")
  81. elseif HasCompletedQuest(Spawn, Blub) == false and HasQuest(Spawn, Blub) == false and HasCompletedQuest(Spawn, Achoo) then
  82. AddConversationOption(conversation, "Sure, I will go get that now.", "dlg_0_2")
  83. AddConversationOption(conversation, "I don't have time for that today.")
  84. 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.")
  85. elseif HasCompletedQuest(Spawn, Killing) == false and HasQuest(Spawn, Killing) == false and HasCompletedQuest(Spawn, Blub) then
  86. AddConversationOption(conversation, "Sure, I will take it to him now.", "dlg_8_2")
  87. AddConversationOption(conversation, "Sorry, I don't have time for this.")
  88. 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.")
  89. elseif HasCompletedQuest(Spawn, Care) == false and HasQuest(Spawn, Care) == false and HasCompletedQuest(Spawn, Killing) then
  90. AddConversationOption(conversation, "Sure, I will do that for you.", "dlg_21_2")
  91. AddConversationOption(conversation, "Sorry, no time today.")
  92. 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!")
  93. elseif HasCompletedQuest(Spawn, Pie) == false and HasQuest(Spawn, Pie) == false and HasCompletedQuest(Spawn, Care) then
  94. AddConversationOption(conversation, "Ok, I will go get those ingredients for you.", "Quest5")
  95. AddConversationOption(conversation, "Sorry, I have to meet someone.")
  96. 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!")
  97. elseif HasCompletedQuest(Spawn, Mail) == false and HasQuest(Spawn, Mail) == false and HasCompletedQuest(Spawn, Pie) then
  98. OfferQuest(NPC, Spawn, Mail)
  99. end
  100. end
  101. function Quest1(NPC, Spawn)
  102. OfferQuest(NPC, Spawn, Achoo)
  103. end
  104. function Quest2(NPC, Spawn)
  105. OfferQuest(NPC, Spawn, Blub)
  106. end
  107. function Quest3(NPC, Spawn)
  108. OfferQuest(NPC, Spawn, Killing)
  109. end
  110. function Quest4(NPC, Spawn)
  111. OfferQuest(NPC, Spawn, Care)
  112. end
  113. function Quest5(NPC, Spawn)
  114. OfferQuest(NPC, Spawn, Pie)
  115. end
  116. ------------- Blub
  117. function dlg_0_2(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. conversation = CreateConversation()
  120. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  121. AddConversationOption(conversation, "I will return as quickly as I can.", "Quest2")
  122. StartConversation(conversation, NPC, Spawn, "Wonderful! I'll be waiting for your return.")
  123. end
  124. -------------- Achoo
  125. function dlg_1_2(NPC, Spawn)
  126. FaceTarget(NPC, Spawn)
  127. conversation = CreateConversation()
  128. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  129. AddConversationOption(conversation, "Alright.", "dlg_1_3")
  130. 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.")
  131. end
  132. function dlg_1_3(NPC, Spawn)
  133. FaceTarget(NPC, Spawn)
  134. conversation = CreateConversation()
  135. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  136. AddConversationOption(conversation, "Sure, you bet!", "Quest1")
  137. StartConversation(conversation, NPC, Spawn, "Be as swift as you can... I wouldn't want my roux to clump!")
  138. end
  139. ---------------- Killing
  140. function dlg_8_2(NPC, Spawn)
  141. FaceTarget(NPC, Spawn)
  142. conversation = CreateConversation()
  143. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  144. AddConversationOption(conversation, "Let's hope that's not the case.", "Quest3")
  145. StartConversation(conversation, NPC, Spawn, "If he doesn't sober up we will be needing more than food to save him!")
  146. end
  147. --------------- Care
  148. function dlg_21_2(NPC, Spawn)
  149. FaceTarget(NPC, Spawn)
  150. conversation = CreateConversation()
  151. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  152. AddConversationOption(conversation, "I will return.", "Quest4")
  153. StartConversation(conversation, NPC, Spawn, "Bless your heart.")
  154. end