the_trials_of_sir_morgan.lua 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. --[[
  2. Script Name : Quests/Antonica/the_trials_of_sir_morgan.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.21 09:07:04
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "Relive the scarecrow battle.", 10, 100, "I should find ancient crop fields in Thundering Steppes and do battle with scarecrows just like in the book.", 611, 2490321, 2490323, 120156, 121300)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Step1Complete(Quest, QuestGiver, Player)
  16. UpdateQuestStepDescription(Quest, 1, "I killed the scarecrows like in the book.")
  17. UpdateQuestTaskGroupDescription(Quest, 1, "I did battle with animated scarecrows within the Thundering Steppes, just as Sir Morgan did.")
  18. AddQuestStep(Quest, 2, "I must read more in \"The Trials of Sir Morgan.\"", 1, 100, "I need to recreate the battle with the sirens at the submerged pyramid within Thundering Steppes.", 611)
  19. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  20. end
  21. function Step2Complete(Quest, QuestGiver, Player)
  22. UpdateQuestStepDescription(Quest, 2, " I have read more of Sir Morgan's trials.")
  23. UpdateQuestTaskGroupDescription(Quest, 2, "I have read more of Sir Morgan's trials within the book.")
  24. AddQuestStepKill(Quest, 3, "Relive the siren battle.", 6, 100, "I need to recreate the battle with the sirens at the submerged pyramid within Thundering Steppes.", 611, 2490245, 2490405, 2490300, 2490678, 2490117)
  25. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  26. end
  27. function Step3Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 3, "I killed the sirens like in the book.")
  29. UpdateQuestTaskGroupDescription(Quest, 3, "I recreated the battle with the sirens at the submerged pyramid in Thundering Steppes.")
  30. AddQuestStep(Quest, 4, "I must read more in \"The Trials of Sir Morgan.\"", 1, 100, "I need to recreate the battle with the sirens at the submerged pyramid within Thundering Steppes.", 611)
  31. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  32. end
  33. function Step4Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 4, "I have read more of Sir Morgan's trials.")
  35. UpdateQuestTaskGroupDescription(Quest, 4, "I have read more of Sir Morgan's trials within the book.")
  36. AddQuestStepKill(Quest, 5, "Battle the revenant scouts.", 4, 100, "I need to recreate the battle with the Bloodsaber knights that took place at a bridge spanning the now dry Plaincutter River in Thundering Steppes.", 611, 2490151)
  37. AddQuestStepKill(Quest, 6, "Battle the revenant soldiers.", 6, 100, "I need to recreate the battle with the Bloodsaber knights that took place at a bridge spanning the now dry Plaincutter River in Thundering Steppes.", 611, 2490249)
  38. AddQuestStepKill(Quest, 7, "Battle the revenant commander.", 1, 100, "I need to recreate the battle with the Bloodsaber knights that took place at a bridge spanning the now dry Plaincutter River in Thundering Steppes.", 611, 2490269)
  39. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  40. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  41. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  42. end
  43. function Step5Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 5, "I killed the revenant scouts.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function Step6Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 6, "I killed the revenant soldiers.")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function Step7Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 7, "I killed the revenant commander.")
  53. CheckProgress(Quest, QuestGiver, Player)
  54. end
  55. function CheckProgress(Quest, QuestGiver, Player)
  56. if QuestStepIsComplete(Player, 5330, 5) and QuestStepIsComplete(Player, 5330, 6) and QuestStepIsComplete(Player, 5330, 7) then
  57. AddQuestStep(Quest, 8, "I must read more in \"The Trials of Sir Morgan.\"", 1, 100, "I need to recreate the battle with the sirens at the submerged pyramid within Thundering Steppes.", 611)
  58. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  59. end
  60. end
  61. function Step8Complete(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 8, "I have read more of Sir Morgan's trials.")
  63. UpdateQuestTaskGroupDescription(Quest, 5, "I have read more of Sir Morgan's trials within the book.")
  64. AddQuestStepKill(Quest, 9, "Battle the fallen giants.", 4, 100, "I need to recreate the battle with the giants near a bridge spanning a dead end river in Thundering Steppes.", 611, 2490084)
  65. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  66. end
  67. function Step9Complete(Quest, QuestGiver, Player)
  68. UpdateQuestStepDescription(Quest, 9, "I killed the undead fallen giants.")
  69. UpdateQuestTaskGroupDescription(Quest, 6, "I recreated the battle with the giants in the Valley of the Ancients in Thundering Steppes.")
  70. AddQuestStep(Quest, 10, "I must read more in \"The Trials of Sir Morgan.\"", 1, 100, "I need to recreate the battle with the sirens at the submerged pyramid within Thundering Steppes.", 611)
  71. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  72. end
  73. function Step10Complete(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 10, "I have read more of Sir Morgan's trials.")
  75. UpdateQuestTaskGroupDescription(Quest, 7, "I have read more of Sir Morgan's trials within the book.")
  76. AddQuestStepKill(Quest, 11, "Battle the unbound familiars.", 2, 100, "I need to recreate the battle with the familiars amidst the ruins of the Keep of Immortality in Thundering Steppes.", 611, 2490335)
  77. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  78. end
  79. function Step11Complete(Quest, QuestGiver, Player)
  80. UpdateQuestStepDescription(Quest, 11, "I killed the unbound familiars.")
  81. UpdateQuestTaskGroupDescription(Quest, 8, "I recreated the battle with the unbound familiars in the ruins of the Keep of Immortality in Thundering Steppes.")
  82. AddQuestStep(Quest, 12, "I must read more in \"The Trials of Sir Morgan.\"", 1, 100, "I need to recreate the battle with the sirens at the submerged pyramid within Thundering Steppes.", 611)
  83. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  84. end
  85. function Step12Complete(Quest, QuestGiver, Player)
  86. UpdateQuestStepDescription(Quest, 12, "I have read more of Sir Morgan's trials.")
  87. UpdateQuestTaskGroupDescription(Quest, 9, "I have read more of Sir Morgan's trials within the book.")
  88. AddQuestStepZoneLoc(Quest, 13, "Examine the center of the circle of thorns.", 5, "I need to visit the area of Thundering Steppes that looks like a circle of titanic thorns or fangs. I should search the center of this circle.", 2142, 170.3, -7.29, 1080.61, 249)
  89. AddQuestStepCompleteAction(Quest, 13, "Step13Complete")
  90. end
  91. function Step13Complete(Quest, QuestGiver, Player)
  92. UpdateQuestStepDescription(Quest, 13, "I discovered the Amulet of Ullkorruuk and encountered Squire Wimbley's evil spirit.")
  93. UpdateQuestTaskGroupDescription(Quest, 10, "I discovered an Amulet of Ullkorruuk at the basin of the circle of thorns.")
  94. AddQuestStep(Quest, 14, "I must read more in \"The Trials of Sir Morgan.\"", 1, 100, "I need to recreate the battle with the sirens at the submerged pyramid within Thundering Steppes.", 611)
  95. AddQuestStepCompleteAction(Quest, 14, "Step14Complete")
  96. end
  97. function Step14Complete(Quest, QuestGiver, Player)
  98. UpdateQuestStepDescription(Quest, 14, "I have read more of Sir Morgan's trials.")
  99. UpdateQuestTaskGroupDescription(Quest, 11, "I have read more of Sir Morgan's trials within the book.")
  100. AddQuestStepChat(Quest, 15, "Speak to Rikantus in Evernight Cemetery.", 1, "I need to revisit Rikantus at Evernight Cemetery in Antonica. His promise of fortune did not transpire.", 11, 120403)
  101. AddQuestStepCompleteAction(Quest, 15, "QuestComplete")
  102. end
  103. function QuestComplete(Quest, QuestGiver, Player)
  104. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  105. UpdateQuestStepDescription(Quest, 15, "I spoke to Rikantus in Evernight Cemetery.")
  106. UpdateQuestTaskGroupDescription(Quest, 12, "I spoke to Rikantus and gave him the Amulet of Ulkkorruuk in exchange for another promise of fortune.")
  107. if HasItem(Player, 14355) then
  108. RemoveItem(Player, 14355)
  109. end
  110. UpdateQuestDescription(Quest, "Visiting the location of the story 'The Trials of Sir Morgan' has led me to do battle and eventually earned me a useless amulet. Rikantus said it was the 'Amulet of Ullkorruuk' and that it belonged to his ancestors.")
  111. GiveQuestReward(Quest, Player)
  112. end
  113. function Accepted(Quest, QuestGiver, Player)
  114. end
  115. function Declined(Quest, QuestGiver, Player)
  116. end
  117. function Reload(Quest, QuestGiver, Player, Step)
  118. end