GatheringRockSamples.lua 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : GatheringRockSamples.lua
  3. Script Purpose : Handles the quest, "Gathering Rock Samples"
  4. Script Author : Shatou
  5. Script Date : 1/6/2020
  6. Script Notes : Updated quest accept dialog - 1/20/2022 Dorbin -- NEEDS Updated to interactions with stones in the Caves.
  7. Zone : Baubbleshire
  8. Quest Giver : Geologist Quardifle
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. local GEOLOGIST_QUARDIFLE_ID = 2380036
  14. function Init(Quest)
  15. AddQuestStepZoneLoc(Quest, 1, "Find a mine in the Caves to obtain a windspirit crystal sample.", 20, "I need to visit three mines in the Caves to gather crystal samples.", 1159, 58.11, 2.93, -119.94,826)
  16. AddQuestStepZoneLoc(Quest, 2, "Find a mine in the Caves to obtain an elddar spark crystal sample.", 20, "I need to visit three mines in the Caves to gather crystal samples.", 1168, 66.73, 12.41, -70.69,826)
  17. AddQuestStepZoneLoc(Quest, 3, "Find a mine in the Caves to obtain a prexus tear crystal sample.", 20, "I need to visit three mines in the Caves to gather crystal samples.", 1177, -49.35, 16.59, -133.75,826)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  20. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  21. UpdateQuestZone(Quest,"Caves")
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. Dialog.New(QuestGiver, Player)
  26. Dialog.AddDialog("Great! You'll find some unexplored caves in this area. To get there, ring one of the dock bells. Once you arrive, seek out intricate areas of the caves. Bring me back some unique rock samples and I'll be happy!")
  27. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle003.mp3", 3141164092, 1027825871)
  28. PlayFlavor(QuestGiver, "", "", "smile", 0, 0, Player)
  29. -- Dialog.AddLanguage(6)
  30. Dialog.AddOption("Alright, I'll see what I can find!")
  31. Dialog.Start()
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I found a windpsirit sample.")
  35. QuestCheck(Quest, QuestGiver, Player)
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I found an elddar spark crystal formation.")
  39. QuestCheck(Quest, QuestGiver, Player)
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I found a prexus tear sample.")
  43. QuestCheck(Quest, QuestGiver, Player)
  44. end
  45. function QuestCheck(Quest, QuestGiver, Player)
  46. if QuestStepIsComplete(Player,504,1) ==true and QuestStepIsComplete(Player,504,2) ==true and QuestStepIsComplete(Player,504,3) ==true then
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I gathered the three samples from the different parts of the caves.")
  48. UpdateQuestZone(Quest, "Baubbleshire")
  49. AddQuestStepChat(Quest, 4, "I need to speak with Geologist Quardifle.", 1, "I need to give the samples I gathered to Geologist Quardifle.", 11, GEOLOGIST_QUARDIFLE_ID)
  50. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  51. end
  52. end
  53. function QuestComplete(Quest, QuestGiver, Player)
  54. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  55. UpdateQuestStepDescription(Quest, 4, "I spoke with Geologist Quardifle.")
  56. UpdateQuestTaskGroupDescription(Quest, 2, "I gave the samples I gathered to Geologist Quardifle.")
  57. UpdateQuestDescription(Quest, "The caves are actually quite amazing. I'm glad that Quardifle had me go investigate them and gather the samples. There are all sorts of underground life in there as well; bats, snakes, spiders, and even living rock formations. ")
  58. GiveQuestReward(Quest, Player)
  59. end
  60. function Reload(Quest, QuestGiver, Player, Step)
  61. if Step == 1 then
  62. Step1Complete(Quest, QuestGiver, Player)
  63. elseif Step == 2 then
  64. Step2Complete(Quest, QuestGiver, Player)
  65. elseif Step == 3 then
  66. Step3Complete(Quest, QuestGiver, Player)
  67. elseif Step == 4 then
  68. QuestComplete(Quest, QuestGiver, Player)
  69. end
  70. end
  71. function Declined(Quest, QuestGiver, Player)
  72. -- Add dialog here for when the quest is declined
  73. end