9
3

gathering_components.lua 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : Quests/SouthQeynos/gathering_components.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.16 03:05:07
  5. Script Purpose :
  6. Zone : SouthQeynos
  7. Quest Giver: Khalil'Mun
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "Hunt bog faeries in the Peat Bog.", 1, 60, "I must gather up the rare components Khalil'Mun needs for his potion. I will find them in the Peat Bog.", 110, 1980052,1980010,1980007,1980008,1980002)
  13. AddQuestStepKill(Quest, 2, "Hunt bog slugs in the Peat Bog.", 1, 60, "I must gather up the rare components Khalil'Mun needs for his potion. I will find them in the Peat Bog.", 83, 1980018,1980006)
  14. AddQuestStepKill(Quest, 3, "Hunt bog sludges in the Peat Bog.", 1, 60, "I must gather up the rare components Khalil'Mun needs for his potion. I will find them in the Peat Bog.", 178, 1980002)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. local conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun002.mp3", "", "no",1469692776, 2022256144, Player)
  23. AddConversationOption(conversation, "Alright. Here is my journal. I'll return once I've found everything on the list.")
  24. StartConversation(conversation, QuestGiver, Player, "No, but you'll keep the knowledge and perhaps a bit of coin. You must learn how to gather your ingredients before you can truely understand how to use them. I'll scribe in your journal the components you're looking for. You should be able to gather everything you need in the local yard.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  34. UpdateQuestStepDescription(Quest, 1, "I have obtained a rare glittering bog faerie wing.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  39. UpdateQuestStepDescription(Quest, 2, "I have obtained a bog slug eyestalk.")
  40. CheckProgress(Quest, QuestGiver, Player)
  41. end
  42. function Step3Complete(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, 3, "I have obtained a vial of bog sludge ectoplasm.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function CheckProgress(Quest, QuestGiver, Player)
  48. if QuestStepIsComplete(Player, 5555, 1) and QuestStepIsComplete(Player, 5555, 2) and QuestStepIsComplete(Player, 5555, 3) then
  49. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered the components Khalil'Mun needs for his potion.")
  50. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  51. AddQuestStepChat(Quest, 4, "I need return to Khalil'Mun.", 1, "Khalil'Mun is waiting for these ingredients in his shop in South Qeynos.", 10, 2310048)
  52. end
  53. end
  54. function QuestComplete(Quest, QuestGiver, Player)
  55. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  56. UpdateQuestStepDescription(Quest, 4, "I returned to Khalil'Mun with his ingredients.")
  57. UpdateQuestDescription(Quest, "After a full warm bath and thorough scrubbing, I was able to clean the disgusting bog-filth away after collecting reagents for Khalil'Mun's latest alchemical potion. Remind me never to work for a mage so cheaply again!")
  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