9
3

qeynos_alignment.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. --[[
  2. Script Name : qeynos_alignment.lua
  3. Script Purpose : Handles the quest, "Qeynos Alignment"
  4. Script Author : Dorbin
  5. Script Date : 8/29/2022
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Hallmark
  8. Quest Giver : Ambassador Saera (3250004)
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepChat(Quest, 1, "I must speak with Duke Ferrin.", 1, "Duke Ferrin will arrange transport for me to Qeynos.", 11, 3250003)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Splendid! You must speak to Duke Ferrin about leaving the island. Once you arrive to your appointed village, find a steward. He will guide you to your new home, and give you further instructions. Do you have any other questions?")
  21. Dialog.AddVoiceover("voiceover/english/ambassador_saera/tutorial_island02/ambassadorsaera006.mp3", 2295776297, 2824040451)
  22. PlayFlavor(QuestGiver,"","","curtsey",0,0,Player)
  23. Dialog.AddOption("No, I believe I'm all set. Thanks!")
  24. Dialog.Start()
  25. if not HasItem(Player,1414)then
  26. GiveQuestItem(Quest,Player,"Congratulations! This coin is given to all refugees seeking to start a life in Qeynos.",1414)
  27. end
  28. Qeynos = GetFactionAmount(Player, 11)
  29. Freeport = GetFactionAmount(Player, 12)
  30. Neriak = GetFactionAmount(Player, 13)
  31. Kelethin = GetFactionAmount(Player, 14)
  32. Halas = GetFactionAmount(Player, 16)
  33. Gorowyn = GetFactionAmount(Player, 17)
  34. alignment = GetAlignment(Player)
  35. if alignment ~= 1 then
  36. SetAlignment(Player, 1)
  37. end
  38. if Qeynos ==0 then ChangeFaction(Player, 11, 20000)
  39. end
  40. if Freeport ==0 then ChangeFaction(Player, 12, -40000)
  41. end
  42. --[[if Neriak ==0 then ChangeFaction(Player, 13, Neriak)
  43. end
  44. if Kelethin ==0 then ChangeFaction(Player, 14, Kelethin)
  45. end
  46. if Halas ==0 then ChangeFaction(Player, 16, Halas)
  47. end
  48. if Gorowyn ==0 then ChangeFaction(Player, 17, -Gorowyn)
  49. end--]]
  50. end
  51. function Declined(Quest, QuestGiver, Player)
  52. -- Add dialog here for when the quest is declined
  53. end
  54. function Deleted(Quest, QuestGiver, Player)
  55. -- Remove any quest specific items here when the quest is deleted
  56. end
  57. function Step1Complete(Quest, QuestGiver, Player)
  58. UpdateQuestStepDescription(Quest, 1, "I spoke with Duke Ferrin.")
  59. UpdateQuestTaskGroupDescription(Quest, 1, "Duke Ferrin has arranged transport for me to Qeynos.")
  60. Race = GetRace(Player)
  61. -- Human / Kerra
  62. if Race == 9 then
  63. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2330170,2340166)
  64. UpdateQuestZone(Quest, "Multiple Zones")
  65. elseif Race == 11 then
  66. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2330170)
  67. UpdateQuestZone(Quest, "Nettleville")
  68. -- Erudite
  69. elseif Race == 3 then
  70. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2340166)
  71. UpdateQuestZone(Quest, "Starcrest")
  72. -- Barbarian / Dwarf
  73. elseif Race == 0 or Race == 2 then
  74. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2350184)
  75. UpdateQuestZone(Quest, "Graystone Yard")
  76. -- High Elf / Froglok
  77. elseif Race == 4 or Race == 8 then
  78. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2360174)
  79. UpdateQuestZone(Quest, "Castleview")
  80. -- Half Elf / Wood Elf / Fae
  81. elseif Race == 6 or Race == 15 or Race == 16 then
  82. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2370111)
  83. UpdateQuestZone(Quest, "Willow Wood")
  84. -- Gnome / Halfling
  85. elseif Race == 5 or Race == 7 then
  86. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2380173)
  87. UpdateQuestZone(Quest, "Baubbleshire")
  88. else
  89. AddQuestStepChat(Quest, 2, "I must find the Steward", 1, "I have been instructed to seek out the Steward when I arrive in Qeynos. I should ring the bell on the docks to book passage to the city.", 11, 2330170)
  90. UpdateQuestZone(Quest, "Nettleville")
  91. end
  92. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  93. end
  94. function QuestComplete(Quest, QuestGiver, Player)
  95. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  96. UpdateQuestStepDescription(Quest, 2, "I found the Steward")
  97. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with the Steward.")
  98. UpdateQuestDescription(Quest, "I have successfully arrived in Qeynos and gotten situated here. I would prefer better quarters, and to live in the city, but I suppose I'll have to work towards that on my own.")
  99. GiveQuestReward(Quest, Player)
  100. end
  101. function Reload(Quest, QuestGiver, Player, Step)
  102. if Step == 1 then
  103. Step1Complete(Quest, QuestGiver, Player)
  104. elseif Step == 2 then
  105. QuestComplete(Quest, QuestGiver, Player)
  106. end
  107. end