neezers_survey.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. --[[
  2. Script Name : Quests/Baubbleshire/neezers_survey.lua
  3. Script Purpose : Handles the quest, "Neezer's Survey"
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Zone : The Baubbleshire
  7. Quest Giver: Neezer Grund
  8. Preceded by: Nogginspark Reactors (nogginspark_reactors.lua)
  9. Followed by: Getting to Know Poko (getting_to_know_poko.lua)
  10. --]]
  11. -- Quest ID's
  12. local NEEZERS_SURVEY = 330 -- was 28
  13. -- Item ID's
  14. local NEEZERS_QUESTIONS = 10030
  15. function Init(Quest)
  16. AddQuestStep(Quest, 1, "I must read the questions.", 1, 100, "I need to read the series of questions that Neezer gave me. If I lose the questions I can always ask Neezer for another copy of them.", 0)
  17. AddQuestStepCompleteAction(Quest, 1, "step1_complete_readQuestions")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. -- Neezer's Questions
  23. if not HasItem(Player, NEEZERS_QUESTIONS, 1) then
  24. SummonItem(Player, NEEZERS_QUESTIONS, 1)
  25. end
  26. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/neezer_grund/qey_village06/quests/neezer_grund/neezer_grund039b.mp3", "", "", 1403299137, 3842803422, Player)
  27. AddConversationOption(conversation, "I'll be back once I've gotten the answers.")
  28. StartConversation(conversation, QuestGiver, Player, "Strange but probably not surprising. Now get started!")
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. -- remove Neezer's Questions
  34. while HasItem(Player, NEEZERS_QUESTIONS) do
  35. RemoveItem(Player, NEEZERS_QUESTIONS)
  36. end
  37. end
  38. function step1_complete_readQuestions(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 1, "I have read the questions.")
  40. UpdateQuestTaskGroupDescription(Quest, 1, "I have read the questions I am to ask.")
  41. AddQuestStepChat(Quest, 2, "I need to question Drundo in the tavern.", 1, "I need to question Drundo, Remo, and Fillzer.", 2180, 2380026)
  42. AddQuestStepChat(Quest, 3, "I need to question Remo in the eastern hills in the Baubbleshire.", 1, "I need to question Drundo, Remo, and Fillzer.", 2180, 2380004)
  43. AddQuestStepChat(Quest, 4, "I need to question Fillzer in the eastern hills in the Baubbleshire.", 1, "I need to question Drundo, Remo, and Fillzer.", 2180, 2380005)
  44. AddQuestStepCompleteAction(Quest, 2, "step2_complete_talkedToDrundo")
  45. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToRemo")
  46. AddQuestStepCompleteAction(Quest, 4, "step4_complete_talkedToFillzer")
  47. end
  48. function step2_complete_talkedToDrundo(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 2, "I have questioned Drundo.")
  50. if QuestIsComplete(Player, NEEZERS_SURVEY) then
  51. multiple_steps_complete(Quest, QuestGiver, Player)
  52. end
  53. end
  54. function step3_complete_talkedToRemo(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 3, "I have questioned Remo.")
  56. if QuestIsComplete(Player, NEEZERS_SURVEY) then
  57. multiple_steps_complete(Quest, QuestGiver, Player)
  58. end
  59. end
  60. function step4_complete_talkedToFillzer(Quest, QuestGiver, Player)
  61. UpdateQuestStepDescription(Quest, 4, "I have questioned Fillzer.")
  62. if QuestIsComplete(Player, NEEZERS_SURVEY) then
  63. multiple_steps_complete(Quest, QuestGiver, Player)
  64. end
  65. end
  66. function multiple_steps_complete(Quest, QuestGiver, Player)
  67. UpdateQuestTaskGroupDescription(Quest, 2, "I have questioned Drundo, Remo, and Fillzer.")
  68. AddQuestStepChat(Quest, 5, "I need to speak with Neezer Grund.", 1, "Now that I have all the answers for Neezer I will need to return to him.", 0, 2380038)
  69. AddQuestStepCompleteAction(Quest, 5, "quest_complete")
  70. end
  71. function quest_complete(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 5, "I have spoken with Neezer Grund.")
  73. UpdateQuestTaskGroupDescription(Quest, 3, "I have returned to Neezer.")
  74. -- remove Neezer's Questions
  75. while HasItem(Player, NEEZERS_QUESTIONS) do
  76. RemoveItem(Player, NEEZERS_QUESTIONS)
  77. end
  78. UpdateQuestDescription(Quest, "I have given Neezer the answers he was looking for.")
  79. GiveQuestReward(Quest, Player)
  80. end
  81. function Reload(Quest, QuestGiver, Player, Step)
  82. if Step == 1 then
  83. step1_complete_readQuestions(Quest, QuestGiver, Player)
  84. elseif Step == 2 then
  85. step2_complete_talkedToDrundo(Quest, QuestGiver, Player)
  86. elseif Step == 3 then
  87. step3_complete_talkedToRemo(Quest, QuestGiver, Player)
  88. elseif Step == 4 then
  89. step4_complete_talkedToFillzer(Quest, QuestGiver, Player)
  90. end
  91. end