frizi_figglesnips_ingredients.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : Quests/TempleStreet/frizi_figglesnips_ingredients.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.07 01:11:46
  5. Script Purpose :
  6. Zone : TempleStreet
  7. Quest Giver: Frizi
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to find a glassy crab eye.", 1, 66, "I must find the ingredients that Frizi needs.", 83, 8410002,8410001,8410017)
  14. AddQuestStepKill(Quest, 2, "I must find a shoreside adder fang.", 1, 66, "I must find the ingredients that Frizi needs.", 137, 8420018,8420020)
  15. AddQuestStepKill(Quest, 3, "I must find a unbroken scorpion stinger.", 1, 66, "I must find the ingredients that Frizi needs.", 202, 8410010)
  16. AddQuestStepKill(Quest, 4, "I must find an oversized rat stomach.", 1, 66, "I must find the ingredients that Frizi needs.", 109, 8430009,8430010,8430011,8430029,8430008,8400001,8400002,8400003,8400004)
  17. UpdateQuestZone(Quest,"Multiple Zones")
  18. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  20. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  21. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. Dialog.New(QuestGiver, Player)
  26. Dialog.AddDialog("Let's see, I need a glassy crab eye and a scorpion stinger--you'll find both items in the Sunken City. I also need a shoreside adder fang from the Sprawl or Ruins. Finally, an enlarged rat stomach from... somewhere. Return to me after you gather these ingredients.")
  27. Dialog.AddOption("I'll get to it.")
  28. Dialog.Start()
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. -- Add dialog here for when the quest is declined
  32. end
  33. function Deleted(Quest, QuestGiver, Player)
  34. -- Remove any quest specific items here when the quest is deleted
  35. end
  36. function Step1Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 1, "I have found a glassy crab eye.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step2Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 2, "I have found a snake fang.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function Step3Complete(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 3, "I have found a dune scorpion stinger.")
  46. CheckProgress(Quest, QuestGiver, Player)
  47. end
  48. function Step4Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 4, "I have found a oversized rat stomach.")
  50. CheckProgress(Quest, QuestGiver, Player)
  51. end
  52. function CheckProgress(Quest, QuestGiver, Player)
  53. if QuestStepIsComplete(Player, 5923, 1) and QuestStepIsComplete(Player, 5923, 2) and QuestStepIsComplete(Player, 5923, 3) and QuestStepIsComplete(Player, 5923, 4) then
  54. UpdateQuestTaskGroupDescription(Quest, 1, "I have found all of ingredients Frizi needs.")
  55. AddQuestStepChat(Quest, 5, "I need to speak to Frizi.", 1, "I need to deliver these ingredients to Frizi Figglesnip in her shop.", 11, 1360053)
  56. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  57. UpdateQuestZone(Quest,"Temple Street")
  58. end
  59. end
  60. function QuestComplete(Quest, QuestGiver, Player)
  61. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  62. UpdateQuestStepDescription(Quest, 5, "I've given Frizi the ingredients she asked for.")
  63. UpdateQuestTaskGroupDescription(Quest, 2, "I've given Frizi the ingredients she had asked for.")
  64. UpdateQuestDescription(Quest, "I gathered four ingredients for Frizi Figglesnip. When I returned them to her, she rewarded me with a pair of magical gloves.")
  65. GiveQuestReward(Quest, Player)
  66. end
  67. function Reload(Quest, QuestGiver, Player, Step)
  68. if Step == 1 then
  69. Step1Complete(Quest, QuestGiver, Player)
  70. elseif Step == 2 then
  71. Step2Complete(Quest, QuestGiver, Player)
  72. elseif Step == 3 then
  73. Step3Complete(Quest, QuestGiver, Player)
  74. elseif Step == 4 then
  75. Step4Complete(Quest, QuestGiver, Player)
  76. elseif Step == 5 then
  77. QuestComplete(Quest, QuestGiver, Player)
  78. end
  79. end