9
3

the_stolen_artifacts_of_thex.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. --[[
  2. Script Name : the_stolen_artifacts_of_thex.lua
  3. Script Purpose : Handles the quest, "The Stolen Artifacts of Thex"
  4. Script Author : torsten
  5. Script Date : 20.07.2022
  6. Script Notes :
  7. Zone : Longshadow Alley
  8. Quest Giver : Kylanith D`Lar
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. local TheStolenArtifactsofThex = 5683
  14. function Init(Quest)
  15. UpdateQuestZone(Quest,"Big Bend")
  16. AddQuestStep(Quest, 1, "Inspect the Thex monument", 1, 100, "I must go to Big Bend and find all five of the Thex artifacts relocated there.", 11)
  17. AddQuestStep(Quest, 2, "Inspect the Thex monument", 1, 100, "I must go to Big Bend and find all five of the Thex artifacts relocated there.", 11)
  18. AddQuestStep(Quest, 3, "Inspect the Thex monument", 1, 100, "I must go to Big Bend and find all five of the Thex artifacts relocated there.", 11)
  19. AddQuestStep(Quest, 4, "Inspect the Thex monument", 1, 100, "I must go to Big Bend and find all five of the Thex artifacts relocated there.", 11)
  20. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  21. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  22. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  23. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "Inspected the Thex monument.")
  27. CheckProgress(Quest, QuestGiver, Player)
  28. end
  29. function Step2Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "Inspected the Thex monument.")
  31. CheckProgress(Quest, QuestGiver, Player)
  32. end
  33. function Step3Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 3, "Inspected the Thex monument.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function Step4Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 4, "Inspected the Thex monument.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function CheckProgress(Quest, QuestGiver, Player)
  42. if QuestStepIsComplete(Player, TheStolenArtifactsofThex, 1) and QuestStepIsComplete(Player, TheStolenArtifactsofThex, 2) and QuestStepIsComplete(Player, TheStolenArtifactsofThex, 3) and QuestStepIsComplete(Player, TheStolenArtifactsofThex, 4) then
  43. UpdateQuestTaskGroupDescription(Quest, 1, "I went to Big Bend and could only find four Thexian artifacts.")
  44. UpdateQuestZone(Quest,"Longshadow Alley")
  45. AddQuestStepChat(Quest, 5, "Speak to Kylanith D'Lar", 1, "I must report back to Kylanith D'Lar in Longshadow Alley.", 11, 1380032)
  46. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  47. end
  48. end
  49. function Step5Complete(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 5, "Spoke to Kylanith D'Lar.")
  51. UpdateQuestTaskGroupDescription(Quest, 2, "I reported back to Kylanith D'Lar in Longshadow Alley.")
  52. AddQuestStep(Quest, 6, "Inspect the Thex monument", 1, 100, "I must go to the Freeport Graveyard to find the fifth Thex artifact. I can reach the Graveyard by using any of the bells in and around the City of Freeport.", 11)
  53. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  54. end
  55. function Step6Complete(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 6, "I discovered the Thex monument gravestone.")
  57. UpdateQuestTaskGroupDescription(Quest, 3, "I went to the Freeport graveyard to find the fifth Thex artifact.")
  58. UpdateQuestZone(Quest,"Longshadow Alley")
  59. AddQuestStepChat(Quest, 7, "I must inform Kylanith of the illegible monument.", 1, "I must report my findings to Kylanith D'Lar in Longshadow Alley.", 11, 1380032)
  60. AddQuestStepCompleteAction(Quest, 7, "QuestComplete")
  61. end
  62. function QuestComplete(Quest, QuestGiver, Player)
  63. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  64. UpdateQuestStepDescription(Quest, 7, "Spoke to Kylanith D'Lar.")
  65. UpdateQuestTaskGroupDescription(Quest, 4, "I reported back to Kylanith D'Lar in Longshadow Alley.")
  66. UpdateQuestDescription(Quest, "I discovered all five relocated Thex artifacts in Freeport. Kylanith D'Lar in Longshadow Alley was pleased with my report.")
  67. GiveQuestReward(Quest, Player)
  68. end
  69. function Accepted(Quest, QuestGiver, Player)
  70. FaceTarget(QuestGiver, Player)
  71. Dialog.New(QuestGiver, Player)
  72. Dialog.AddDialog("It is rumored that the artifacts are somewhere within Big Bend's foul-stenching streets. Some artifacts have sustained great damage. Find them for me and report their existence. ")
  73. Dialog.AddVoiceover("voiceover/english/optional1/kylanith_d_lar/language/thexian/lan_5_kylanith_x1_initial01.mp3", 2884704375, 1873644890)
  74. Dialog.AddLanguage(2)
  75. Dialog.AddOption("I will find them and report back.")
  76. Dialog.Start()
  77. end
  78. function Declined(Quest, QuestGiver, Player)
  79. -- Add dialog here for when the quest is declined
  80. end
  81. function Deleted(Quest, QuestGiver, Player)
  82. -- Remove any quest specific items here when the quest is deleted
  83. end
  84. function Reload(Quest, QuestGiver, Player, Step)
  85. if Step == 1 then
  86. Step1Complete(Quest, QuestGiver, Player)
  87. elseif Step == 2 then
  88. Step2Complete(Quest, QuestGiver, Player)
  89. elseif Step == 3 then
  90. Step3Complete(Quest, QuestGiver, Player)
  91. elseif Step == 4 then
  92. Step4Complete(Quest, QuestGiver, Player)
  93. elseif Step == 5 then
  94. Step5Complete(Quest, QuestGiver, Player)
  95. elseif Step == 6 then
  96. Step6Complete(Quest, QuestGiver, Player)
  97. elseif Step == 7 then
  98. QuestComplete(Quest, QuestGiver, Player)
  99. end
  100. end