9
3

GatheringRockSamples.lua 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 :
  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 Step1Complete(Quest, QuestGiver, Player)
  18. UpdateQuestStepDescription(Quest, 1, "I found a windpsirit sample.")
  19. 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)
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. end
  22. function Step2Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 2, "I found an elddar spark crystal formation.")
  24. 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)
  25. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  26. end
  27. function Step3Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 3, "I found a prexus tear sample.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I gathered the three samples from the different parts of the caves.")
  30. 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)
  31. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. UpdateQuestStepDescription(Quest, 4, "I spoke with Geologist Quardifle.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I gave the samples I gathered to Geologist Quardifle.")
  37. 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. ")
  38. GiveQuestReward(Quest, Player)
  39. end
  40. function Reload(Quest, QuestGiver, Player, Step)
  41. if Step == 1 then
  42. Step1Complete(Quest, QuestGiver, Player)
  43. elseif Step == 2 then
  44. Step2Complete(Quest, QuestGiver, Player)
  45. elseif Step == 3 then
  46. Step3Complete(Quest, QuestGiver, Player)
  47. elseif Step == 4 then
  48. QuestComplete(Quest, QuestGiver, Player)
  49. end
  50. end
  51. function Accepted(Quest, QuestGiver, Player)
  52. -- Add dialog here for when the quest is accepted
  53. end
  54. function Declined(Quest, QuestGiver, Player)
  55. -- Add dialog here for when the quest is declined
  56. end