reclaiming_the_bog.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : Quests/PeatBog/reclaiming_the_bog.lua
  3. Script Purpose : Handles the quest, "Reclaiming the Bog"
  4. Script Author : Scatman
  5. Script Date : 2009.05.10
  6. Zone : The Peat Bog
  7. Quest Giver: Lieutenant Dawson
  8. Preceded by: None
  9. Followed by: Mysterious Machine (mysterious_machine.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to kill six fungus men.", 6, 100, "Lieutenant Dawson has asked that I kill some ravenous bog slugs and fungus men for her.", 611, 1980078, 1980011, 1980079, 1980033, 1980034)
  13. AddQuestStepKill(Quest, 2, "I need to kill four ravenous bog slugs.", 4, 100, "Lieutenant Dawson has asked that I kill some ravenous bog slugs and fungus men for her.", 611, 1980089, 1980086)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledFungusMen")
  15. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledSlugs")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. conversation = CreateConversation()
  20. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_dawson/qey_adv04_bog/quests/dawson/dawson004a.mp3", "", "", 2845036711, 1744152200, Player)
  21. AddConversationOption(conversation, "Ok.")
  22. StartConversation(conversation, QuestGiver, Player, "Once you're done with that return to me.")
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. end
  26. function Step1_Complete_KilledFungusMen(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 1, "I have slain six fungus men.")
  28. if QuestIsComplete(Player, 215) then
  29. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  30. end
  31. end
  32. function Step2_Complete_KilledSlugs(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 2, "I have killed four ravenous bog slugs.")
  34. if QuestIsComplete(Player, 215) then
  35. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  36. end
  37. end
  38. function Multiple_Steps_Complete(Quest, QuestGiver, Player)
  39. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the ravenous bog slugs and the fungus men.")
  40. AddQuestStepChat(Quest, 3, "I need to return to Lieutenant Dawson near the gates to Nettleville hovel.", 1, "I need to return to Lieutenant Dawson now that I have completed her task.", 0, 1980022)
  41. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  42. end
  43. function QuestComplete(Quest, QuestGiver, Player)
  44. UpdateQuestDescription(Quest, "I have completed the small task for Lieutenant Dawson.")
  45. GiveQuestReward(Quest, Player)
  46. end
  47. function Reload(Quest, QuestGiver, Player, Step)
  48. if Step == 1 then
  49. Step1_Complete_KilledFungusMen(Quest, QuestGiver, Player)
  50. elseif Step == 2 then
  51. Step2_Complete_KilledSlugs(Quest, QuestGiver, Player)
  52. end
  53. end