a_citizens_request.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. --]]
  11. function Init(Quest)
  12. 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, 1950082)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeWithBardrian")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_charlin/qey_adv01_oakmyst/quests/charlin/charlin011a.mp3", "", "", 3187068134, 4200320763, Player)
  19. AddConversationOption(conversation, "I'll return with his information.")
  20. StartConversation(conversation, QuestGiver, Player, "Bring his news back to me. We'll add it to what we've already got.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. end
  24. function Step1_Complete_SpokeWithBardrian(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have spoken with Bardrian Vorsuth.")
  26. 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, 1950015)
  27. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeWithCharlin")
  28. end
  29. function Step2_Complete_SpokeWithCharlin(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "I have spoken with Lieutenant Charlin.")
  31. 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)
  32. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_FoundMachine")
  33. end
  34. function Step3_Complete_FoundMachine(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 3, "I have found another machine.")
  36. 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, 1950015)
  37. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  38. end
  39. function QuestComplete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 4, "I have spoken to Lieutenant Charlin.")
  41. UpdateQuestTaskGroupDescription(Quest, 1, "I have found a mysterious machine in Oakmyst Forest.")
  42. 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.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. Step1_Complete_SpokeWithBardrian(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. Step2_Complete_SpokeWithCharlin(Quest, QuestGiver, Player)
  50. elseif Step == 3 then
  51. Step3_Complete_FoundMachine(Quest, QuestGiver, Player)
  52. end
  53. end