9
3

GatheringRockSamples.lua 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. local GEOLOGIST_QUARDIFLE_ID = 2380036
  13. function Init(Quest)
  14. AddQuestStepLocation(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)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. UpdateQuestZone(Quest, "The Caves")
  21. PlayFlavor(QuestGiver, "voiceover/english/geologist_quardifle/qey_village06/geologistquardifle003.mp3", "", "", 3141164092, 1027825871, Player)
  22. AddConversationOption(conversation, "Alright. I'll see what I can find!")
  23. StartConversation(conversation, QuestGiver, Player, "Great! You'll find that these caves are largely unexplored. Seek out intricate areas of these caves and bring me back some unique rock samples and I'll be happy!")
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I found a windpsirit sample.")
  27. AddQuestStepLocation(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)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I found an elddar spark crystal formation.")
  32. AddQuestStepLocation(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)
  33. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  34. end
  35. function Step3Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 3, "I found a prexus tear sample.")
  37. UpdateQuestTaskGroupDescription(Quest, 1, "I gathered the three samples from the different parts of the caves.")
  38. UpdateQuestZone(Quest, "Baubbleshire")
  39. 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)
  40. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  41. end
  42. function QuestComplete(Quest, QuestGiver, Player)
  43. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  44. UpdateQuestStepDescription(Quest, 4, "I spoke with Geologist Quardifle.")
  45. UpdateQuestTaskGroupDescription(Quest, 2, "I gave the samples I gathered to Geologist Quardifle.")
  46. 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. ")
  47. GiveQuestReward(Quest, Player)
  48. end
  49. function Reload(Quest, QuestGiver, Player, Step)
  50. if Step == 1 then
  51. Step1Complete(Quest, QuestGiver, Player)
  52. elseif Step == 2 then
  53. Step2Complete(Quest, QuestGiver, Player)
  54. elseif Step == 3 then
  55. Step3Complete(Quest, QuestGiver, Player)
  56. elseif Step == 4 then
  57. QuestComplete(Quest, QuestGiver, Player)
  58. end
  59. end
  60. function Declined(Quest, QuestGiver, Player)
  61. -- Add dialog here for when the quest is declined
  62. end