9
3

DockmasterWaulon.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. --[[
  2. Script Name : SpawnScripts/Butcherblock/DockmasterWaulon.lua
  3. Script Purpose : Dockmaster Waulon
  4. Script Author : jakejp
  5. Script Date : 2018.05.31
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local DockDelinquency = 249
  9. local CoinForTheCaptain = 255
  10. local NauticalDisaster = 268
  11. local SeekingBrultenHiltstill = 270
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, DockDelinquency)
  14. ProvidesQuest(NPC, CoinForTheCaptain)
  15. ProvidesQuest(NPC, NauticalDisaster)
  16. ProvidesQuest(NPC, SeekingBrultenHiltstill)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. conversation = CreateConversation()
  24. if HasQuest(Spawn, HalasianWelcome) then
  25. -- Start first quest (Add if you don't do this quest from start zone)
  26. -- Add Conversation to complete that side quest
  27. AddConversationOption(conversation, "")
  28. StartConversation(conversation, NPC, Spawn, "")
  29. elseif HasCompletedQuest(Spawn, DockDelinquency) == false and HasQuest(Spawn, DockDelinquency ) == false and CanReceiveQuest(Spawn, DockDelinquency) == true then
  30. -- Offer Dock Delinquency if not completed or started
  31. AddConversationOption(conversation, "Greetings. I am " .. GetName(Spawn) .. ". Perhaps I could help you?", "Option1")
  32. AddConversationOption(conversation, "That's some hat you got there.", "Option2")
  33. StartConversation(conversation, NPC, Spawn, "Ahoy there, newcomer! Welcome to the Butcherblock Mountains! I'm Dockmaster Waulon Highpebble. You can just call me Waulon though. I'm sorry I can't spend more time chatting wit' ya, but keepin' track o' every box, crate an' person that arrives here is more than one dwarf can handle!")
  34. elseif GetQuestStep(Spawn, DockDelinquency) >=1 and GetQuestStep(Spawn, DockDelinquency) <= 3 then
  35. -- Dockmaster Waulon dialogue while on quest
  36. Say(NPC, "Have you killed all the beasties yet? Ah! They're makin' a mess of my whole operation!")
  37. elseif GetQuestStep(Spawn, DockDelinquency) == 4 then
  38. -- Finish Dock Delinquency and start next quest CoinForTheCaptain
  39. SetStepComplete(Spawn, DockDelinquency, 4)
  40. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0, Spawn)
  41. AddConversationOption(conversation, "My pleasure, Waulon. Anything else I can do to help?", "dlg_3_1")
  42. AddConversationOption(conversation, "I've done my part. I'll be on my way now.")
  43. StartConversation(conversation, NPC, Spawn, "You know, it seems a little bit less chaotic around here already! Thanks for your help!")
  44. elseif HasCompletedQuest(Spawn, DockDelinquency) and HasCompletedQuest(Spawn, CoinForTheCaptain) == false and HasQuest(Spawn, CoinForTheCaptain) == false then
  45. -- Start CoinForTheCaptain if one didn't get it yet
  46. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0, Spawn)
  47. AddConversationOption(conversation, "My pleasure, Waulon. Anything else I can do to help?", "dlg_3_1")
  48. AddConversationOption(conversation, "I've done my part. I'll be on my way now.")
  49. StartConversation(conversation, NPC, Spawn, "You know, it seems a little bit less chaotic around here already! Thanks for your help!")
  50. elseif GetQuestStep(Spawn, CoinForTheCaptain) == 1 or GetQuestStep(Spawn, CoinForTheCaptain) == 2 then
  51. -- Dialogue while on quest
  52. Say(NPC, "So, how is the ol' Captain? Oh, you haven't spoken with him yet. Well of wit' ya.")
  53. elseif GetQuestStep(Spawn, CoinForTheCaptain) == 3 then
  54. -- Finish CoinForTheCaptain and start next quest NauticalDisaster
  55. SetStepComplete(Spawn, CoinForTheCaptain, 3)
  56. FaceTarget(NPC, Spawn)
  57. AddConversationOption(conversation, "I gave the coin to him.", "dlg_10_1")
  58. AddConversationOption(conversation, "Honestly, I have no idea.", "dlg_10_1")
  59. StartConversation(conversation, NPC, Spawn, "Hello again. What say Captain Stonnacky")
  60. elseif HasCompletedQuest(Spawn, CoinForTheCaptain) and HasCompletedQuest(Spawn, NauticalDisaster) == false and HasQuest(Spawn, NauticalDisaster) == false then
  61. -- start next quest NauticalDisaster if didn't get from previous
  62. FaceTarget(NPC, Spawn)
  63. AddConversationOption(conversation, "I gave the coin to him.", "dlg_10_1")
  64. AddConversationOption(conversation, "Honestly, I have no idea.", "dlg_10_1")
  65. StartConversation(conversation, NPC, Spawn, "Hello again. What say Captain Stonnacky")
  66. elseif GetQuestStep(Spawn, NauticalDisaster) == 1 then
  67. -- dialogue while on quest
  68. Say(NPC, "The tome! Did you find the tome?!")
  69. elseif GetQuestStep(Spawn, NauticalDisaster) == 2 then
  70. -- dialogue while on quest
  71. AddConversationOption(conversation, "Yes! Here it is!", "NauticalDisasterDialogue1")
  72. StartConversation(conversation, NPC, Spawn, "Were you successful in finding the tome?")
  73. elseif GetQuestStep(Spawn, NauticalDisaster) == 3 then
  74. Say(NPC, "The pages! Did you find all the pages?!")
  75. elseif GetQuestStep(Spawn, NauticalDisaster) == 4 then
  76. SetStepComplete(Spawn, NauticalDisaster, 4)
  77. AddConversationOption(conversation, "Thanks. I'm actually looking for more work. Is there anyone else that could use my help?", "SeekingBrultenHiltstillDialogue1")
  78. AddConversationOption(conversation, "Well, now that our business is done, I bid you a good day. Farewell.")
  79. StartConversation(conversation, NPC, Spawn, "You found the pages! Ah, I knew you could do it! Here, please take this as payment. I owe you a debt of thanks!")
  80. elseif HasCompletedQuest(Spawn, NauticalDisaster) and HasCompletedQuest(Spawn, SeekingBrultenHiltstill) == false and HasQuest(Spawn, SeekingBrultenHiltstill) == false then
  81. AddConversationOption(conversation, "Thanks. I'm actually looking for more work. Is there anyone else that could use my help?", "SeekingBrultenHiltstillDialogue1")
  82. AddConversationOption(conversation, "Well, now that our business is done, I bid you a good day. Farewell.")
  83. StartConversation(conversation, NPC, Spawn, "You found the pages! Ah, I knew you could do it! Here, please take this as payment. I owe you a debt of thanks!")
  84. elseif GetQuestStep(Spawn, SeekingBrultenHiltstill) == 1 then
  85. Say(NPC, "Allo there. Have you spoken with Brulten Hiltstill yet?")
  86. elseif HasCompletedQuest(Spawn, SeekingBrultenHiltstill) then
  87. local choice = math.random(1,2)
  88. if choice == 1 then
  89. Say(NPC, "Thanks again for all your help!")
  90. elseif choice == 2 then
  91. Say(NPC, "Thanks for all your help! Go speak with Brulten Hiltstill if ya haven't already.")
  92. end
  93. else
  94. Say(NPC, "Hello, newcomer! Welcome to the Butcherblock Docks.")
  95. end
  96. end
  97. function dlg_0_1(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. conversation = CreateConversation()
  100. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  101. AddConversationOption(conversation, "I will pay him a visit. How do I find him?", "dlg_0_2")
  102. AddConversationOption(conversation, "That doesn't interest me. Good bye.")
  103. StartConversation(conversation, NPC, Spawn, "As a matter of fact, there is someone who could use your help. Seek out Brulten Hiltstill. He protects the caravans arriving from the Greater Faydark. ")
  104. end
  105. function dlg_3_1(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. conversation = CreateConversation()
  108. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  109. AddConversationOption(conversation, "Of course! Where can I find the Captain?", "GiveCoinForTheCaptain")
  110. AddConversationOption(conversation, "Yes, actually I would.")
  111. StartConversation(conversation, NPC, Spawn, "As a matter of fact there is. A merchant ship has recently arrived and delivered the payrolls of several ship's crews. Would you mind taking this sack of coins to Captain Stonnacky?")
  112. end
  113. function dlg_3_2(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. conversation = CreateConversation()
  116. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  117. AddConversationOption(conversation, "I'll be right back!", "dlg_3_3")
  118. StartConversation(conversation, NPC, Spawn, "That old salt is just over there at the end of the dock. He's a bit senile in his old age, but still a rugged captain nonetheless. After you deliver the sack, report back to me for your reward.")
  119. end
  120. function dlg_10_1(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  124. AddConversationOption(conversation, "What happened?", "dlg_10_2")
  125. StartConversation(conversation, NPC, Spawn, "Aye, the Captain's had a bit too much time at sea. But alas, I'm afraid I've just learned of terrible event. It seems there's been an attack!")
  126. end
  127. function dlg_10_2(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. conversation = CreateConversation()
  130. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  131. AddConversationOption(conversation, "Is there anything I can do to help?", "dlg_10_3")
  132. AddConversationOption(conversation, "Wow, glad I wasn't on that ship. Good day!")
  133. StartConversation(conversation, NPC, Spawn, "A ship, bound for this very dock, was attacked by aqua goblins just off the coast. Despite the valiant efforts of the crew, many of the passengers were robbed of all their possessions.")
  134. end
  135. function dlg_10_3(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  139. AddConversationOption(conversation, "Alright, you've got a deal!", "GiveNauticalDisaster")
  140. StartConversation(conversation, NPC, Spawn, "Aye, would you mind helping me one last time? One of the passengers, an erudite sage, was relieved of an ancient magical tome which detailed much of the history of Norrath. He's paid me handsomely for its return. I assure you, I'll cut you in on his reward if you recover that tome for me.")
  141. end
  142. function dlg_10_4(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. conversation = CreateConversation()
  145. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  146. AddConversationOption(conversation, "I'll return when I've recovered the tome.")
  147. StartConversation(conversation, NPC, Spawn, "Ye'd best check them islands out thar in the bay. I'm sure those nasties brought it back to their camp. I just hope those wicked aqua goblins haven't destroyed it yet.")
  148. end
  149. function Option1(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. local conversation = CreateConversation()
  152. AddConversationOption(conversation, "Sure, I'm not afraid to get my hands dirty!", "GiveDockDelinquency")
  153. AddConversationOption(conversation, "On second thought, it sounds like it might possibly be dangerous!")
  154. StartConversation(conversation, NPC, Spawn, "Aye, that would be wonderful. I could use your help in takin' care of several pests that have been makin' a big mess here. What do you say?")
  155. end
  156. function Option2(NPC, Spawn)
  157. FaceTarget(NPC, Spawn)
  158. local conversation = CreateConversation()
  159. AddConversationOption(conversation, "I see. So, could you use any help?", "Option1")
  160. StartConversation(conversation, NPC, Spawn, "Aye, tis me lucky hat. It brings me the luck! I had me another lucky hat but... I lost it on one me many voyages.")
  161. end
  162. function NauticalDisasterDialogue1(NPC, Spawn)
  163. FaceTarget(NPC, Spawn)
  164. local conversation = CreateConversation()
  165. AddConversationOption(conversation, "You asked for the tome, not necessarily all the pages inside the tome. I'd like my payment please.", "NauticalDisasterDialogue2")
  166. StartConversation(conversation, NPC, Spawn, "Bah, look at it! Nearly half the pages have been ripped out! This will never do!")
  167. end
  168. function NauticalDisasterDialogue2(NPC, Spawn)
  169. FaceTarget(NPC, Spawn)
  170. local conversation = CreateConversation()
  171. AddConversationOption(conversation, "I have a hard time believing a goblin would study anything...", "NauticalDisasterDialogue3")
  172. StartConversation(conversation, NPC, Spawn, "I'm afraid I can't pay you if I haven't been paid meself! Hmm, judging by these scratch marks, it's no doubt that the aqua goblins tore the pages out. Perhaps the aqua goblin finger wagglers took the pages for their own research.")
  173. end
  174. function NauticalDisasterDialogue3(NPC, Spawn)
  175. FaceTarget(NPC, Spawn)
  176. local conversation = CreateConversation()
  177. AddConversationOption(conversation, "...", "NauticalDisasterDialogue4")
  178. StartConversation(conversation, NPC, Spawn, "Well, if you have a better idea on who took the pages, I'd like to hear it now.")
  179. end
  180. function NauticalDisasterDialogue4(NPC, Spawn)
  181. SetStepComplete(Spawn, NauticalDisaster, 2)
  182. FaceTarget(NPC, Spawn)
  183. local conversation = CreateConversation()
  184. AddConversationOption(conversation, "Okay, but only because it's you.")
  185. StartConversation(conversation, NPC, Spawn, "I'm sorry, I didn't mean ta be short wit' you. Must be the stress of this 'ere job weighin' on me. Please, find the aqua goblin wizards and see if they have the pages on 'em.")
  186. end
  187. function SeekingBrultenHiltstillDialogue1(NPC, Spawn)
  188. FaceTarget(NPC, Spawn)
  189. local conversation = CreateConversation()
  190. AddConversationOption(conversation, "I will pay him a visit. How do I find him?", "GiveSeekingBrultenHiltstill")
  191. AddConversationOption(conversation, "That doesn't interest me. Good bye.")
  192. StartConversation(conversation, NPC, Spawn, "As a matter of fact, there is someone who could use your help. You should seek out Brulten Hiltstill. He's just been stationed out at the newly Established Highland Outpost.")
  193. end
  194. function SeekingBrultenHiltstillDialogue2(NPC, Spawn)
  195. FaceTarget(NPC, Spawn)
  196. local conversation = CreateConversation()
  197. AddConversationOption(conversation, "Excellent. Then I'm off. Good day!", "GiveSeekingBrultenHiltstill")
  198. StartConversation(conversation, NPC, Spawn, "To get there, you should take the trail that runs along the cliff face to the east. Once you reach the top of the cliff, look for ol' Brulten near the griffin tower.")
  199. end
  200. function GiveDockDelinquency(NPC, Spawn)
  201. OfferQuest(NPC, Spawn, DockDelinquency)
  202. end
  203. function GiveCoinForTheCaptain(NPC, Spawn)
  204. if HasCompletedQuest(Spawn, DockDelinquency) then
  205. OfferQuest(NPC, Spawn, CoinForTheCaptain)
  206. end
  207. end
  208. function GiveNauticalDisaster(NPC, Spawn)
  209. if HasCompletedQuest(Spawn, CoinForTheCaptain) then
  210. OfferQuest(NPC, Spawn, NauticalDisaster)
  211. end
  212. end
  213. function GiveSeekingBrultenHiltstill(NPC, Spawn)
  214. if HasCompletedQuest(Spawn, NauticalDisaster) then
  215. OfferQuest(NPC, Spawn, SeekingBrultenHiltstill)
  216. end
  217. end