9
3

clean_up.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : Quests/Oakmyst/clean_up.lua
  3. Script Purpose : Handles the quest, "Clean Up"
  4. Script Author : Scatman
  5. Script Date : 2009.10.08
  6. Zone : Oakmyst Forest
  7. Quest Giver: Lieutenant Charlin
  8. Preceded by: An Important Meeting (an_important_meeting.lua)
  9. Followed by: Reinforcements (reinforcements.lua)
  10. Modified : 5/6/2020
  11. by : Ememjr
  12. Notes : updated spawn ID's and quest id's
  13. --]]
  14. function Init(Quest)
  15. AddQuestStepKill(Quest, 1, "I need to kill Lieutenant Gnar'Sok. I can find him hiding in an alcove just northwest of The Western Falls.", 1, 100, "I need to take out the remaining gnoll lieutenants.", 1220, 1950066)
  16. AddQuestStepKill(Quest, 2, "I need to kill Lieutenant Chorsun. The path west from Lieutenant Charlin leads to him if I turn north before passing under the bridge.", 1, 100, "I need to take out the remaining gnoll lieutenants.", 1220, 1950038)
  17. AddQuestStepKill(Quest, 3, "I need to kill Lieutenant Scyn. He is hiding on a rocky hill southeast of Clearwater Pond.", 1, 100, "I need to take out the remaining gnoll lieutenants.", 1220, 1950067)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledGnarSok")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledChorsun")
  20. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_KilledScyn")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. FaceTarget(QuestGiver, Player)
  24. conversation = CreateConversation()
  25. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_charlin/qey_adv01_oakmyst/quests/charlin/charlin024b.mp3", "", "", 2171842973, 3442277052, Player)
  26. AddConversationOption(conversation, "Thank you.")
  27. StartConversation(conversation, QuestGiver, Player, "Taking them out will be a huge victory for us here, good luck.")
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Step1_Complete_KilledGnarSok(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have slain Lieutenant Gnar'Sok.")
  33. if QuestIsComplete(Player, 211) then
  34. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  35. end
  36. end
  37. function Step2_Complete_KilledChorsun(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have slain Lieutenant Chorsun.")
  39. if QuestIsComplete(Player, 211) then
  40. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  41. end
  42. end
  43. function Step3_Complete_KilledScyn(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I have slain Lieutenant Scyn.")
  45. if QuestIsComplete(Player, 211) then
  46. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  47. end
  48. end
  49. function Multiple_Steps_Complete(Quest, QuestGiver, Player)
  50. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the three gnoll lieutenants.")
  51. AddQuestStepChat(Quest, 4, "I need to return to Lieutenant Charlin.", 1, "I need to bring the news of the slain lieutenants back to Lieutenant Charlin.", 0, 1950008)
  52. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  53. end
  54. function QuestComplete(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 4, "I have spoken with Lieutenant Charlin.")
  56. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Lieutenant Charlin.")
  57. UpdateQuestDescription(Quest, "I have slain all three of the gnoll lieutenants. With their deaths the Oakmyst Forest should be free of gnollish corruption for some time.")
  58. GiveQuestReward(Quest, Player)
  59. end
  60. function Reload(Quest, QuestGiver, Player, Step)
  61. if Step == 1 then
  62. Step1_Complete_KilledGnarSok(Quest, QuestGiver, Player)
  63. elseif Step == 2 then
  64. Step2_Complete_KilledChorsun(Quest, QuestGiver, Player)
  65. elseif Step == 3 then
  66. Step3_Complete_KilledScyn(Quest, QuestGiver, Player)
  67. end
  68. end