9
3

TundisNoxyle.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/TundisNoxyle.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.03 09:06:10
  5. Script Purpose : required NPC for fallen gate "Key to Fallen Gate" access quest, Provides quests "Delving Into Fallen Gate" and "Journal Translation For Tundis N'oxyle".
  6. :
  7. --]]
  8. local KeyToFallenGate = 5252
  9. local DelvingIntoFallenGate = 5326
  10. local JournalTranslationForTundisNoxyle = 5327
  11. local PrayerJournalRetrieval = 5328
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange")
  14. end
  15. function InRange(NPC, Spawn)
  16. if HasCompletedQuest(Spawn, KeyToFallenGate) then
  17. ProvidesQuest(NPC, DelvingIntoFallenGate)
  18. SetInfoFlag(NPC)
  19. SetVisualFlag(NPC)
  20. elseif HasCompletedQuest(Spawn, DelvingIntoFallenGate) then
  21. ProvidesQuest(NPC, JournalTranslationForTundisNoxyle)
  22. SetInfoFlag(NPC)
  23. SetVisualFlag(NPC)
  24. end
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. local conversation = CreateConversation()
  29. if GetQuestStep(Spawn, KeyToFallenGate) == 1 then
  30. AddConversationOption(conversation, "I can assist you with your work here. I come to join the Thexian loyalists in uncovering Neriak.", "Option1")
  31. elseif GetQuestStep(Spawn, KeyToFallenGate) == 3 then
  32. AddConversationOption(conversation, "I've returned with the stones to prove my worth.", "Option3")
  33. elseif HasCompletedQuest(Spawn, KeyToFallenGate) and not HasQuest(Spawn, DelvingIntoFallenGate) and not HasCompletedQuest(Spawn, DelvingIntoFallenGate) then
  34. AddConversationOption(conversation, "Important discovery? Perhaps you have something you need assistance with?", "Option4")
  35. elseif GetQuestStep(Spawn, DelvingIntoFallenGate) == 2 then
  36. AddConversationOption(conversation, "I hardly think that returning to you with the information you seek qualifies as an interruption.", "Option7")
  37. elseif HasCompletedQuest(Spawn, DelvingIntoFallenGate) and not HasQuest(Spawn, JournalTranslationForTundisNoxyle) and not HasCompletedQuest(Spawn, JournalTranslationForTundisNoxyle) then
  38. AddConversationOption(conversation, "Have you been able to translate the journal yet?", "Option9")
  39. elseif GetQuestStep(Spawn, PrayerJournalRetrieval) == 3 then
  40. AddConversationOption(conversation, "I've returned with the journal and the translation.", "Option11")
  41. end
  42. AddConversationOption(conversation, "I'm not interested in speaking with you either.")
  43. StartConversation(conversation, NPC, Spawn, "Do not interrupt what is undoubtedly the most important discovery in the past three hundred years. Be gone, I have much work to attend to here.")
  44. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/qst_tundisnoxyle.mp3", "", "", 1179760403, 1179389139, Spawn)
  45. end
  46. function Option1(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. local conversation = CreateConversation()
  49. AddConversationOption(conversation, "I've not come this far only to slink away.", "Option2")
  50. StartConversation(conversation, NPC, Spawn, "Is that so? First you must prove yourself. Strength of mind and body is required in the deep halls. The weak are worthless to us.")
  51. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/qst_tundisnoxyle001.mp3", "", "", 2912576524, 2398521485, Spawn)
  52. end
  53. function Option2(NPC, Spawn)
  54. SetStepComplete(Spawn, KeyToFallenGate, 1)
  55. FaceTarget(NPC, Spawn)
  56. local conversation = CreateConversation()
  57. AddConversationOption(conversation, "You shall not wait long.")
  58. StartConversation(conversation, NPC, Spawn, "As you wish. There are giants in this valley made from the living rock. Bring me five stones from the bodies of these creatures, and I will know that you are strong enough to be one of us.")
  59. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/qst_tundisnoxyle002.mp3", "", "", 2361598359, 1658238525, Spawn)
  60. end
  61. function Option3(NPC, Spawn)
  62. SetStepComplete(Spawn, KeyToFallenGate, 3)
  63. FaceTarget(NPC, Spawn)
  64. local conversation = CreateConversation()
  65. AddConversationOption(conversation, "I will attend... with honor...")
  66. StartConversation(conversation, NPC, Spawn, "So you have. In order to become a member of the Thexian loyalists, you will need to be ordained and formally welcomed to our ranks. You will join our group at the meeting in Freeport and receive a key to the Gate. Now, leave me to continue my research.")
  67. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/qst_tundisnoxyle003.mp3", "", "", 2372701210, 2129157187, Spawn)
  68. end
  69. function Option4(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. local conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/quests/tundisnoxyle/qst_tundisnoxyle_x1_initial.mp3", "", "", 1939919409, 3297458446, Spawn)
  73. AddConversationOption(conversation, "Is that where this gate leads?", "Option5")
  74. StartConversation(conversation, NPC, Spawn, "I've spent the better part of my life filled with the desire to return to our ancestral homeland. Freeport is a pit of common filth and fills me with loathing that you cannot begin to comprehend. Now, on the eve of our return to the great lost city of Neriak, I shall not be deterred.")
  75. end
  76. function Option5(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. local conversation = CreateConversation()
  79. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/quests/tundisnoxyle/qst_tundisnoxyle_x1_initial2.mp3", "", "", 3603061843, 527661087, Spawn)
  80. AddConversationOption(conversation, "There can be no glory for a dark elf afraid to explore his native land.", "Option6")
  81. AddConversationOption(conversation, "I'd be willing to explore it.", "Option6")
  82. StartConversation(conversation, NPC, Spawn, "Yes, but we've still much to learn before sending down more victims... I mean, scouting parties. While we are certain that we have tunneled into the far side of what used to be the old Foreign Quarter of Neriak, we still remain unaware of what lies in store for us.")
  83. end
  84. function Option6(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. local conversation = CreateConversation()
  87. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/quests/tundisnoxyle/qst_tundisnoxyle_x1_initial3.mp3", "", "", 3620122356, 2273516469, Spawn)
  88. AddConversationOption(conversation, "That pit doesn't scare me. Reward is what I'm after.", "offer")
  89. AddConversationOption(conversation, "First you tell me to leave, and insult me, and now you want me to help? No thanks.")
  90. StartConversation(conversation, NPC, Spawn, "So simple a task as you think, it is not. There is much reward for those that would be willing to assist us, the loyal followers of the Thexian empire. You seem to bear no fear of the tomb we have uncovered - what say you to venturing into them and bringing back lore that you may find?")
  91. end
  92. function Option7(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. local conversation = CreateConversation()
  95. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/qst_tundisnoxyle000.mp3", "", "", 861767312, 2503494533, Spawn)
  96. AddConversationOption(conversation, "I've found a journal, though it's mostly illegible.", "Option8")
  97. StartConversation(conversation, NPC, Spawn, "I care not for what you imagine is an interruption... Let me look at what you've brought me.")
  98. end
  99. function Option8(NPC, Spawn)
  100. SetStepComplete(Spawn, DelvingIntoFallenGate, 2)
  101. FaceTarget(NPC, Spawn)
  102. local conversation = CreateConversation()
  103. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/quests/tundisnoxyle/qst_tundisnoxyle_x1_finish.mp3", "", "", 72160668, 15364034, Spawn)
  104. AddConversationOption(conversation, "I'll take these secrets to my grave.")
  105. StartConversation(conversation, NPC, Spawn, "Of course you cannot decipher these ancient writings. Take your reward and begone. May Innoruuk strike you down if you dare mention what you have seen to others.")
  106. end
  107. function Option9(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. local conversation = CreateConversation()
  110. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/quests/tundisnoxyle/qst_tundisnoxyle_x2_initial.mp3", "", "", 1146649908, 836292020, Spawn)
  111. AddConversationOption(conversation, "Common? I didn't see you exploring the ruins of Neriak.", "Option10")
  112. AddConversationOption(conversation, "I wish nothing more to do with you if that's how you feel.")
  113. StartConversation(conversation, NPC, Spawn, "No, it has proven more difficult to translate than I had anticipated. The dialect we use today derives its lesser and base inflections from our association with the common residents of Freeport.")
  114. end
  115. function Option10(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. local conversation = CreateConversation()
  118. PlayFlavor(NPC, "voiceover/english/tundis_n_oxyle/commonlands/quests/tundisnoxyle/qst_tundisnoxyle_x2_initial2.mp3", "", "", 4210594399, 3460800053, Spawn)
  119. AddConversationOption(conversation, "Nektulos is a big place, and my pockets are feeling a little light...", "offer2")
  120. AddConversationOption(conversation, "No way. I'm not doing any more of your dirty-work.")
  121. StartConversation(conversation, NPC, Spawn, "Nonetheless, I am in need of assistance. I would charge you with the task of delivering this journal to an associate of mine, Jhos T'sein. Last I heard, he had discovered ancient writings in the Nektulos forest.")
  122. end
  123. function Option11(NPC, Spawn)
  124. SetStepComplete(Spawn, PrayerJournalRetrieval, 3)
  125. FaceTarget(NPC, Spawn)
  126. local conversation = CreateConversation()
  127. -- seems like this dialogue option doesn't have any playflavors, checked twice.
  128. AddConversationOption(conversation, "You would have to pry it from my dead fingers if you did change your mind.")
  129. StartConversation(conversation, NPC, Spawn, "It pains me to say this, but thank you. Without your assistance in these matters, we would not be this much closer to unraveling the mystery surrounding the disappearance of Neriak. Take this as payment for services rendered, but go quickly before I change my mind.")
  130. end
  131. function offer(NPC, Spawn)
  132. OfferQuest(NPC, Spawn, DelvingIntoFallenGate)
  133. end
  134. function offer2(NPC, Spawn)
  135. OfferQuest(NPC, Spawn, JournalTranslationForTundisNoxyle)
  136. end
  137. function respawn(NPC)
  138. spawn(NPC)
  139. end