9
3

a_family_recipe.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : Quests/Graystone/a_family_recipe.lua
  3. Script Purpose : Handles the quest, "A Family Recipe"
  4. Script Author : Scatman
  5. Script Date : 2009.10.05
  6. Zone : Graystone Yard
  7. Quest Giver: Mav Boilfist
  8. Preceded by: None
  9. Followed by: Cheers! (cheers.lua)
  10. --]]
  11. local AFamilyRecipe = 283
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "I need to acquire some Frozen Cherries. 4QGCG is the shipping number.", 1, 100, "I must collect the needed ingredients for Mav Boilfist. I will need to refer to the overflow shipping manifest she gave me to determine where the items are located.", 770)
  14. AddQuestStep(Quest, 2, "I need to acquire some yeast. 2DF0F is the shipping number.", 1, 100, "I must collect the needed ingredients for Mav Boilfist. I will need to refer to the overflow shipping manifest she gave me to determine where the items are located.", 342)
  15. AddQuestStep(Quest, 3, "I need to acquire some honey. QGC4F is the shipping number.", 1, 100, "I must collect the needed ingredients for Mav Boilfist. I will need to refer to the overflow shipping manifest she gave me to determine where the items are located.", 357)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_FoundCherries")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_FoundYeast")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_FoundHoney")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. -- Overflow Manifest
  24. if not HasItem(Player, 10268, 1) then
  25. SummonItem(Player, 10268, 1)
  26. end
  27. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/mav_boilfist/qey_village03/quests/mav_boilfist/mav_boilfist010.mp3", "", "", 2473952435, 2751712477, Player)
  28. AddConversationOption(conversation, "I'll go look for them.")
  29. StartConversation(conversation, QuestGiver, Player, "It shouldn't be too hard. The orders you're looking for are #4QGCG, #2DF0F, and #QGC4F.")
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. end
  33. function Step1_Complete_FoundCherries(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have acquired Frozen Cherries.")
  35. if QuestIsComplete(Player, AFamilyRecipe) then
  36. FoundAllItems(Quest, QuestGiver, Player)
  37. end
  38. end
  39. function Step2_Complete_FoundYeast(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I have acquired some yeast.")
  41. if QuestIsComplete(Player, AFamilyRecipe) then
  42. FoundAllItems(Quest, QuestGiver, Player)
  43. end
  44. end
  45. function Step3_Complete_FoundHoney(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 3, "I have acquired some honey.")
  47. if QuestIsComplete(Player, AFamilyRecipe) then
  48. FoundAllItems(Quest, QuestGiver, Player)
  49. end
  50. end
  51. function FoundAllItems(Quest, QuestGiver, Player)
  52. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected all of the needed ingredients.")
  53. AddQuestStepChat(Quest, 4, "I need to bring all of these components to Mav Boilfist near the docks.", 1, "I need to bring these ingredients to Mav Boilfist in Graystone Yard.", 0, 2350016)
  54. AddQuestStepCompleteAction(Quest, 4, "Quest_Complete")
  55. end
  56. function Quest_Complete(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 4, "I have given Mav all of the components she requested.")
  58. UpdateQuestTaskGroupDescription(Quest, 2, "I have given Mav the ingredients she asked for.")
  59. -- Overflow Manifest
  60. while HasItem(Player, 10268) do
  61. RemoveItem(Player, 10268)
  62. end
  63. GiveQuestReward(Quest, Player)
  64. UpdateQuestDescription(Quest, "I have collected the ingredients for Mav and returned them to her.")
  65. end
  66. function Reload(Quest, QuestGiver, Player, Step)
  67. if Step == 1 then
  68. Step1_Complete_FoundCherries(Quest, QuestGiver, Player)
  69. elseif Step == 2 then
  70. Step2_Complete_FoundYeast(Quest, QuestGiver, Player)
  71. elseif Step == 3 then
  72. Step3_Complete_FoundHoney(Quest, QuestGiver, Player)
  73. end
  74. end