9
3

aquatic_research.lua 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --[[
  2. Script Name : Quests/IsleofRefuge/aquatic_research.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.25 06:09:34
  5. Script Purpose :
  6. Zone : IsleofRefuge
  7. Quest Giver: Aquatic Research Notebook
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to hunt a shoal glider.", 1, 100, "I need to hunt and collect the four different types of animals mentioned in the notebook.", 168, 3250101)
  13. AddQuestStepKill(Quest, 2, "I need to hunt a needlefang.", 1, 100, "I need to hunt and collect the four different types of animals mentioned in the notebook.", 86, 3250158)
  14. AddQuestStepKill(Quest, 3, "I need to hunt a reef turtle.", 1, 100, "I need to hunt and collect the four different types of animals mentioned in the notebook.", 158, 3250100)
  15. AddQuestStepKill(Quest, 4, "I need to hunt a sawtooth shark.", 1, 100, "I need to hunt and collect the four different types of animals mentioned in the notebook.", 172, 3250157, 2780032)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. if HasItem(Player,1001013) then
  23. RemoveItem(Player, 1001013, 1)
  24. end
  25. SendMessage(Player, "Your aquatic research notebook has been placed in your quest satchel.")
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. -- Add dialog here for when the quest is declined
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. -- Remove any quest specific items here when the quest is deleted
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have the body of a shoal glider.")
  35. QuestStepCheck(Quest, QuestGiver, Player)
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have the body of a needlefang.")
  39. QuestStepCheck(Quest, QuestGiver, Player)
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have the body of a reef turtle.")
  43. QuestStepCheck(Quest, QuestGiver, Player)
  44. end
  45. function Step4Complete(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 4, "I have the body of a sandstalker.")
  47. QuestStepCheck(Quest, QuestGiver, Player)
  48. end
  49. function QuestStepCheck(Quest, QuestGiver, Player)
  50. if QuestStepIsComplete(Player,5757,1) and QuestStepIsComplete(Player,5757,2) and QuestStepIsComplete(Player,5757,3) and QuestStepIsComplete(Player,5757,4)then
  51. UpdateQuestTaskGroupDescription(Quest, 1, "I found the four types of animals listed in the notebook.")
  52. AddQuestStepChat(Quest, 5, "I need to take these specimens to Master Malvonicus.", 1, "I need to take the collected specimens to Master Malvonicus.", 11, 3250031)
  53. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  54. end
  55. end
  56. function QuestComplete(Quest, QuestGiver, Player)
  57. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  58. UpdateQuestStepDescription(Quest, 5, "I took the animal bodies to Master Malvonicus.")
  59. UpdateQuestTaskGroupDescription(Quest, 2, "I delivered the four animal specimens to Master Malvonicus.")
  60. UpdateQuestDescription(Quest, "I talked to Master Malvonicus at the top of his tower at outpost. Apparently his apprentice was an irresistible treat for the dreaded Bladefin. He gave me the reward that he had originally planned for his apprentice.")
  61. GiveQuestReward(Quest, Player)
  62. end
  63. function Reload(Quest, QuestGiver, Player, Step)
  64. if Step == 1 then
  65. Step1Complete(Quest, QuestGiver, Player)
  66. elseif Step == 2 then
  67. Step2Complete(Quest, QuestGiver, Player)
  68. elseif Step == 3 then
  69. Step3Complete(Quest, QuestGiver, Player)
  70. elseif Step == 4 then
  71. Step4Complete(Quest, QuestGiver, Player)
  72. elseif Step == 5 then
  73. QuestComplete(Quest, QuestGiver, Player)
  74. end
  75. end