a_presence_of_evil.lua 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 erroro 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. AddConversationOption(conversation, "Thanks.")
  24. StartConversation(conversation, QuestGiver, Player, "Good luck, " .. GetName(Player) .. ".")
  25. end
  26. end
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function step1_complete_talkToHaggus(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I reported to Sergeant Haggus and have been assigned my first duty.")
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I reported to Sergeant Haggus and have been assigned my first duty.")
  33. 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)
  34. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedInvaders")
  35. end
  36. function step2_complete_killedInvaders(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I was able to help fend off the attacking goblins.")
  38. UpdateQuestTaskGroupDescription(Quest, 2, "I was able to help fend off the attacking goblins.")
  39. 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)
  40. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkToHaggus")
  41. end
  42. function step3_complete_talkToHaggus(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 3, "I returned to Sergeant Haggus.")
  44. UpdateQuestTaskGroupDescription(Quest, 3, "I returned to Sergeant Haggus.")
  45. 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)
  46. AddQuestStepCompleteAction(Quest, 4, "step4_complete_foundDeadSoldier")
  47. end
  48. function step4_complete_foundDeadSoldier(Quest, QuestGiver, Player)
  49. 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.")
  50. 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.")
  51. SpawnMob(GetZone(Player), 2530174, false, GetX(Player), GetY(Player), GetZ(Player))
  52. 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)
  53. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkToHaggus")
  54. end
  55. function step5_complete_talkToHaggus(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 5, "I reported to Sergeant Haggus that his missing soldiers are dead.")
  57. UpdateQuestTaskGroupDescription(Quest, 5, "I reported to Sergeant Haggus that his missing soldiers are dead.")
  58. 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)
  59. AddQuestStepCompleteAction(Quest, 6, "quest_complete")
  60. end
  61. function quest_complete(Quest, QuestGiver, Player)
  62. 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.")
  63. GiveQuestReward(Quest, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if Step == 1 then
  67. step1_complete_talkToHaggus(Quest, QuestGiver, Player)
  68. elseif Step == 2 then
  69. step2_complete_killedInvaders(Quest, QuestGiver, Player)
  70. elseif Step == 3 then
  71. step3_complete_talkToHaggus(Quest, QuestGiver, Player)
  72. elseif Step == 4 then
  73. step4_complete_foundDeadSoldier(Quest, QuestGiver, Player)
  74. elseif Step == 5 then
  75. step5_complete_talkToHaggus(Quest, QuestGiver, Player)
  76. end
  77. end