9
3

ebiks_missing_parts.lua 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --[[
  2. Script Name : Quests/IsleofRefuge/ebiks_missing_parts.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.25 03:09:58
  5. Script Purpose :
  6. Zone : IsleofRefuge
  7. Quest Giver: Ebik
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. local EbiksMissingParts = 5755
  13. function Init(Quest)
  14. -- Constructed Wrist Spanner
  15. AddQuestStep(Quest, 1, "I still need to get a size 7 clunker. Perhaps Ebik lost it while getting a better view of the bay.", 1, 100, "I need to find the three items that were lost on this island. I should keep an eye out while I explore the colony.", 173)
  16. AddQuestStep(Quest, 2, "I still need to get a copper-coated springer. It's possible Ebik could have lost it over the side of the ship.", 1, 100, "I need to find the three items that were lost on this island. I should keep an eye out while I explore the colony.", 216)
  17. AddQuestStep(Quest, 3, "I still need to get a triangle spinner. Maybe Ebik was trying to run from something and dropped it?", 1, 100, "I need to find the three items that were lost on this island. I should keep an eye out while I explore the colony.", 86)
  18. AddQuestStepCompleteAction(Quest, 1, "step1_complete")
  19. AddQuestStepCompleteAction(Quest, 2, "step2_complete")
  20. AddQuestStepCompleteAction(Quest, 3, "step3_complete")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. if QuestGiver ~= nil then
  24. if GetDistance(Player, QuestGiver) < 30 then
  25. FaceTarget(QuestGiver, Player)
  26. Dialog.New(QuestGiver, Player)
  27. Dialog.AddDialog("I need all the parts, I can't leave without them and luckily the boat to Qeynos hasn't showed up yet. Please help me find all of the parts.")
  28. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_secondtalk_01.mp3", 688070292, 1255284608)
  29. Dialog.AddOption("Okay.")
  30. Dialog.Start()
  31. end
  32. end
  33. end
  34. function Declined(Quest, QuestGiver, Player)
  35. end
  36. function step1_complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 1, "I found a size 7 clunker.")
  38. if QuestIsComplete(Player, EbiksMissingParts) then
  39. givePartsToEbik(Quest, QuestGiver, Player)
  40. end
  41. end
  42. function step2_complete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 2, "I found a copper-coated springer.")
  44. if QuestIsComplete(Player, EbiksMissingParts) then
  45. givePartsToEbik(Quest, QuestGiver, Player)
  46. end
  47. end
  48. function step3_complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 3, "I found a triangle spinner.")
  50. if QuestIsComplete(Player, EbiksMissingParts) then
  51. givePartsToEbik(Quest, QuestGiver, Player)
  52. end
  53. end
  54. function givePartsToEbik(Quest, QuestGiver, Player)
  55. UpdateQuestTaskGroupDescription(Quest, 1, "I have Ebik's three items.")
  56. AddQuestStepChat(Quest, 4, "I should bring these parts back to Ebik.", 1, "I found all the parts Ebik needs and I should return them to him.", 0, 3250008)
  57. AddQuestStepCompleteAction(Quest, 4, "quest_complete_gavePartsToEbik")
  58. end
  59. function quest_complete_gavePartsToEbik(Quest, QuestGiver, Player)
  60. UpdateQuestTaskGroupDescription(Quest, 2, "I have given Ebik the parts I collected.")
  61. UpdateQuestDescription(Quest, "I gave Ebik Wobblecog all the parts he needed. Hopefully now he can meet up with his father and evade their family's famous curse.")
  62. GiveQuestReward(Quest, Player)
  63. end
  64. function Reload(Quest, QuestGiver, Player, Step)
  65. if Step == 1 then
  66. step1_complete(Quest, QuestGiver, Player)
  67. elseif Step == 2 then
  68. step2_complete(Quest, QuestGiver, Player)
  69. elseif Step == 3 then
  70. step3_complete(Quest, QuestGiver, Player)
  71. elseif Step == 4 then
  72. givePartsToEbik(Quest, QuestGiver, Player)
  73. end
  74. end