9
3

fresh_samples.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. --[[
  2. Script Name : fresh_samples.lua
  3. Script Purpose : Handles the quest, "Fresh Samples"
  4. Script Author : premierio015
  5. Script Date : 30.06.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Serpent Sewer
  8. Quest Giver : Marcus Puer
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. SetQuestFeatherColor(Quest, 3)
  14. SetQuestRepeatable(Quest)
  15. local RandomChoice = MakeRandomInt(1, 4)
  16. if RandomChoice == 1 then
  17. AddQuestStepKill(Quest, 1, "Get ten samples from a refuse toad.", 10, 100, "I'm helping Marcus Puer with his research down here in the Serpent Sewers. He needs me to gather fresh samples from the creatures down here.", 343, 1550000, 1550037)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1Complete_RefuseToad")
  19. elseif RandomChoice == 2 then
  20. AddQuestStepKill(Quest, 1, "Get ten samples from an immature sludgewater.", 10, 100, "I'm helping Marcus Puer with his research down here in the Serpent Sewers. He needs me to gather fresh samples from the creatures down here.", 344, 1550006, 1550043)
  21. AddQuestStepCompleteAction(Quest, 1, "Step1Complete_ImmatureSludgewater")
  22. elseif RandomChoice == 3 then
  23. AddQuestStepKill(Quest, 1, "Get ten samples from a sift dasher.", 10, 100, "I'm helping Marcus Puer with his research down here in the Serpent Sewers. He needs me to gather fresh samples from the creatures down here.", 342, 1550023, 1550060)
  24. AddQuestStepCompleteAction(Quest, 1, "Step1Complete_SiftDasher")
  25. elseif RandomChoice == 4 then
  26. AddQuestStepKill(Quest, 1, "Get ten samples from a drudge globule.", 10, 100, "I'm helping Marcus Puer with his research down here in the Serpent Sewers. He needs me to gather fresh samples from the creatures down here.", 345, 1550001, 1550038)
  27. AddQuestStepCompleteAction(Quest, 1, "Step1Complete_DrudgeGlobule")
  28. end
  29. end
  30. function Step1Complete_RefuseToad(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I've got the refuse toad samples.")
  32. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  33. end
  34. function Step1Complete_ImmatureSludgewater(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 1, "I've got the immature sludgwater samples.")
  36. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  37. end
  38. function Step1Complete_SiftDasher(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 1, "I've got the sift dasher samplers.")
  40. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  41. end
  42. function Step1Complete_DrudgeGlobule(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 4, "I've got the drudge globule samples.")
  44. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  45. end
  46. function Accepted(Quest, QuestGiver, Player)
  47. if GetQuestCompleteCount(Player, Quest) == 0 then
  48. FaceTarget(QuestGiver, Player)
  49. local conversation = CreateConversation()
  50. PlayFlavor(QuestGiver, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer006.mp3", "", "", 2102514737, 183908223, Player)
  51. AddConversationOption(conversation, "Alright then. ")
  52. StartConversation(conversation, QuestGiver, Player, "Well I need samples from the creatures down here, of course! You can handle this small request, right? Of course you can! Splendid! Now off with you, off with your adventuring.")
  53. elseif GetQuestCompleteCount(Player, QUest) > 0 then
  54. PlayFlavor(QuestGiver, "voiceover/english/marcus_puer/fprt_sewer02/marcuspuer007.mp3", "", "", 794343, 2060215246, Player)
  55. local conversation = CreateConversation()
  56. AddConversationOption(conversation, "I'm on it.")
  57. StartConversation(conversation, QuestGiver, Player, "I need more of the same, really, just bits and pieces, bits and pieces of the creatures down here. Now hop to it. Remember, they need to be fresh! The fresher, the more potent, that's what mom always said.")
  58. end
  59. end
  60. function Declined(Quest, QuestGiver, Player)
  61. -- Add dialog here for when the quest is declined
  62. end
  63. function Deleted(Quest, QuestGiver, Player)
  64. -- Remove any quest specific items here when the quest is deleted
  65. end
  66. function Step2Complete(Quest, QuestGiver, Player)
  67. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered the fresh samples Marcus needed.")
  68. AddQuestStepChat(Quest, 2, "I should return to Marcus with the samples.", 1, "I've gathered the samples Marcus needs, I should return them to him.", 11, 1550056)
  69. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  70. end
  71. function QuestComplete(Quest, QuestGiver, Player)
  72. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  73. UpdateQuestStepDescription(Quest, 2, "I've given Marcus the samples.")
  74. UpdateQuestTaskGroupDescription(Quest, 2, "I've given Marcus the samples he asked for.")
  75. UpdateQuestDescription(Quest, "I've returned to Marcus and he was pleased with the samples that I brought him. Perhaps I will help him again. He seems to be a useful character to know.")
  76. GiveQuestReward(Quest, Player)
  77. end
  78. function Reload(Quest, QuestGiver, Player, Step)
  79. if Step == 1 then
  80. local RandomChoice = MakeRandomInt(1, 4)
  81. if RandomChoice == 1 then
  82. Step1Complete_RefuseToad(Quest, QuestGiver, Player)
  83. elseif RandomChoice == 2 then
  84. Step1Complete_ImmatureSludgewater(Quest, QuestGiver, Player)
  85. elseif RandomChoice == 3 then
  86. Step1Complete_SiftDasher(Quest, QuestGiver, Player)
  87. elseif RandomChoice == 4 then
  88. Step1Complete_DrudgeGlobule(Quest, QuestGiver, Player)
  89. end
  90. elseif Step == 2 then
  91. Step2Complete(Quest, QuestGiver, Player)
  92. end
  93. end