CayanSable.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/CayanSable.lua
  3. Script Purpose : Cayan Sable
  4. Script Author : John Adams
  5. Script Date : 2008.09.23
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. -- Quest ID's
  9. local MEETING_WITH_CAYAN = 316 -- was 32
  10. local INFORMATION_MERCHANTS = 318 -- was 33
  11. local CONFRONTATION = 321 -- was 35
  12. -- Item ID's
  13. local FOLDING_STAND = 7379
  14. function spawn(NPC)
  15. ProvidesQuest(NPC, INFORMATION_MERCHANTS)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. conversation = CreateConversation()
  23. if HasCompletedQuest(Spawn, MEETING_WITH_CAYAN) then
  24. if HasCompletedQuest(Spawn, INFORMATION_MERCHANTS) then
  25. if HasCompletedQuest(Spawn, CONFRONTATION) then
  26. elseif HasQuest(Spawn, CONFRONTATION) then
  27. AhWelcomeBack(NPC, Spawn)
  28. end
  29. elseif HasQuest(Spawn, INFORMATION_MERCHANTS) then
  30. Say(NPC, "Have any problems friend?", Spawn)
  31. else
  32. HaveYouCollectedBerries(NPC, Spawn)
  33. end
  34. elseif HasQuest(Spawn, MEETING_WITH_CAYAN) then
  35. if GetQuestStep(Spawn, MEETING_WITH_CAYAN) == 1 then
  36. BetterHaveAGoodReason(NPC, Spawn)
  37. else
  38. HaveYouCollectedBerries(NPC, Spawn)
  39. end
  40. end
  41. end
  42. -------------------------------------------------------------------------------------------------------------------
  43. -- QUEST 1
  44. -------------------------------------------------------------------------------------------------------------------
  45. function BetterHaveAGoodReason(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. conversation = CreateConversation()
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable001.mp3", "", "", 2955433596, 3328302943, Spawn)
  49. AddConversationOption(conversation, "I have a job to ask of you, Maareona sent me.", "dlg_35_1")
  50. StartConversation(conversation, NPC, Spawn, "You better have a good reason for being back here.")
  51. end
  52. function dlg_35_1(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable002.mp3", "", "nod", 3326314353, 4151016678, Spawn)
  56. AddConversationOption(conversation, "We need-", "dlg_35_2")
  57. StartConversation(conversation, NPC, Spawn, "You wish a favor of your own accord? Speak of nothing else. What do you need?")
  58. end
  59. function dlg_35_2(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable003.mp3", "", "", 3734878539, 3356918318, Spawn)
  63. AddConversationOption(conversation, "I need information on a package that was delivered to Qeynos recently.", "dlg_35_3")
  64. StartConversation(conversation, NPC, Spawn, "You need...")
  65. end
  66. function dlg_35_3(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. conversation = CreateConversation()
  69. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable004.mp3", "", "", 3348898221, 3703761299, Spawn)
  70. AddConversationOption(conversation, "It was delivered to an Erudite by the name of Oolium Artanaes. Its final destination is within Starcrest Commune, but it hasn't been delivered yet. I need to know the whereabouts of this package.", "dlg_35_4")
  71. StartConversation(conversation, NPC, Spawn, "And what information do you have regarding this package?")
  72. end
  73. function dlg_35_4(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. conversation = CreateConversation()
  76. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable005.mp3", "", "agree", 3481387344, 4143272170, Spawn)
  77. AddConversationOption(conversation, "What favor?", "dlg_35_5")
  78. StartConversation(conversation, NPC, Spawn, " Very well. This will take some time, but not much. I will need to contact some friends, but I will get your information. For now I need you to do me a favor.")
  79. end
  80. function dlg_35_5(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. conversation = CreateConversation()
  83. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable006.mp3", "", "", 2014036225, 2408031230, Spawn)
  84. AddConversationOption(conversation, "I'll do it.", "dlg_36_6")
  85. AddConversationOption(conversation, "Why do you need me to do this for you?", "dlg_35_6")
  86. StartConversation(conversation, NPC, Spawn, "Red Sun Berries grow all around the Starcrest Commune. I need you to collect some for me.")
  87. end
  88. function dlg_35_6(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable007.mp3", "", "", 96821559, 3612059519, Spawn)
  92. AddConversationOption(conversation, "So you want me to take the fall for you if I get caught?", "dlg_35_7")
  93. StartConversation(conversation, NPC, Spawn, "Well, you owe me, for one. Also, I can't risk being caught with Red Sun Berries. I have a record, and having certain items that can be broken down into alchemical compounds used by assassins - despite how I intend to use them - would complicate my stay here in the Starcrest Commune.")
  94. end
  95. function dlg_35_7(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. conversation = CreateConversation()
  98. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable008.mp3", "", "no", 104262270, 421900564, Spawn)
  99. AddConversationOption(conversation, "That's a pretty flimsy excuse, isn't it? What do you need them for?", "dlg_35_8")
  100. StartConversation(conversation, NPC, Spawn, "Hardly. You're an Erudite. You people are always using Red Sun Berries for alchemical experiments and what not. Nobody will question an Erudite collecting some berries. If they do, just tell them you're looking to cure some ancient disease, they'll buy it.")
  101. end
  102. function dlg_35_8(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. conversation = CreateConversation()
  105. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable009.mp3", "", "", 655615143, 4278558385, Spawn)
  106. AddConversationOption(conversation, "I'm in.", "dlg_36_6")
  107. AddConversationOption(conversation, "I'm out.")
  108. StartConversation(conversation, NPC, Spawn, "The excuse is not flimsly for someone without a record. An extract from the berries themselves has been known to dull the magical prowess of those who consume it. This is something a client of mine wishes to study, as such I need the berries. I am not interested in whatever malicious uses the berries may have... for now. Are you in or out?")
  109. end
  110. function dlg_36_6(NPC, Spawn)
  111. SetStepComplete(Spawn, MEETING_WITH_CAYAN, 1)
  112. FaceTarget(NPC, Spawn)
  113. conversation = CreateConversation()
  114. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable010.mp3", "", "sniff", 3772026299, 415172365, Spawn)
  115. AddConversationOption(conversation, "Thanks, how do I get out of here?", "ThanksHowDoIGetOut")
  116. AddConversationOption(conversation, "I will get them.")
  117. StartConversation(conversation, NPC, Spawn, "I thought so. You can find the berries on some bushes around Starcrest Commune. They're not very obvious, as they rest at the heart of the bush itself, but if you reach in and give it a good shake, you should get some.")
  118. end
  119. function ThanksHowDoIGetOut(NPC, Spawn)
  120. PlayFlavor(NPC, "", "Just climb through this bush along the wall behind me.", "nod", 1689589577, 4560189, Spawn)
  121. end
  122. function HaveYouCollectedBerries(NPC, Spawn)
  123. FaceTarget(NPC, Spawn)
  124. conversation = CreateConversation()
  125. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable011.mp3", "", "", 1406752203, 243044540, Spawn)
  126. if GetQuestStep(Spawn, MEETING_WITH_CAYAN) == 2 then
  127. AddConversationOption(conversation, "Not yet.")
  128. elseif (HasCompletedQuest(Spawn, MEETING_WITH_CAYAN) and not HasCompletedQuest(Spawn, INFORMATION_MERCHANTS)) or (HasQuest(Spawn, MEETING_WITH_CAYAN) and GetQuestStep(Spawn, MEETING_WITH_CAYAN) == 3) then
  129. AddConversationOption(conversation, "Yes I have.", "CollectedBerries")
  130. end
  131. AddConversationOption(conversation, "How do I get out of here?", "dlg_38_1")
  132. StartConversation(conversation, NPC, Spawn, "Have you collected the berries yet?")
  133. end
  134. function dlg_38_1(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. conversation = CreateConversation()
  137. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable011a.mp3", "", "", 399132427, 3525586740, Spawn)
  138. AddConversationOption(conversation, "Thanks.")
  139. StartConversation(conversation, NPC, Spawn, "You can use the bush behind me to pull yourself out of here.")
  140. end
  141. function CollectedBerries(NPC, Spawn)
  142. SetStepComplete(Spawn, MEETING_WITH_CAYAN, 3)
  143. FaceTarget(NPC, Spawn)
  144. conversation = CreateConversation()
  145. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable012.mp3", "", "", 1654045376, 2588392355, Spawn)
  146. AddConversationOption(conversation, "Pick it up?", "dlg_41_2")
  147. StartConversation(conversation, NPC, Spawn, "Good. Your information has been acquired. You may pick it up at your earliest convenience. It may be time sensitive, so I would suggest sooner rather than later. Take this for services rendered. Your information was easier to acquire than I had guessed.")
  148. end
  149. -----------------------------------------------------------------------------------------------------------
  150. -- QUEST 2
  151. -----------------------------------------------------------------------------------------------------------
  152. function dlg_41_2(NPC, Spawn)
  153. FaceTarget(NPC, Spawn)
  154. conversation = CreateConversation()
  155. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable013.mp3", "", "", 1738977381, 1610837494, Spawn)
  156. AddConversationOption(conversation, "All right...", "OfferQuest2")
  157. StartConversation(conversation, NPC, Spawn, "You can obtain it from Zinun Loospakina, just north east of the entrance to the Peat Bog. He should have a small, bronze statuette for sale. Nobody in their right mind would purchase such an item. You, however, will find it quite irresistible and charming.")
  158. end
  159. function OfferQuest2(NPC, Spawn)
  160. FaceTarget(NPC, Spawn)
  161. OfferQuest(NPC, Spawn, INFORMATION_MERCHANTS)
  162. end
  163. ------------------------------------------------------------------------------------------------------------
  164. -- QUEST 4
  165. ------------------------------------------------------------------------------------------------------------
  166. function AhWelcomeBack(NPC, Spawn)
  167. FaceTarget(NPC, Spawn)
  168. conversation = CreateConversation()
  169. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable014.mp3", "", "", 1560703880, 2874329405, Spawn)
  170. if GetQuestStep(Spawn, CONFRONTATION) == 1 then
  171. AddConversationOption(conversation, "I need the stand that you were spoken to about earlier.", "dlg_52_1")
  172. else
  173. if not HasItem(Spawn, FOLDING_STAND) then
  174. AddConversationOption(conversation, "I need the stand that you were spoken to about earlier.", "dlg_52_1")
  175. else
  176. AddConversationOption(conversation, "Nothing for now.")
  177. end
  178. end
  179. StartConversation(conversation, NPC, Spawn, "Ah, welcome back. What can I do for you this time?")
  180. end
  181. function dlg_52_1(NPC, Spawn)
  182. if GetQuestStep(Spawn, CONFRONTATION) == 1 then
  183. SetStepComplete(Spawn, CONFRONTATION, 1)
  184. end
  185. SummonItem(Spawn, FOLDING_STAND)
  186. FaceTarget(NPC, Spawn)
  187. conversation = CreateConversation()
  188. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cayan_sable/qey_village02/quests/cayan_sable/cayan_sable015.mp3", "", "", 1707606183, 700025760, Spawn)
  189. AddConversationOption(conversation, "Nothing else.", "NothingElse")
  190. StartConversation(conversation, NPC, Spawn, "Of course. It's yours. Is there anything else?")
  191. end
  192. function NothingElse(NPC, Spawn)
  193. FaceTarget(NPC, Spawn)
  194. conversation = CreateConversation()
  195. AddConversationOption(conversation, "Thank you.")
  196. StartConversation(conversation, NPC, Spawn, "Then may the day treat you well.")
  197. end