a_clear_understanding.lua 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : Quests/LongshadowAlley/a_clear_understanding.lua
  3. Script Purpose : Handles the quest, "A Clear Understanding"
  4. Script Author : Scatman
  5. Script Date : 2009.04.07
  6. Zone : Longshadow Alley
  7. Quest Giver: Aldera V'Exxa
  8. Preceded by: None
  9. Followed by: A Lesson to Learn (a_lesson_to_learn.lua)
  10. --]]
  11. -- Quest ID's
  12. local A_CLEAR_UNDERSTANDING = 335
  13. function Init(Quest)
  14. AddQuestStepLocation(Quest, 1, "I need to make my way to the Destroyed Knowledge Portal in the center of Longshadow Alley.", 10, "I need to become familiar with Longshadow Alley.", 0, 0, 2.07, 0)
  15. AddQuestStepLocation(Quest, 2, "Access to North Freeport is via the city gate.", 20, "I need to become familiar with Longshadow Alley.", 0, 13.52, 4.02, 65.42)
  16. AddQuestStepLocation(Quest, 3, "There is an entrance to Thieves' Way within an elevated manhole west of the Destroyed Knowledge Portal.", 10, "I need to become familiar with Longshadow Alley.", 0, 43.82, -0.87, -23.08)
  17. AddQuestStepLocation(Quest, 4, "Some exits are not by land, they are by water. Examine the bells on the dock in Longshadow Alley.", 10, "I need to become familiar with Longshadow Alley.", 0, -49.75, -4.67, -82.32)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_Portal")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_Gate")
  20. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_Sewer")
  21. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_Bells")
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. conversation = CreateConversation()
  26. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/aldera_v_exxa/fprt_hood05/quests/alderavexxa/aldera_x1_020.mp3", "", "", 4155318250, 3441039640, Player)
  27. AddConversationOption(conversation, "I will.")
  28. StartConversation(conversation, QuestGiver, Player, "In the center of the city is the Knowledge Portal, now destroyed. The majority of the vendors have set up shop near the Portal, including the Armor Shop and the Freeport Reserve bank. It is wise to know where the exits to our neighborhood are as well -- both gates and grates. Become familiar with the layout, then return to me.")
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. end
  32. function Step1_Complete_Portal(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I've seen the Destroyed Knowledge Portal.")
  34. if QuestIsComplete(Player, A_CLEAR_UNDERSTANDING) then
  35. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  36. end
  37. end
  38. function Step2_Complete_Gate(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 2, "I've located the exit to North Freeport.")
  40. if QuestIsComplete(Player, A_CLEAR_UNDERSTANDING) then
  41. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  42. end
  43. end
  44. function Step3_Complete_Sewer(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 3, "I've located the entrance to the Thieves' Way.")
  46. if QuestIsComplete(Player, A_CLEAR_UNDERSTANDING) then
  47. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  48. end
  49. end
  50. function Step4_Complete_Bells(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 4, "I've taken a look around the dock.")
  52. if QuestIsComplete(Player, A_CLEAR_UNDERSTANDING) then
  53. Multiple_Steps_Complete(Quest, QuestGiver, Player)
  54. end
  55. end
  56. function Multiple_Steps_Complete(Quest, QuestGiver, Player)
  57. UpdateQuestTaskGroupDescription(Quest, 1, "I've visited the Portal of Knowledge and have seen the exits from this neighborhood.")
  58. AddQuestStepChat(Quest, 5, "I will find Aldera V'Exxa near Longshadow Alley's dock.", 1, "Now that I have become familiar with Longshadow Alley, I should return to Aldera V'Exxa at the dock.", 0, 1380006)
  59. AddQuestStepCompleteAction(Quest, 5, "Quest_Complete")
  60. end
  61. function Quest_Complete(Quest, QuestGiver, Player)
  62. UpdateQuestDescription(Quest, "There are many ways in and out of Longshadow Alley and I am now familiar with them all. Being aware of all that can happen around one is vital to the Teir'Dal.")
  63. GiveQuestReward(Quest, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if Step == 1 then
  67. Step1_Complete_Portal(Quest, QuestGiver, Player)
  68. elseif Step == 2 then
  69. Step2_Complete_Gate(Quest, QuestGiver, Player)
  70. elseif Step == 3 then
  71. Step3_Complete_Sewer(Quest, QuestGiver, Player)
  72. elseif Step == 4 then
  73. Step4_Complete_Bells(Quest, QuestGiver, Player)
  74. end
  75. end