on_the_move.lua 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : Quests/PeatBog/on_the_move.lua
  3. Script Purpose : Handles the quest, "On the Move"
  4. Script Author : Scatman
  5. Script Date : 2009.05.10
  6. Zone : The Peat Bog
  7. Quest Giver: Lieutenant Dawson
  8. Preceded by: Ambushed (ambushed.lua)
  9. Followed by: A Final Foe (a_final_foe.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep(Quest, 1, "I need to destroy the first machine.", 1, 100, "I need to kill the gnolls that are attempting to bring the three machines out of the Peat Bog.", 0)
  13. AddQuestStep(Quest, 2, "I need to destroy the second machine.", 1, 100, "I need to kill the gnolls that are attempting to bring the three machines out of the Peat Bog.", 0)
  14. AddQuestStep(Quest, 3, "I need to destroy the third machine.", 1, 100, "I need to kill the gnolls that are attempting to bring the three machines out of the Peat Bog.", 0)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_Machine1")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_Machine2")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_Machine3")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_dawson/qey_adv04_bog/quests/dawson/dawson011a.mp3", "", "", 3239354610, 1196418998, Player)
  23. AddConversationOption(conversation, "You're welcome, and thank you.")
  24. StartConversation(conversation, QuestGiver, Player, "Thank you for your help, be safe.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Step1_Complete_Machine1(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "The first machine has been destroyed.")
  30. if QuestIsComplete(Player, 218) then
  31. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  32. end
  33. end
  34. function Step2_Complete_Machine2(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "The second machine has been destroyed.")
  36. if QuestIsComplete(Player, 218) then
  37. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function Step3_Complete_Machine3(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "The third machine has been destroyed.")
  42. if QuestIsComplete(Player, 218) then
  43. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function Multiple_Steps_Complete(Quest, QuestGiver, Player)
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I have killed the gnolls moving the machines.")
  48. AddQuestStepChat(Quest, 4, "I need to return to Lieutenant Dawson.", 1, "Now that the gnolls guarding the machines have been killed I should return to Lieutenant Dawson.", 0, 1980022)
  49. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. UpdateQuestDescription(Quest, "I have killed the gnolls were trying to get the machines out of the Peat Bog.")
  53. GiveQuestReward(Quest, Player)
  54. end
  55. function Reload(Quest, QuestGiver, Player, Step)
  56. if Step == 1 then
  57. Step1_Complete_Machine1(Quest, QuestGiver, Player)
  58. elseif Step == 2 then
  59. Step2_Complete_Machine2(Quest, QuestGiver, Player)
  60. elseif Step == 3 then
  61. Step3_Complete_Machine3(Quest, QuestGiver, Player)
  62. end
  63. end