JohfritGythell.lua 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/JohfritGythell.lua
  3. Script Purpose : Johfrit Gythell
  4. Script Author : Scatman
  5. Script Date : 2008.10.08
  6. Script Notes :
  7. --]]
  8. local QUEST_3_FROM_HELAIN = 297
  9. local QUEST_4 = 298
  10. local QUEST_5 = 299
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, QUEST_4)
  13. ProvidesQuest(NPC, QUEST_5)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. conversation = CreateConversation()
  21. if HasCompletedQuest(Spawn, QUEST_3_FROM_HELAIN) then
  22. if HasCompletedQuest(Spawn, QUEST_4) then
  23. if HasCompletedQuest(Spawn, QUEST_5) then
  24. OnQuest5(NPC, Spawn, conversation)
  25. elseif HasQuest(Spawn, QUEST_5) then
  26. OnQuest5(NPC, Spawn, conversation)
  27. else
  28. DoNotGoYet(NPC, Spawn, conversation)
  29. end
  30. elseif HasQuest(Spawn, QUEST_4) then
  31. OnQuest4(NPC, Spawn, conversation)
  32. else
  33. GoodDayThere(NPC, Spawn, conversation)
  34. end
  35. elseif HasQuest(Spawn, QUEST_3_FROM_HELAIN) and GetQuestStep(Spawn, QUEST_3_FROM_HELAIN) == 5 then
  36. GoodDayThere(NPC, Spawn, conversation)
  37. else
  38. Hello(NPC, Spawn, conversation)
  39. end
  40. end
  41. function Hello(NPC, Spawn, conversation)
  42. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell012.mp3", "", "", 1490365584, 959312393, Spawn)
  43. AddConversationOption(conversation, "And to you!")
  44. StartConversation(conversation, NPC, Spawn, "Hello! I hope your day is rewarding for you.")
  45. end
  46. ---------------------------------------------------------------------------------------------------------------------
  47. -- QUEST_3_FROM_HELAIN
  48. ---------------------------------------------------------------------------------------------------------------------
  49. function GoodDayThere(NPC, Spawn, conversation)
  50. if HasQuest(Spawn, QUEST_3_FROM_HELAIN) then
  51. SetStepComplete(Spawn, QUEST_3_FROM_HELAIN, 5)
  52. end
  53. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell001.mp3", "", "", 1758157346, 514238757, Spawn)
  54. AddConversationOption(conversation, "Hello! I don't suppose you have some work for me? Laudine Shardalow thought you could use a hand.", "dlg_24_1")
  55. StartConversation(conversation, NPC, Spawn, "Good day, there!")
  56. end
  57. ---------------------------------------------------------------------------------------------------------------------
  58. -- QUEST_4
  59. ---------------------------------------------------------------------------------------------------------------------
  60. function dlg_24_1(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell002.mp3", "", "", 1726989098, 3535948978, Spawn)
  64. AddConversationOption(conversation, "Items others can't get for them?", "dlg_24_2")
  65. StartConversation(conversation, NPC, Spawn, "Right she is. See, I am a supplier of goods to some discerning citizens of this village. They have particular tastes for food, and items that I can procure for them.")
  66. end
  67. function dlg_24_2(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell003.mp3", "", "", 480639092, 2881648434, Spawn)
  71. AddConversationOption(conversation, "Why did they not just dive and get them?", "dlg_24_3")
  72. AddConversationOption(conversation, "Why do you not just dive to get them?", "dlg_26_3")
  73. StartConversation(conversation, NPC, Spawn, "Or just that I can get it for them at a lower price. Two items of my latest delivery fell in the water at the Mariner's Bell. My, uh err suppliers had slipped, and into the drink they went.")
  74. end
  75. function dlg_26_3(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. conversation = CreateConversation()
  78. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell015.mp3", "", "", 3831285850, 3765154825, Spawn)
  79. AddConversationOption(conversation, "You wish me to dive and get the items?", "OfferQuest4")
  80. StartConversation(conversation, NPC, Spawn, "I cannot swim. What? Don't look at me like that!")
  81. end
  82. function dlg_24_3(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. conversation = CreateConversation()
  85. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell004.mp3", "", "", 4017622450, 3148551148, Spawn)
  86. AddConversationOption(conversation, "You wish me to dive and get the items?", "OfferQuest4")
  87. StartConversation(conversation, NPC, Spawn, "To make my life difficult, I suspect. At any rate, they were not paid, as they did not complete the task.")
  88. end
  89. function OfferQuest4(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. OfferQuest(NPC, Spawn, QUEST_4)
  92. end
  93. function OnQuest4(NPC, Spawn, conversation)
  94. if GetQuestStep(Spawn, QUEST_4) < 3 then
  95. AddConversationOption(conversation, "Not yet but I will return with them.")
  96. StartConversation(conversation, NPC, Spawn, "Have you both the crate and barrel?")
  97. elseif GetQuestStep(Spawn, QUEST_4) == 3 then
  98. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell006.mp3", "", "", 2494699442, 3684194756, Spawn)
  99. AddConversationOption(conversation, "I have, and I will be happy to part with this slimy and stinky box.", "dlg_28_1")
  100. StartConversation(conversation, NPC, Spawn, "You have returned, and from the smell of it you have the items!")
  101. elseif GetQuestStep(Spawn, QUEST_4) < 6 then
  102. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell019.mp3", "", "", 1714492080, 3648364049, Spawn)
  103. AddConversationOption(conversation, "Not yet. The stench of the deliveries must be affecting my focus. I will be back.")
  104. StartConversation(conversation, NPC, Spawn, "Have you given the goods to both Amazu and Laudine, yet?")
  105. elseif GetQuestStep(Spawn, QUEST_4) == 6 then
  106. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell009.mp3", "", "", 2512367033, 2556387767, Spawn)
  107. AddConversationOption(conversation, "I do.", "dlg_33_2")
  108. AddConversationOption(conversation, "Maybe, but what stops me from running off with it?", "dlg_33_1")
  109. StartConversation(conversation, NPC, Spawn, "You have the money from Laudine and Amazu?")
  110. end
  111. end
  112. function dlg_28_1(NPC, Spawn)
  113. FaceTarget(NPC, Spawn)
  114. conversation = CreateConversation()
  115. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell007.mp3", "", "", 3213668997, 2423736455, Spawn)
  116. AddConversationOption(conversation, "No wonder she knew you had work for me.", "dlg_28_2")
  117. StartConversation(conversation, NPC, Spawn, "Not so fast! That is to be delivered to Amazu Kharliko. He loves his imported squid. The barrel is to be taken to Laudine Shardalow.")
  118. end
  119. function dlg_28_2(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. conversation = CreateConversation()
  122. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell008.mp3", "", "", 2722964210, 4250092190, Spawn)
  123. AddConversationOption(conversation, "I'll be back shortly.", "dlg_28_3")
  124. StartConversation(conversation, NPC, Spawn, "Ah, yes. Laudine has been waiting for that barrel for some time.")
  125. end
  126. function dlg_28_3(NPC, Spawn)
  127. SetStepComplete(Spawn, QUEST_4, 3)
  128. FaceTarget(NPC, Spawn)
  129. conversation = CreateConversation()
  130. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell018.mp3", "", "", 1724182606, 1946010139, Spawn)
  131. AddConversationOption(conversation, "I understand.")
  132. StartConversation(conversation, NPC, Spawn, "And be sure to get paid by each, otherwise I will not have money to give you.")
  133. end
  134. function dlg_33_1(NPC, Spawn)
  135. SetStepComplete(Spawn, QUEST_4, 6)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell020.mp3", "", "", 1446803867, 734215460, Spawn)
  139. AddConversationOption(conversation, "Makes sense.", "DoNotGoYet")
  140. StartConversation(conversation, NPC, Spawn, "The guards that I will send after you for smuggling goods.")
  141. end
  142. function dlg_33_2(NPC, Spawn)
  143. SetStepComplete(Spawn, QUEST_4, 6)
  144. FaceTarget(NPC, Spawn)
  145. conversation = CreateConversation()
  146. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell010.mp3", "", "", 686711043, 844320139, Spawn)
  147. AddConversationOption(conversation, "Thanks.", "DoNotGoYet")
  148. StartConversation(conversation, NPC, Spawn, "Great! Here's the payment, as I promised, and another item that you may find useful.")
  149. end
  150. ---------------------------------------------------------------------------------------------------------------------
  151. -- QUEST_5
  152. ---------------------------------------------------------------------------------------------------------------------
  153. function DoNotGoYet(NPC, Spawn, conversation)
  154. if conversation == nil then
  155. FaceTarget(NPC, Spawn)
  156. conversation = CreateConversation()
  157. end
  158. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/johfrit_gythell/qey_village01/johfritgythell013.mp3", "", "", 4074891808, 4030820524, Spawn)
  159. AddConversationOption(conversation, "Keep talking.", "OfferQuest5")
  160. StartConversation(conversation, NPC, Spawn, "Do not go yet! I uh, may not have more for you to do, but I know of others that can use one of your talents.")
  161. end
  162. function OfferQuest5(NPC, Spawn)
  163. FaceTarget(NPC, Spawn)
  164. OfferQuest(NPC, Spawn, QUEST_5)
  165. end
  166. function OnQuest5(NPC, Spawn, conversation)
  167. AddConversationOption(conversation, "All right, thank you anyway.")
  168. StartConversation(conversation, NPC, Spawn, "Oh hello there, again! I wish I had more work for you, but nothing so far.")
  169. end