9
3

MatsyRollingpin.lua 7.5 KB

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