9
3

TasksaboardtheFarJourney.lua 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. --[[
  2. Script Name : TasksaboardtheFarJourney.lua
  3. Script Purpose : Handles the quest, "Tasks aboard the Far Journey"
  4. Script Author : Cynnar
  5. Script Date : 2/23/2020
  6. Script Notes :
  7. Zone : Hallmark
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local Waulon = 270002
  13. local CaptainVarlos = 270000
  14. local Ingrid = 270001
  15. local ARat = 270009
  16. local Goblin = 270008
  17. local WaulonsHat = 15354
  18. local ShardOfLucin = 12565
  19. function Init(Quest)
  20. AddQuestStepChat(Quest, 1, "I should speak to Waulon.", 1, "Captain Varlos has asked me to speak to Waulon.", 11, Waulon)
  21. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  22. end
  23. function Step1Complete(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 1, "I spoke to Waulon.")
  25. UpdateQuestTaskGroupDescription(Quest, 1, "I spoke to Waulon as Captain Varlos had asked of me.")
  26. AddQuestStepObtainItem(Quest, 2, "I should start by opening boxes on the deck.", 1, 100, "Waulon has asked me to look for his hat in one of the boxes on the deck.", 11, WaulonsHat)
  27. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  28. end
  29. function Step2Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "I found Waulon's hat.")
  31. UpdateQuestTaskGroupDescription(Quest, 2, "I found Waulon's hat in one of the boxes.")
  32. AddQuestStepChat(Quest, 3, "I should speak to Waulon.", 1, "Now that I found Waulon's hat, I should return it.", 258, Waulon)
  33. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  34. end
  35. function Step3Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 3, "I returned Waulon's hat to him.")
  37. UpdateQuestTaskGroupDescription(Quest, 3, "I returned Waulon's hat.")
  38. AddQuestStepChat(Quest, 4, "I should speak to Ingrid.", 1, "Waulon has asked me to speak to Ingrid.", 11, Ingrid)
  39. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  40. end
  41. function Step4Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 4, "I have spoken to Ingrid as Waulon had asked.")
  43. UpdateQuestTaskGroupDescription(Quest, 4, "I have spoken to Ingrid.")
  44. AddQuestStepObtainItem(Quest, 5, "I should find a way to buy the shard from Merchant Vim.", 1, 100, "Ingrid would like me to buy her a Shard of Luclin.", 11, ShardOfLucin)
  45. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  46. end
  47. function Step5Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 5, "I have purchased a Shard of Luclin.")
  49. UpdateQuestTaskGroupDescription(Quest, 5, "I purchased a Shard of Luclin.")
  50. AddQuestStepChat(Quest, 6, "Return to Ingrid.", 1, "Ingrid would like me to give her the Shard of Luclin.", 183, Ingrid)
  51. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  52. end
  53. function Step6Complete(Quest, QuestGiver, Player)
  54. UpdateQuestStepDescription(Quest, 6, "I gave the Shard of Luclin to Ingrid.")
  55. UpdateQuestTaskGroupDescription(Quest, 6, "I gave the Shard of Luclin to Ingrid.")
  56. AddQuestStepChat(Quest, 7, "I should speak to Captain Varlos again.", 1, "Captain Varlos is trying to get my attention.", 11, CaptainVarlos)
  57. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  58. end
  59. function Step7Complete(Quest, QuestGiver, Player)
  60. UpdateQuestStepDescription(Quest, 7, "I spoke with Captain Varlos as Ingrid has asked of me.")
  61. UpdateQuestTaskGroupDescription(Quest, 7, "I have spoken to Captain Varlos.")
  62. AddQuestStepKill(Quest, 8, "I must kill the rats on the deck.", 2, 100, "Captain Varlos has asked me to kill the rats on the deck.", 99, ARat)
  63. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  64. end
  65. function Step8Complete(Quest, QuestGiver, Player)
  66. UpdateQuestStepDescription(Quest, 8, "I have killed the rats.")
  67. UpdateQuestTaskGroupDescription(Quest, 8, "I killed the rats that Captain Varlos requested.")
  68. AddQuestStepChat(Quest, 9, "I should speak to Captain Varlos.", 1, "Inform Captain Varlos that you have exterminated the vermin.", 11, CaptainVarlos)
  69. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  70. end
  71. function Step9Complete(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 9, "I spoke to Captain Varlos.")
  73. UpdateQuestTaskGroupDescription(Quest, 9, "Captain Varlos has ordered you to kill the escaped goblin.")
  74. AddQuestStepKill(Quest, 10, "I must kill the goblin.", 1, 100, "Captain Varlos has ordered you to kill the escaped goblin.", 11, Goblin)
  75. AddQuestStepCompleteAction(Quest, 10, "QuestComplete")
  76. end
  77. function QuestComplete(Quest, QuestGiver, Player)
  78. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  79. UpdateQuestStepDescription(Quest, 10, "I have killed the goblin.")
  80. UpdateQuestTaskGroupDescription(Quest, 10, "I killed the escaped goblin.")
  81. UpdateQuestDescription(Quest, "I completed all the tasks assigned to me by Captain Varlos aboard the Far Journey.")
  82. GiveQuestReward(Quest, Player)
  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. Step7Complete(Quest, QuestGiver, Player)
  99. elseif Step == 8 then
  100. Step8Complete(Quest, QuestGiver, Player)
  101. elseif Step == 9 then
  102. Step9Complete(Quest, QuestGiver, Player)
  103. elseif Step == 10 then
  104. QuestComplete(Quest, QuestGiver, Player)
  105. end
  106. end
  107. function Accepted(Quest, QuestGiver, Player)
  108. FaceTarget(QuestGiver, Player)
  109. conversation = CreateConversation()
  110. PlayFlavor(QuestGiver, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_009.mp3", "", "point", 3537393303, 2188767436, Player)
  111. AddConversationOption(conversation, "Okay.")
  112. StartConversation(conversation, QuestGiver, Player, "Whoa there, the seas are gettin' a bit angry. Go speak ta' me first mate, Waulon. He might have something for ya' ta' do.")
  113. local Waulon = GetSpawn(NPC, 270002)
  114. FaceTarget(NPC, Waulon)
  115. end
  116. function Declined(Quest, QuestGiver, Player)
  117. -- Add dialog here for when the quest is declined
  118. end