9
3

a_citizens_request.lua 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : Quests/Oakmyst/a_citizens_request.lua
  3. Script Purpose : Handles the quest, "A Citizen's Request"
  4. Script Author : Scatman
  5. Script Date : 2009.05.03
  6. Zone : Oakmyst Forest
  7. Quest Giver: Lieutenant Charlin
  8. Preceded by: Cause for Investigation (cause_for_investigation.lua)
  9. Followed by: An Important Meeting (an_important_meeting.lua)
  10. Modified :5/6/2020
  11. Modified by: Ememjr
  12. Notes : Updated NPC ID's
  13. --]]
  14. function Init(Quest)
  15. AddQuestStepChat(Quest, 1, "I need to speak with Bardrian Vorsuth on the docks in western Oakmyst Forest.", 1, "Lieutenant Charlin has asked that I head to the docks in Oakmyst Forest on his behalf.", 0, 1950060)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeWithBardrian")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. FaceTarget(QuestGiver, Player)
  20. conversation = CreateConversation()
  21. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_charlin/qey_adv01_oakmyst/quests/charlin/charlin011a.mp3", "", "", 3187068134, 4200320763, Player)
  22. AddConversationOption(conversation, "I'll return with his information.")
  23. StartConversation(conversation, QuestGiver, Player, "Bring his news back to me. We'll add it to what we've already got.")
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function Step1_Complete_SpokeWithBardrian(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I have spoken with Bardrian Vorsuth.")
  29. AddQuestStepChat(Quest, 2, "I need to bring the news of the machine back to Lieutenant Charlin.", 1, "Lieutenant Charlin has asked that I head to the docks in Oakmyst Forest on his behalf.", 0, 1950008)
  30. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeWithCharlin")
  31. end
  32. function Step2_Complete_SpokeWithCharlin(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 2, "I have spoken with Lieutenant Charlin.")
  34. AddQuestStep(Quest, 3, "Lieutenant Charlin has asked that I search Oakmyst Forest thoroughly for another machine like the one found on the docks. I should check near water.", 1, 100, "Lieutenant Charlin has asked that I head to the docks in Oakmyst Forest on his behalf.", 0)
  35. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_FoundMachine")
  36. end
  37. function Step3_Complete_FoundMachine(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 3, "I have found another machine.")
  39. AddQuestStepChat(Quest, 4, "I need to tell Lieutenant Charlin of my find.", 1, "Lieutenant Charlin has asked that I head to the docks in Oakmyst Forest on his behalf.", 0, 1950008)
  40. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  41. end
  42. function QuestComplete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 4, "I have spoken to Lieutenant Charlin.")
  44. UpdateQuestTaskGroupDescription(Quest, 1, "I have found a mysterious machine in Oakmyst Forest.")
  45. UpdateQuestDescription(Quest, "I found some sort of machinery that someone had set up in Oakmyst Forest. Though its purpose was not clear it was done so covertly and as such was probably an attempt of some sort of environmental sabotage.")
  46. GiveQuestReward(Quest, Player)
  47. end
  48. function Reload(Quest, QuestGiver, Player, Step)
  49. if Step == 1 then
  50. Step1_Complete_SpokeWithBardrian(Quest, QuestGiver, Player)
  51. elseif Step == 2 then
  52. Step2_Complete_SpokeWithCharlin(Quest, QuestGiver, Player)
  53. elseif Step == 3 then
  54. Step3_Complete_FoundMachine(Quest, QuestGiver, Player)
  55. end
  56. end