a_presence_of_evil.lua 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : Quests/QueensColony/a_presence_of_evil.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.07.30
  5. Script Purpose : Handles the quest, "A Presence of Evil"
  6. Modified : 2017.04.17
  7. Modified by: Ememjr
  8. Note : Quest step 3 complete changed from AddQuestStep to AddQuestStepChat, was causing a quest listing error in journal
  9. Zone : The Queen's Colony
  10. Quest Giver: Murrar Shar
  11. Preceded by: The Art of Combat
  12. Followed by: Into the Tainted Forest
  13. --]]
  14. function Init(Quest)
  15. AddQuestStepChat(Quest, 1, "Report to Sergeant Haggus outside the west archway.", 1, "I need to report to Sergeant Haggus outside the west archway. He should have some tasks for me to help the colony.", 0, 2530078)
  16. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkToHaggus")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. if QuestGiver ~= nil then
  20. if GetDistance(Player, QuestGiver) < 30 then
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar032.mp3", "", "", 80247345, 2680267873, Player)
  24. AddConversationOption(conversation, "Thanks.")
  25. StartConversation(conversation, QuestGiver, Player, "Good luck, " .. GetName(Player) .. ".")
  26. end
  27. end
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function step1_complete_talkToHaggus(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I reported to Sergeant Haggus and have been assigned my first duty.")
  33. UpdateQuestTaskGroupDescription(Quest, 1, "I reported to Sergeant Haggus and have been assigned my first duty.")
  34. AddQuestStepKill(Quest, 2, "Kill tainted Sapswill invaders. They are attacking the barricades.", 3, 100, "Sergeant Haggus and the other defenders need help defending the colony. I should help fend off the attacking goblin horder.", 611, 2530085)
  35. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedInvaders")
  36. end
  37. function step2_complete_killedInvaders(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I was able to help fend off the attacking goblins.")
  39. UpdateQuestTaskGroupDescription(Quest, 2, "I was able to help fend off the attacking goblins.")
  40. AddQuestStepChat(Quest, 3, "Return to Sergeant Haggus.", 1, "I helped defend the colony and should return to Segeant Haggus to see if there is anything else I can do.", 0, 2530078)
  41. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkToHaggus")
  42. end
  43. function step3_complete_talkToHaggus(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I returned to Sergeant Haggus.")
  45. UpdateQuestTaskGroupDescription(Quest, 3, "I returned to Sergeant Haggus.")
  46. AddQuestStepChat(Quest, 4, "I should search past the barricades in Sunset Meadow for signs of the missing soldiers.", 1, "Sergeant Haggus has sent me to find out about some missing soldiers that have not returned. I should look for any sign of the missing soldiers in Sunset Meadow.", 220)
  47. AddQuestStepCompleteAction(Quest, 4, "step4_complete_foundDeadSoldier")
  48. end
  49. function step4_complete_foundDeadSoldier(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 4, "The missing soldiers were dead. Even worse, their remains seemed to rise from the dead and attack me as if controlled by some diabolical force.")
  51. UpdateQuestTaskGroupDescription(Quest, 4, "The missing soldiers were dead. Even worse, their remains seemed to rise from the dead and attack me as if controlled by some diabolical force.")
  52. SpawnMob(GetZone(Player), 2530174, false, GetX(Player), GetY(Player), GetZ(Player))
  53. -- SpawnMob(GetZone(Player), 2530223, false, GetX(Player), GetY(Player), GetZ(Player))
  54. AddQuestStepChat(Quest, 5, "Report the bad news to Sergeant Haggus.", 1, "I need to report back to Sergeant Haggus with this grim information.", 0, 2530078)
  55. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkToHaggus")
  56. end
  57. function step5_complete_talkToHaggus(Quest, QuestGiver, Player)
  58. UpdateQuestStepDescription(Quest, 5, "I reported to Sergeant Haggus that his missing soldiers are dead.")
  59. UpdateQuestTaskGroupDescription(Quest, 5, "I reported to Sergeant Haggus that his missing soldiers are dead.")
  60. AddQuestStepChat(Quest, 6, "Take this information back to Murrar Shar.", 1, "Sergeant Haggus would like me to take this information back to Murrar Shar.", 0, 2530076)
  61. AddQuestStepCompleteAction(Quest, 6, "quest_complete")
  62. end
  63. function quest_complete(Quest, QuestGiver, Player)
  64. UpdateQuestDescription(Quest, "I reported to Sergeant Haggus and helped out at the barricades. The goblins were relentless, but I was able to help fend them off. It was a sad sight to see the soldier that had been killed, but the information I collected should prove useful to the colony.")
  65. GiveQuestReward(Quest, Player)
  66. end
  67. function Reload(Quest, QuestGiver, Player, Step)
  68. if Step == 1 then
  69. step1_complete_talkToHaggus(Quest, QuestGiver, Player)
  70. elseif Step == 2 then
  71. step2_complete_killedInvaders(Quest, QuestGiver, Player)
  72. elseif Step == 3 then
  73. step3_complete_talkToHaggus(Quest, QuestGiver, Player)
  74. elseif Step == 4 then
  75. step4_complete_foundDeadSoldier(Quest, QuestGiver, Player)
  76. elseif Step == 5 then
  77. step5_complete_talkToHaggus(Quest, QuestGiver, Player)
  78. end
  79. end