PrimaryConzukZumHa.lua 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. --[[
  2. Script Name : SpawnScripts/TimorousDeep/PrimaryConzukZumHa.lua
  3. Script Purpose : Primary Conzuk Zum'Ha <Chrykori Island Primary>
  4. Script Author : John Adams
  5. Script Date : 2009.02.06
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local QUEST_3 = 5796
  9. local QUEST_4 = 5798
  10. local QUEST_5 = 113
  11. local QUEST_6 = 114
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange")
  14. end
  15. function InRange(NPC , Spawn)
  16. if CanReceiveQuest(Spawn, QUEST_4) then
  17. ProvidesQuest(NPC, QUEST_4)
  18. SetInfoFlag(NPC)
  19. SetVisualFlag(NPC)
  20. elseif HasCompletedQuest(Spawn, QUEST_4) then
  21. ProvidesQuest(NPC, QUEST_5)
  22. SetInfoFlag(NPC)
  23. SetVisualFlag(NPC)
  24. elseif HasCompletedQuest(Spawn, QUEST_5) then
  25. ProvidesQuest(NPC, QUEST_6)
  26. SetInfoFlag(NPC)
  27. SetVisualFlag(NPC)
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. conversation = CreateConversation()
  36. if HasCompletedQuest(Spawn, QUEST_3) then
  37. if HasCompletedQuest(Spawn, QUEST_4) then
  38. if HasCompletedQuest(Spawn, QUEST_5) then
  39. if HasCompletedQuest(Spawn, QUEST_6) then
  40. Say(NPC, "I am glad to have you working here.", Spawn)
  41. elseif HasQuest(Spawn, QUEST_6) then
  42. Say(NPC, "I am glad to have you working here.", Spawn)
  43. else
  44. HaveYouSucceeded(NPC, Spawn, conversation)
  45. end
  46. elseif HasQuest(Spawn, QUEST_5) then
  47. HaveYouSucceeded(NPC, Spawn, conversation)
  48. else
  49. WellWhatAreTheyUpTo(NPC, Spawn, conversation)
  50. end
  51. elseif HasQuest(Spawn, QUEST_4) then
  52. WellWhatAreTheyUpTo(NPC, Spawn, conversation)
  53. else
  54. IWelcomeYou(NPC, Spawn, conversation)
  55. end
  56. else
  57. IWelcomeYou(NPC, Spawn, conversation)
  58. end
  59. end
  60. ------------------------------------------------------------------------------------
  61. -- QUEST 3
  62. ------------------------------------------------------------------------------------
  63. function IWelcomeYou(NPC, Spawn, conversation)
  64. PlayFlavor(NPC, "voiceover/english/rok_questvo/primary_conzuk_zum_ha/_exp04/exp04_rgn_timorous_deep/chrykori_tie/zumha/zumha000.mp3", "", "", 147931511, 1161032950, Spawn)
  65. if (HasCompletedQuest(Spawn, QUEST_3) and not HasCompletedQuest(Spawn, QUEST_4)) or (HasQuest(Spawn, QUEST_3) and GetQuestStep(Spawn, QUEST_3) == 1) then
  66. AddConversationOption(conversation, "Tykor Gi'Lok thought you should see this; the Haoaerans were digging this ore up along the beach wall.", "dlg_10_1")
  67. if HasCompletedQuest(Spawn, QUEST_3) then
  68. AddConversationOption(conversation, "Nothing, thank you.")
  69. end
  70. else
  71. AddConversationOption(conversation, "Nothing, thank you.")
  72. end
  73. StartConversation(conversation, NPC, Spawn, "I welcome you to Chrykori Village, " .. GetName(Spawn) .. ". I am Conzuk Zum'Ha, the Primary of Chrykori Island. What can I do for you?")
  74. end
  75. function dlg_10_1(NPC, Spawn)
  76. if HasQuest(Spawn, QUEST_3) then
  77. SetStepComplete(Spawn, QUEST_3, 1)
  78. end
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "voiceover/english/rok_questvo/primary_conzuk_zum_ha/_exp04/exp04_rgn_timorous_deep/chrykori_tie/zumha/zumha001.mp3", "", "", 3446548455, 1963577533, Spawn)
  82. AddConversationOption(conversation, "It's worthless. They can't mean to make anything from it.", "dlg_10_2")
  83. StartConversation(conversation, NPC, Spawn, "So Tykor Gi'Lok managed to do something worthwhile? Hmmm ... That'll come as a surprise to quite a few parties. I myself have thought he was given an unfair lot... Not everyone can master griffon riding, and it's not his fault he fell straight onto the head of Archlord Gor'sok. Hmmm ... Now, about this ore... ")
  84. end
  85. ------------------------------------------------------------------------------------
  86. -- QUEST 4
  87. ------------------------------------------------------------------------------------
  88. function dlg_10_2(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. PlayFlavor(NPC, "voiceover/english/rok_questvo/primary_conzuk_zum_ha/_exp04/exp04_rgn_timorous_deep/chrykori_tie/zumha/zumha001a.mp3", "", "", 3902061993, 4258824425, Spawn)
  92. AddConversationOption(conversation, "I am up to it.", "OfferQuest4")
  93. StartConversation(conversation, NPC, Spawn, "Hmmm... hmhmhm ... you're right. The Haoaerans should know this ore is worthless. Perhaps... hmhmhm ... yes, perhaps this is related to their excavation of the cave in the northwest. I've been meaning to send someone out there to take care of it. Are you up to it? I want their excavators dead, and I want evidence of what they're digging up. We must solve this puzzle.")
  94. end
  95. function OfferQuest4(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. OfferQuest(NPC, Spawn, QUEST_4)
  98. end
  99. function WellWhatAreTheyUpTo(NPC, Spawn, conversation)
  100. PlayFlavor(NPC, "voiceover/english/rok_questvo/primary_conzuk_zum_ha/_exp04/exp04_rgn_timorous_deep/chrykori_tie/zumha/zumha003.mp3", "", "", 4127661595, 3391252035, Spawn)
  101. if (HasCompletedQuest(Spawn, QUEST_4) and not HasCompletedQuest(Spawn, QUEST_5)) or (HasQuest(Spawn, QUEST_4) and GetQuestStep(Spawn, QUEST_4) == 3) then
  102. AddConversationOption(conversation, "Yes, I found this pottery. It's curiously decorated.", "dlg_28_1")
  103. else
  104. AddConversationOption(conversation, "Not yet. I will continue looking.")
  105. end
  106. StartConversation(conversation, NPC, Spawn, "Well? What are they up to? Have you found anything worthwhile?")
  107. end
  108. function dlg_28_1(NPC, Spawn)
  109. if HasQuest(Spawn, QUEST_4) then
  110. SetStepComplete(Spawn, QUEST_4, 3)
  111. end
  112. FaceTarget(NPC, Spawn)
  113. conversation = CreateConversation()
  114. PlayFlavor(NPC, "voiceover/english/rok_questvo/primary_conzuk_zum_ha/_exp04/exp04_rgn_timorous_deep/chrykori_tie/zumha/zumha004.mp3", "", "", 1131517784, 3963290452, Spawn)
  115. AddConversationOption(conversation, "I can do that.", "OfferQuest5")
  116. StartConversation(conversation, NPC, Spawn, "Why, our Parsers have found pieces of this pottery before. They believe it is the remains of ceremonial jars, and that directions for the rite are inscribed in the inscriptions on its surface. If they have pieced this together... of course! This must be what they're up to! My scouts reported them gathering and preparing something southwest of here. Hmmmm ... With this evidence in hand, I believe they may be trying to invoke an ancient rite. I'll leave it to you, .. GetName(Spawn) .. . to interrupt them.")
  117. end
  118. ------------------------------------------------------------------------------------
  119. -- QUEST 5
  120. ------------------------------------------------------------------------------------
  121. function OfferQuest5(NPC, Spawn)
  122. FaceTarget(NPC, Spawn)
  123. OfferQuest(NPC, Spawn, QUEST_5)
  124. end
  125. function HaveYouSucceeded(NPC, Spawn, conversation)
  126. PlayFlavor(NPC, "voiceover/english/rok_questvo/primary_conzuk_zum_ha/_exp04/exp04_rgn_timorous_deep/chrykori_tie/zumha/zumha006.mp3", "", "", 1471399693, 1482281040, Spawn)
  127. if (HasCompletedQuest(Spawn, QUEST_5) and not HasCompletedQuest(Spawn, QUEST_6)) or (HasQuest(Spawn, QUEST_5) and GetQuestStep(Spawn, QUEST_5) == 2) then
  128. AddConversationOption(conversation, "Yes. The ritualists were infusing a giant Haoaeran with power.", "dlg_39_1")
  129. else
  130. AddConversationOption(conversation, "Not yet. They're eluding me.")
  131. end
  132. StartConversation(conversation, NPC, Spawn, "Well? Have you succeeded in putting an end to their ritual?")
  133. end
  134. function dlg_39_1(NPC, Spawn)
  135. if HasQuest(Spawn, QUEST_5) then
  136. SetStepComplete(Spawn, QUEST_5, 2)
  137. end
  138. FaceTarget(NPC, Spawn)
  139. conversation = CreateConversation()
  140. PlayFlavor(NPC, "voiceover/english/rok_questvo/primary_conzuk_zum_ha/_exp04/exp04_rgn_timorous_deep/chrykori_tie/zumha/zumha007.mp3", "", "", 1084426819, 682279159, Spawn)
  141. AddConversationOption(conversation, "I will seek him out.", "OfferQuest6")
  142. StartConversation(conversation, NPC, Spawn, "Well, I am glad we put a stop to their efforts. Though they may be nothing more than clumsy mimics playing with forces they don't understand, the thought of them tapping into such power does not sit well... .. GetName(Spawn) .. . I am impressed with your abilities. I would like you to continue aiding us. Report to Secondary Arozik Sky'Ki on Trythec Loft to the southwest; it's the grassy ledge above the sand.")
  143. end
  144. ------------------------------------------------------------------------------------
  145. -- QUEST 6
  146. ------------------------------------------------------------------------------------
  147. function OfferQuest6(NPC, Spawn)
  148. FaceTarget(NPC, Spawn)
  149. OfferQuest(NPC, Spawn, QUEST_6)
  150. end