9
3

ProphetAndLoss.lua 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. --[[
  2. Script Name : ProphetandLoss.lua
  3. Script Purpose : Handles the quest, "Prophet and Loss"
  4. Script Author : jakejp
  5. Script Date : 10/4/2018
  6. Script Notes :
  7. Zone : The Ruins
  8. Quest Giver : Lieutenant Argosian
  9. Preceded by : Pounding the Enemy
  10. Followed by : Requesting Further Orders
  11. --]]
  12. -- QUEST ID'S --
  13. local ProphetandLoss = 371
  14. -- LOCATION ID'S --
  15. -- MOB ID'S --
  16. local BrokentuskWarrior = 1270013
  17. local BrokentuskProphet = 1270009
  18. -- NPC ID'S --
  19. local LieutenantArgosian = 1270019
  20. function Init(Quest)
  21. AddQuestStepLocation(Quest, 1, "Find an old shrine guarded by Brokentusk orcs", 10, "I should search for an old shrine in the Ruins guarded by prophets past the Brokentusks north of the docks. Then I should eliminate the orcs guarding it. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 1215, -69, 0, 68)
  22. AddQuestStepKill(Quest, 2, "Defeat Brokentusk warriors", 4, 100, "I should search for an old shrine in the Ruins guarded by prophets past the Brokentusks north of the docks. Then I should eliminate the orcs guarding it. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, BrokentuskWarrior)
  23. AddQuestStepKill(Quest, 3, "Defeat Brokentusk prophets", 4, 100, "I should search for an old shrine in the Ruins guarded by prophets past the Brokentusks north of the docks. Then I should eliminate the orcs guarding it. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, BrokentuskProphet)
  24. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  25. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  26. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  27. end
  28. function CheckProgress(Quest, QuestGiver, Player)
  29. if QuestStepIsComplete(Player, ProphetandLoss, 1) and QuestStepIsComplete(Player, ProphetandLoss, 2) and QuestStepIsComplete(Player, ProphetandLoss, 3) then
  30. ReturnToArgosian(Quest, QuestGiver, Player)
  31. end
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I found the old shrine, which seems to be a relic of Shoreside.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have defeated four Brokentusk warriors guarding the old shrine.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have defeated four Brokentusk prophets, but they don't seem to gain any strength from this shrine.")
  43. UpdateQuestTaskGroupDescription(Quest, 1, "I found the shrine and defeated the orcs guarding it.")
  44. CheckProgress(Quest, QuestGiver, Player)
  45. end
  46. function ReturnToArgosian(Quest, QuestGiver, Player)
  47. AddQuestStepChat(Quest, 4, "Report to Lieutenant Argosian", 1, "I should report back to Lieutenant Argosian in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 11, LieutenantArgosian)
  48. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  49. end
  50. function QuestComplete(Quest, QuestGiver, Player)
  51. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  52. UpdateQuestStepDescription(Quest, 4, "I have informed the lieutenant that I found the shrine.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I reported back to the lieutenant.")
  54. UpdateQuestDescription(Quest, "I found the remains of an old shrine in the Ruins, but it does not seem to be giving any divine strength to the orcs. In fact, it seems to be a remnant of the lost community of Shoreside, which is what this area used to be called. I have reported back to Lieutenant Argosian of the Freeport Militia and told him what I found.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1Complete(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2Complete(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3Complete(Quest, QuestGiver, Player)
  64. elseif Step == 4 then
  65. QuestComplete(Quest, QuestGiver, Player)
  66. end
  67. end
  68. function Accepted(Quest, QuestGiver, Player)
  69. FaceTarget(QuestGiver, Player)
  70. conversation = CreateConversation()
  71. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_argosian/fprt_adv04_ruins/revamp/lieutenant_argosian022b.mp3", "", "", 3696168160, 1150705872, Player)
  72. AddConversationOption(conversation, "Yes, sir.", "dlg_0_8")
  73. StartConversation(conversation, QuestGiver, Player, "Go now, and report back when your duty is done.")
  74. end
  75. function Declined(Quest, QuestGiver, Player)
  76. -- Add dialog here for when the quest is declined
  77. end