the_source_of_evil.lua 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. --[[
  2. Script Name : Quests/QueensColony/the_source_of_evil.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.09.05
  5. Script Purpose : Handles the quest "The Source of Evil"
  6. Zone : Queen's Colony
  7. Quest Giver: Cleric Mara'Vaen
  8. Preceded by: Joining the Forward Ranks (joining_the_forward_ranks.lua)
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "Seek Sorcerer Oofala. His camp is set up north past Dead Canyon and then east down the wall of the Abandoned Village.", 1, "Head into and around the Abandoned Village in search of Sorcerer Oofala, protector of the scout camp set up there.", 0, 2530026)
  13. AddQuestStepCompleteAction(Quest, 1, "step1_complete_talkedToSorcerer")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. if QuestGiver ~= nil then
  17. if GetDistance(Player, QuestGiver) < 30 then
  18. FaceTarget(NPC, Spawn)
  19. conversation = CreateConversation()
  20. AddConversationOption(conversation, "Thanks")
  21. StartConversation(conversation, QuestGiver, Player, "Bless you, child.")
  22. end
  23. end
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function step1_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I spoke with Sorcerer Oofala.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I spoke with Sorcerer Oofala.")
  30. AddQuestStepKill(Quest, 2, "Seek and destroy the evil totems scattered around the Abandoned Village.", 3, 100, "New information gained from goblins that survived has revealed that the goblins were victims of the evil themselves. Evil totems sprang up around their village and spread a fog that devoured all that it consumed. I need to seek and destroy the evil totems.", 861, 2530153)
  31. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedTotems")
  32. end
  33. function step2_complete_killedTotems(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I was able to find and destroy the evil totems.")
  35. UpdateQuestTaskGroupDescription(Quest, 2, "I was able to find and destroy the evil totems.")
  36. AddQuestStepChat(Quest, 3, "Return to Sorcerer Oofala.", 1, "I destroyed the totems and I should return to Sorcerer Oofala.", 0, 2530026)
  37. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToSorcerer")
  38. end
  39. function step3_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 3, "I spoke with Sorcerer Oofala.")
  41. UpdateQuestTaskGroupDescription(Quest, 3, "I spoke with Sorcerer Oofala.")
  42. --Spawn(GetZone(Player), 2530142, false, GetX(Player), GetY(Player), GetZ(Player))
  43. --Spawn the Dark Blademaster once you approach his location only if the player has a quest (zonescript)
  44. --x = 154.66 y = 1.38397 z = -178.158 heading = 349.984
  45. AddQuestStepKill(Quest, 4, "Kill the Dark Blademaster near the fog on Sapswill Hill.", 1, 100, "Oofala explained that by removing the totems, the evil has been disturbed and produced a champion to fight back. I will need to confront the Dark Blademaster. He has emerged from a tent on Sapswill Hill.", 611, 2530032)
  46. AddQuestStepCompleteAction(Quest, 4, "step4_complete_killedBlademaster")
  47. end
  48. function step4_complete_killedBlademaster(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 4, "I have slain the Dark Blademaster.")
  50. UpdateQuestTaskGroupDescription(Quest, 4, "I have slain the Dark Blademaster.")
  51. AddQuestStepChat(Quest, 5, "Return the news of my victory to Sorcerer Oofala.", 1, "I have slain the Dark Blademaster and should return to Sorcerer Oofala. I should mention the Freeport insignia that the Dark Blademaster has in his belongings.", 0, 2530026)
  52. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkedToSorcerer")
  53. end
  54. function step5_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 5, "I returned to sorcerer Oofala.")
  56. UpdateQuestTaskGroupDescription(Quest, 5, "I returned to sorcerer Oofala with the news of my victory and of the insignia that the Blademaster dropped.")
  57. AddQuestStepChat(Quest, 6, "Seek High Chieftan Grexx in the tree house east of the Abandoned Village.", 1, "Sorcerer Oofala is disturbed by the news that Freeport is involved. I need to seek out High Chieftan Grexx at his tree house to the east of the Abandoned Village.", 0, 2530038)
  58. AddQuestStepCompleteAction(Quest, 6, "step6_complete_talkedToGrexx")
  59. end
  60. function step6_complete_talkedToGrexx(Quest, QuestGiver, Player)
  61. UpdateQuestStepDescription(Quest, 6, "I have slain the Dark Blademaster.")
  62. UpdateQuestTaskGroupDescription(Quest, 6, "I have slain the Dark Blademaster.")
  63. AddQuestStepKill(Quest, 7, "Enter the cave to the northeast of the tree house and deal with the source of evil.", 1, 100, "High Chieftan Grexx has pointed out that he believes the source of evil to emanate from a cave to the northeast of his tree house. I need to head inside and confront the evil.", 611, 2540005)
  64. AddQuestStepCompleteAction(Quest, 7, "step7_complete_killedVith")
  65. end
  66. function step7_complete_killedVith(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 7, "I have slain the necromancer.")
  68. UpdateQuestTaskGroupDescription(Quest, 7, "I have slain the necromancer.")
  69. AddQuestStepChat(Quest, 8, "Return to High Chieftan Grexx.", 1, "I should return to High Chieftan Grexx and let him know that the island is saved.", 0, 2530038)
  70. AddQuestStepCompleteAction(Quest, 8, "step8_complete_talkedToGrexx")
  71. end
  72. function step8_complete_talkedToGrexx(Quest, QuestGiver, Player)
  73. UpdateQuestStepDescription(Quest, 8, "I returned to High Chieftain Grexx.")
  74. UpdateQuestTaskGroupDescription(Quest, 8, "I returned to High Chieftain Grexx.")
  75. AddQuestStepChat(Quest, 9, "Return to Murrar Shar.", 1, "I should now return to Murrar Shar with news about my victory against the necromancer.", 0, 2530076)
  76. AddQuestStepCompleteAction(Quest, 9, "questComplete")
  77. end
  78. function questComplete(Quest, QuestGiver, Player)
  79. UpdateQuestDescription(Quest, "I was able to help Sorcerer Oofala and destroyed the totems that had spread the evil into the village. Removing the totems brought forth an evil champion that I took care of as well. The Dark Blademaster had an insignia of the Freeport Militia in his belongings. Sorcerer Oofala then sent me to try and help High Chieftan Grexx at the nearby tree house as time was pressing to try and save them. High Chieftan Grexx sent me into the nearby cave to take care of the necromancer that was tainting the island. I took care of the necromancer and returned to both High Chieftan Grexx and Murrar Shar for their respective rewards.")
  80. GiveQuestReward(Quest, Player)
  81. end
  82. function Reload(Quest, QuestGiver, Player, Step)
  83. if Step == 1 then
  84. step1_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  85. elseif Step == 2 then
  86. step2_complete_killedTotems(Quest, QuestGiver, Player)
  87. elseif Step == 3 then
  88. step3_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  89. elseif Step == 4 then
  90. step4_complete_killedBlademaster(Quest, QuestGiver, Player)
  91. elseif Step == 5 then
  92. step5_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  93. elseif Step == 6 then
  94. step6_complete_talkedToGrexx(Quest, QuestGiver, Player)
  95. elseif Step == 7 then
  96. step7_complete_killedVith(Quest, QuestGiver, Player)
  97. elseif Step == 8 then
  98. step8_complete_talkedToGrexx(Quest, QuestGiver, Player)
  99. end
  100. end