9
3

preventative_maintenance.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : Quests/OutpostOverlord/preventative_maintenance.lua
  3. Script Purpose : Handles the quest, "Preventative Maintenance"
  4. Script Author : Scatman (Updted by Cynnar 2018.09.22 02:25:24)
  5. Script Date : 2008.09.07
  6. Zone : Outpost of the Overlord
  7. Quest Giver: Tayil N'Velex
  8. Preceded by: Seaside Stew (seaside_stew.lua)
  9. Followed by: Disruption for Distraction (disruption_for_distraction.lua)
  10. Issues: Issue with quest helper after killing wilderbears
  11. Issues: after killing the final wilderbear it does not update the quest helper
  12. --]]
  13. local AssassinVamir = 2780073
  14. local HawkBait = 8060
  15. function Init(Quest)
  16. -- A Note from Tayil
  17. -- Freeportian Cloth Hood
  18. -- Freeportian Leather Cap
  19. -- Freeportian Plated Coif
  20. -- Freeportian Studded Helm
  21. AddQuestStepChat(Quest, 1, "Talk to Assassin Vamir at the camp in western Seaside Glade.", 1, "I need to find Assassin Vamir in western Seaside Glade. He should have a mission for me.", 0, AssassinVamir)
  22. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkedToVamir")
  23. end
  24. function Accepted(Quest, QuestGiver, Player)
  25. if QuestGiver ~= nil then
  26. if GetDistance(Player, QuestGiver) < 30 then
  27. FaceTarget(QuestGiver, Player)
  28. conversation = CreateConversation()
  29. AddConversationOption(conversation, "Thank you.")
  30. StartConversation(conversation, QuestGiver, Player, "Assassin Vamir will explain the details. Good luck.")
  31. end
  32. end
  33. end
  34. function Declined(Quest, QuestGiver, Player)
  35. end
  36. function step1_complete_talkedToVamir(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 1, "I reported to Assassin Vamir and was given my first task.")
  38. UpdateQuestTaskGroupDescription(Quest, 1, "I reported to Assassin Vamir and was given my first task.")
  39. AddQuestStepKill(Quest, 2, "Kill wilderbears. They can be found north in the Wilderwood, or west in Cliffdiver Canyon.", 4, 100, "To prevent the Tunarians from recruiting more animals once the attack has begun, I need to take out the animals they use. Bears are up first on the list. I can find bears north up the slope in the Wilderwood, or west in Cliffdiver Canyon.", 611, 2780071, 2780069, 2780080)
  40. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedBears")
  41. end
  42. function step2_complete_killedBears(Quest, QuestGiver, Player)
  43. --UpdateQuestStepDescription(Quest, 2, "I killed enough bears and I should return to Assassin Vamir at the camp in Seaside Glade.")
  44. UpdateQuestTaskGroupDescription(Quest, 2, "I killed enough bears to hopefully thwart any training attempts.")
  45. AddQuestStepChat(Quest, 3, "Return to Assassin Vamir.", 1, "I killed enough bears and I should return to Assassin Vamir at the camp in Seaside Glade.", 0, AssassinVamir)
  46. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToVamir")
  47. end
  48. function step3_complete_talkedToVamir(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 3, "I returned to Assassin Vamir.")
  50. UpdateQuestTaskGroupDescription(Quest, 3, "I returned to Assassin Vamir.")
  51. --while HasItem(Player, HawkBait) < 5 then
  52. SummonItem(Player, HawkBait)
  53. SummonItem(Player, HawkBait)
  54. SummonItem(Player, HawkBait)
  55. SummonItem(Player, HawkBait)
  56. SummonItem(Player, HawkBait)
  57. -- temporary
  58. --SpawnMob(GetZone(Player), 2780144, false, GetX(Player), GetY(Player), GetZ(Player))
  59. --SpawnMob(GetZone(Player), 2780144, false, GetX(Player) + 5, GetY(Player), GetZ(Player) + 5)
  60. --SpawnMob(GetZone(Player), 2780144, false, GetX(Player) + 10, GetY(Player), GetZ(Player) + 10)
  61. AddQuestStepKill(Quest, 4, "Lure down hawks to kill in Cliffdiver Canyon to the west. I must examine and then release a mole rat in my inventory as bait when I'm in position under a hawk.", 3, 100, "I now need to kill hawks. Vamir gave me some mole rats to use as bait to lure down the hawks that perch high above the cliffs. When I am in position, I need to examine the mole rats in my inventory and then release one. Hopefully it works to lure down the hawks so I can take them out.", 611, 2780077, 2780109)
  62. AddQuestStepCompleteAction(Quest, 4, "step4_complete_killedHawks")
  63. end
  64. function step4_complete_killedHawks(Quest, QuestGiver, Player)
  65. UpdateQuestStepDescription(Quest, 4, "I used the mole rats to lure down some hawks and take them out.")
  66. UpdateQuestTaskGroupDescription(Quest, 4, "I used the mole rats to lure down some hawks and take them out.")
  67. AddQuestStepChat(Quest, 5, "Return to Assassin Vamir.", 1, "I've killed enough hawks and should now return to Assassin Vamir.", 0, AssassinVamir)
  68. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkedToVamir")
  69. end
  70. function step5_complete_talkedToVamir(Quest, QuestGiver, Player)
  71. -- GIVE ANOTHER QUEST REWARD ITEM, <a note from Tayil>, WHICH GIVES THE NEXT QUEST IN THIS SERIES
  72. UpdateQuestDescription(Quest, "I reported to Assassin Vamir in Seaside Glade. It turns out the Tunarians on the island are masters of the animals here. To prevent them from gaining extra recruits when the attack happens, I helped to thin out the bears and hawks that they might use. I returned to Tayil after my missions with Vamir were complete and was rewarded.")
  73. GiveQuestReward(Quest, Player)
  74. end
  75. function Reload(Quest, QuestGiver, Player, Step)
  76. if Step == 1 then
  77. step1_complete_talkedToVamir(Quest, QuestGiver, Player)
  78. elseif Step == 2 then
  79. step2_complete_killedBears(Quest, QuestGiver, Player)
  80. elseif Step == 3 then
  81. step3_complete_talkedToVamir(Quest, QuestGiver, Player)
  82. elseif Step == 4 then
  83. step4_complete_killedHawks(Quest, QuestGiver, Player)
  84. elseif Step == 5 then
  85. step5_complete_talkedToVamir(Quest, QuestGiver, Player)
  86. end
  87. end
  88. function Deleted(Quest, QuestGiver, Player)
  89. end