9
3

magnificent_machinery.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : Quests/ForestRuins/magnificent_machinery.lua
  3. Script Purpose : Handles the quest, "Magnificent Machinery"
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Zone : The Forest Ruins
  7. Quest Giver: Poko Zing
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. -- machine parts
  13. AddQuestStepObtainItem(Quest, 1, "I need to collect some machine parts for Poko Zing. He says the junk parts are strewn about the Forest Ruins.", 6, 100, "Poko Zing is in need of mechanical parts and has come across quite a few in the Forest Ruins. He has asked that I help him by collecting some parts for him.", 1042, 7883)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_GotMachineParts")
  15. -- the spawn is 'mechanical components'
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/poko_zing/qey_adv02_ruins/quests/poko/poko004a.mp3", "", "", 3746859101, 2602853428, Player)
  21. AddConversationOption(conversation, "I will return shortly.")
  22. StartConversation(conversation, QuestGiver, Player, "Once you get them, bring them back to me and I will recycle them for my purposes.")
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. end
  26. function Step1_Complete_GotMachineParts(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 1, "I have collected the machine parts.")
  28. AddQuestStepChat(Quest, 2, "I need to bring these machine parts back to Poko Zing.", 1, "Poko Zing is in need of mechanical parts and has come across quite a few in the Forest Ruins. He has asked that I help him by collecting some parts for him.", 0, 1960014)
  29. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeWithPoko")
  30. end
  31. function Step2_Complete_SpokeWithPoko(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 2, "I have given Poko the machine parts he asked for.")
  33. -- remove machine parts
  34. while HasItem(Player, 7883) do
  35. RemoveItem(Player, 7883)
  36. end
  37. AddQuestStepChat(Quest, 3, "I need to report to Lieutenant Germain.", 1, "Poko Zing is in need of mechanical parts and has come across quite a few in the Forest Ruins. He has asked that I help him by collecting some parts for him.", 0, 1960011)
  38. AddQuestStepCompleteAction(Quest, 3, "Quest_Complete")
  39. end
  40. function Quest_Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have reported to Lieutenant Germain.")
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the parts that Poko needed. One of the parts I found surprised Poko and he asked me to speak with Lieutenant Germain.")
  43. UpdateQuestDescription(Quest, "I have collected the parts that Poko needed. One of the parts I found surprised Poko and he asked me to speak with Lieutenant Germain.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player)
  47. if Step == 1 then
  48. Step1_Complete_GotMachineParts(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. Step2_Complete_SpokeWithPoko(Quest, QuestGiver, Player)
  51. end
  52. end