9
3

clean_up.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. --]]
  11. function Init(Quest)
  12. 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, 1950086)
  13. 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, 1950085)
  14. 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, 1950084)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledGnarSok")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledChorsun")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_KilledScyn")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_charlin/qey_adv01_oakmyst/quests/charlin/charlin024b.mp3", "", "", 2171842973, 3442277052, Player)
  23. AddConversationOption(conversation, "Thank you.")
  24. StartConversation(conversation, QuestGiver, Player, "Taking them out will be a huge victory for us here, good luck.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function Step1_Complete_KilledGnarSok(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have slain Lieutenant Gnar'Sok.")
  30. if QuestIsComplete(Player, 208) then
  31. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  32. end
  33. end
  34. function Step2_Complete_KilledChorsun(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have slain Lieutenant Chorsun.")
  36. if QuestIsComplete(Player, 208) then
  37. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function Step3_Complete_KilledScyn(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have slain Lieutenant Scyn.")
  42. if QuestIsComplete(Player, 208) then
  43. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function Multiple_Steps_Complete(Quest, QuestGiver, Player)
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the three gnoll lieutenants.")
  48. 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, 1950015)
  49. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 4, "I have spoken with Lieutenant Charlin.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Lieutenant Charlin.")
  54. 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.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1_Complete_KilledGnarSok(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2_Complete_KilledChorsun(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3_Complete_KilledScyn(Quest, QuestGiver, Player)
  64. end
  65. end