TykorGiLok.lua 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. --[[
  2. Script Name : SpawnScripts/TimorousDeep/TykorGiLok.lua
  3. Script Purpose : Tykor Gi'Lok <Chrykori Village Secondary>
  4. Script Author : John Adams
  5. Script Date : 2009.02.06
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. QUEST_1 = 5795 -- Poaching the Poachers QUEST ID
  9. QUEST_2 = 5796 -- Curious Ore QUEST ID
  10. QUEST_3 = 5797 -- Report to the Primary QUEST ID
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange")
  13. end
  14. function InRange(NPC , Spawn)
  15. if CanReceiveQuest(Spawn, QUEST_1) then
  16. ProvidesQuest(NPC, QUEST_1)
  17. SetInfoFlag(NPC)
  18. SetVisualFlag(NPC)
  19. elseif HasCompletedQuest(Spawn, QUEST_1) then
  20. ProvidesQuest(NPC, QUEST_2)
  21. SetInfoFlag(NPC)
  22. SetVisualFlag(NPC)
  23. elseif HasCompletedQuest(Spawn, QUEST_2) then
  24. ProvidesQuest(NPC, QUEST_3)
  25. SetInfoFlag(NPC)
  26. SetVisualFlag(NPC)
  27. end
  28. end
  29. function respawn(NPC)
  30. spawn(NPC)
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. if HasCompletedQuest(Spawn, QUEST_1) then
  36. if HasCompletedQuest(Spawn, QUEST_2) then
  37. if HasCompletedQuest(Spawn, QUSET_3) then
  38. Say(NPC, "Please do not waste time.", Spawn)
  39. elseif HasQuest(Spawn, QUEST_3) then
  40. Say(NPC, "Please do not waste time.", Spawn)
  41. else
  42. DoYouHaveTheOre(NPC, Spawn, conversation)
  43. end
  44. elseif HasQuest(Spawn, QUEST_2) then
  45. DoYouHaveTheOre(NPC, Spawn, conversation)
  46. else
  47. HaveYouSlitGizzards(NPC, Spawn, conversation)
  48. end
  49. elseif HasQuest(Spawn, QUEST_1) then
  50. HaveYouSlitGizzards(NPC, Spawn, conversation)
  51. else
  52. FinallyNewRecruit(NPC, Spawn, conversation)
  53. end
  54. end
  55. --------------------------------------------------------------------------------------------------
  56. -- QUEST 1
  57. --------------------------------------------------------------------------------------------------
  58. function FinallyNewRecruit(NPC, Spawn, conversation)
  59. PlayFlavor(NPC, "voiceover/english/rok_questvo/tykor_gi_lok/_exp04/exp04_rgn_timorous_deep/chrykori_tie/gilok/gilok000.mp3", "", "", 2409590075, 1967179251, Spawn)
  60. AddConversationOption(conversation, "How can this recruit be of use?", "dlg_0_1")
  61. StartConversation(conversation, NPC, Spawn, "Finally, a new recruit! I was beginning to think I'd turn to salt before they sent anyone to this beach. And if I did turn to salt, I suspect the Haoaeran spirocs would have a fine time pecking me to bits. They don't take to our presence on Chrykori Island, you see. And though they have yet to squawk war from those colorful beaks of theirs, they've done everything they can to be a nuisance and prompt us to leave.")
  62. end
  63. function dlg_0_1(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. PlayFlavor(NPC, "voiceover/english/rok_questvo/tykor_gi_lok/_exp04/exp04_rgn_timorous_deep/chrykori_tie/gilok/gilok000a.mp3", "", "", 2545146439, 3743717142, Spawn)
  67. AddConversationOption(conversation, "I will kill the poachers.", "OfferQuest1")
  68. StartConversation(conversation, NPC, Spawn, "Eager! That's good! Perhaps they've sent me more than the usual giblets this time. To think I thought my appointment here was a subtle suggestion that I'm no longer of use to the army of Gorowyn! We'll show them I'm not so inept as they may think... You see, the spirocs have sent poachers to hunt the sand snappers to near extinction, taking from us one of our prime food sources. But you'll show them, won't you?")
  69. end
  70. function OfferQuest1(NPC, Spawn)
  71. OfferQuest(NPC, Spawn, QUEST_1)
  72. end
  73. function HaveYouSlitGizzards(NPC, Spawn, conversation)
  74. PlayFlavor(NPC, "voiceover/english/rok_questvo/tykor_gi_lok/_exp04/exp04_rgn_timorous_deep/chrykori_tie/gilok/gilok002.mp3", "", "", 2250402818, 734088714, Spawn)
  75. if (HasCompletedQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_2)) or (HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2) then
  76. AddConversationOption(conversation, "I've taken some of them out.", "dlg_1_1")
  77. else
  78. AddConversationOption(conversation, "Not yet. More need to fall to see this work done.")
  79. end
  80. StartConversation(conversation, NPC, Spawn, "Have you slit their gizzards?")
  81. end
  82. function dlg_1_1(NPC, Spawn)
  83. if HasQuest(Spawn, QUEST_1) then
  84. SetStepComplete(Spawn, QUEST_1, 2)
  85. end
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. PlayFlavor(NPC, "voiceover/english/rok_questvo/tykor_gi_lok/_exp04/exp04_rgn_timorous_deep/chrykori_tie/gilok/gilok003.mp3", "", "", 1572650022, 3969849806, Spawn)
  89. AddConversationOption(conversation, "What do you think is so special about this beach?", "dlg_1_2")
  90. StartConversation(conversation, NPC, Spawn, "A good start! But if you believe my theories, there is more going on down here than my superiors think. They sent me here to baby sit some harmless poachers... but the Haoaerans are up to something on these beaches. The poachers are a diversion, I say. Any fool can see war is coming, " .. GetName(Spawn) .. ". though some may not want to, because the Haoaerans have the advantage here.")
  91. end
  92. --------------------------------------------------------------------------------------------------
  93. -- QUEST 2
  94. --------------------------------------------------------------------------------------------------
  95. function dlg_1_2(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. conversation = CreateConversation()
  98. PlayFlavor(NPC, "voiceover/english/rok_questvo/tykor_gi_lok/_exp04/exp04_rgn_timorous_deep/chrykori_tie/gilok/gilok003a.mp3", "", "", 1948098851, 1635799575, Spawn)
  99. AddConversationOption(conversation, "I'll bring us back samples straight away.", "OfferQuest2")
  100. StartConversation(conversation, NPC, Spawn, "Oh now I haven't gotten so far as figuring out any of that! But maybe you can help me. I've seen them mining ore along the valley walls, and I suspect they mean to make weapons of it. But oh it could also be something so much more nefarious! And wouldn't discovering such a plot earn the both of us promotions. Why don't you bring back some samples of the ore and let us see for ourselves.")
  101. end
  102. function OfferQuest2(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. OfferQuest(NPC, Spawn, QUEST_2)
  105. end
  106. function DoYouHaveTheOre(NPC, Spawn, conversation)
  107. PlayFlavor(NPC, "voiceover/english/rok_questvo/tykor_gi_lok/_exp04/exp04_rgn_timorous_deep/chrykori_tie/gilok/gilok005.mp3", "", "", 3931269326, 274875962, Spawn)
  108. if (HasCompletedQuest(Spawn, QUEST_2) and not HasCompletedQuest(Spawn, QUEST_3)) or (HasQuest(Spawn, QUEST_2) and GetQuestStep(Spawn, QUEST_2) == 2) then
  109. AddConversationOption(conversation, "Yes, I do and no, they died too quickly for any of that.", "dlg_4_1")
  110. else
  111. AddConversationOption(conversation, "No, they will though.")
  112. end
  113. StartConversation(conversation, NPC, Spawn, "Do you have the ore? Did they molt at seeing you interrupt their plans?")
  114. end
  115. function dlg_4_1(NPC, Spawn)
  116. if HasQuest(Spawn, QUEST_2) then
  117. SetStepComplete(Spawn, QUEST_2, 2)
  118. end
  119. FaceTarget(NPC, Spawn)
  120. conversation = CreateConversation()
  121. PlayFlavor(NPC, "voiceover/english/rok_questvo/tykor_gi_lok/_exp04/exp04_rgn_timorous_deep/chrykori_tie/gilok/gilok006.mp3", "", "", 2948220406, 1046702347, Spawn)
  122. AddConversationOption(conversation, "Very well. ", "OfferQuest3")
  123. StartConversation(conversation, NPC, Spawn, "That's the way to do it! Well now, let's have a look... This is strange. Grrr ... this is mostly rock! There's barely any ore at all... Mighty suspicious, if you ask me. I think it is time to earn our promotions. I'd like you to travel to Chrykori Village, just north of here, and speak with Primary Conzuk Zum'Ha. Show him what we've found, and be sure to mention me.")
  124. end
  125. --------------------------------------------------------------------------------------------------
  126. -- QUEST 3
  127. --------------------------------------------------------------------------------------------------
  128. function OfferQuest3(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. Say(NPC, "I haven't finished this quest yet.", Spawn)
  131. OfferQuest(NPC, Spawn, QUEST_3)
  132. end