9
3

gathering_components.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. UpdateQuestZone(Quest,"Peat Bog")
  13. AddQuestStepKill(Quest, 1, "Hunt bog faeries in the Peat Bog.", 1, 33, "I must gather up the rare components Khalil'Mun needs for his potion. I will find them in the Peat Bog.", 110, 8290002,8290003,8290052,8290008,8290009,8290010,8290013,8290014,8290011,8290012,8290017,8290018,8290019,8290053,8290044)
  14. AddQuestStepKill(Quest, 2, "Hunt bog slugs in the Peat Bog.", 1, 25, "I must gather up the rare components Khalil'Mun needs for his potion. I will find them in the Peat Bog.", 83, 8290005,8290006,8290031,8290027)
  15. AddQuestStepKill(Quest, 3, "Hunt bog sludges in the Peat Bog.", 1, 33, "I must gather up the rare components Khalil'Mun needs for his potion. I will find them in the Peat Bog.", 178, 8290004)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. local conversation = CreateConversation()
  23. PlayFlavor(QuestGiver, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun002.mp3", "", "no",1469692776, 2022256144, Player)
  24. AddConversationOption(conversation, "Alright. Here is my journal. I'll return once I've found everything on the list.")
  25. 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.")
  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. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. UpdateQuestStepDescription(Quest, 1, "I have obtained a rare glittering bog faerie wing.")
  36. CheckProgress(Quest, QuestGiver, Player)
  37. end
  38. function Step2Complete(Quest, QuestGiver, Player)
  39. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  40. UpdateQuestStepDescription(Quest, 2, "I have obtained a bog slug eyestalk.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step3Complete(Quest, QuestGiver, Player)
  44. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  45. UpdateQuestStepDescription(Quest, 3, "I have obtained a vial of bog sludge ectoplasm.")
  46. CheckProgress(Quest, QuestGiver, Player)
  47. end
  48. function CheckProgress(Quest, QuestGiver, Player)
  49. if QuestStepIsComplete(Player, 5555, 1) and QuestStepIsComplete(Player, 5555, 2) and QuestStepIsComplete(Player, 5555, 3) then
  50. UpdateQuestTaskGroupDescription(Quest, 3, "I've gathered the components Khalil'Mun needs for his potion.")
  51. UpdateQuestZone(Quest,"South Qeynos")
  52. 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)
  53. AddQuestStepCompleteAction(Quest, 4, "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, 4, "I returned to Khalil'Mun with his ingredients.")
  59. 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!")
  60. GiveQuestReward(Quest, Player)
  61. end
  62. function Reload(Quest, QuestGiver, Player, Step)
  63. if Step == 1 then
  64. Step1Complete(Quest, QuestGiver, Player)
  65. elseif Step == 2 then
  66. Step2Complete(Quest, QuestGiver, Player)
  67. elseif Step == 3 then
  68. Step3Complete(Quest, QuestGiver, Player)
  69. elseif Step == 4 then
  70. QuestComplete(Quest, QuestGiver, Player)
  71. end
  72. end