9
3

the_source_of_evil.lua 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen014.mp3", "", "nod", 1438987592, 3801497602, Player)
  21. AddConversationOption(conversation, "Thanks")
  22. StartConversation(conversation, QuestGiver, Player, "Bless you, child.")
  23. end
  24. end
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function step1_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I spoke with Sorcerer Oofala.")
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I spoke with Sorcerer Oofala.")
  31. 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)
  32. AddQuestStepCompleteAction(Quest, 2, "step2_complete_killedTotems")
  33. end
  34. function step2_complete_killedTotems(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I was able to find and destroy the evil totems.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I was able to find and destroy the evil totems.")
  37. AddQuestStepChat(Quest, 3, "Return to Sorcerer Oofala.", 1, "I destroyed the totems and I should return to Sorcerer Oofala.", 0, 2530026)
  38. AddQuestStepCompleteAction(Quest, 3, "step3_complete_talkedToSorcerer")
  39. end
  40. function step3_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I spoke with Sorcerer Oofala.")
  42. UpdateQuestTaskGroupDescription(Quest, 3, "I spoke with Sorcerer Oofala.")
  43. --Spawn(GetZone(Player), 2530142, false, GetX(Player), GetY(Player), GetZ(Player))
  44. --Spawn the Dark Blademaster once you approach his location only if the player has a quest (zonescript)
  45. --x = 154.66 y = 1.38397 z = -178.158 heading = 349.984
  46. 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)
  47. AddQuestStepCompleteAction(Quest, 4, "step4_complete_killedBlademaster")
  48. end
  49. function step4_complete_killedBlademaster(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 4, "I have slain the Dark Blademaster.")
  51. UpdateQuestTaskGroupDescription(Quest, 4, "I have slain the Dark Blademaster.")
  52. 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)
  53. AddQuestStepCompleteAction(Quest, 5, "step5_complete_talkedToSorcerer")
  54. end
  55. function step5_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 5, "I returned to sorcerer Oofala.")
  57. UpdateQuestTaskGroupDescription(Quest, 5, "I returned to sorcerer Oofala with the news of my victory and of the insignia that the Blademaster dropped.")
  58. 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)
  59. AddQuestStepCompleteAction(Quest, 6, "step6_complete_talkedToGrexx")
  60. end
  61. function step6_complete_talkedToGrexx(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 6, "I have slain the Dark Blademaster.")
  63. UpdateQuestTaskGroupDescription(Quest, 6, "I have slain the Dark Blademaster.")
  64. 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)
  65. AddQuestStepCompleteAction(Quest, 7, "step7_complete_killedVith")
  66. end
  67. function step7_complete_killedVith(Quest, QuestGiver, Player)
  68. UpdateQuestStepDescription(Quest, 7, "I have slain the necromancer.")
  69. UpdateQuestTaskGroupDescription(Quest, 7, "I have slain the necromancer.")
  70. 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)
  71. AddQuestStepCompleteAction(Quest, 8, "step8_complete_talkedToGrexx")
  72. end
  73. function step8_complete_talkedToGrexx(Quest, QuestGiver, Player)
  74. UpdateQuestStepDescription(Quest, 8, "I returned to High Chieftain Grexx.")
  75. UpdateQuestTaskGroupDescription(Quest, 8, "I returned to High Chieftain Grexx.")
  76. 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)
  77. AddQuestStepCompleteAction(Quest, 9, "questComplete")
  78. end
  79. function questComplete(Quest, QuestGiver, Player)
  80. 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.")
  81. GiveQuestReward(Quest, Player)
  82. end
  83. function Reload(Quest, QuestGiver, Player, Step)
  84. if Step == 1 then
  85. step1_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  86. elseif Step == 2 then
  87. step2_complete_killedTotems(Quest, QuestGiver, Player)
  88. elseif Step == 3 then
  89. step3_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  90. elseif Step == 4 then
  91. step4_complete_killedBlademaster(Quest, QuestGiver, Player)
  92. elseif Step == 5 then
  93. step5_complete_talkedToSorcerer(Quest, QuestGiver, Player)
  94. elseif Step == 6 then
  95. step6_complete_talkedToGrexx(Quest, QuestGiver, Player)
  96. elseif Step == 7 then
  97. step7_complete_killedVith(Quest, QuestGiver, Player)
  98. elseif Step == 8 then
  99. step8_complete_talkedToGrexx(Quest, QuestGiver, Player)
  100. end
  101. end