9
3

freeport_alignment.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. --[[
  2. Script Name : Quests/Hallmark/freeport_alignment.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.26 12:09:30
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver: Ambassador T'Kirr (3250005)
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "I must speak with Duke Ferrin.", 1, "Duke Ferrin will arrange transport for me to Freeport.", 11, 3250003)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("Excellent! I knew you were a brave soul. First you must speak with the Duke and arrange passage to Freeport. The Overlord will cover the expenses for your journey but you must repay him for his generosity. When you reach the district where you are living, speak with the Overseer assigned to the area and he will show you to your new quarters. ")
  20. Dialog.AddVoiceover("voiceover/english/ambassador_t_kirr/tutorial_island02/ambassadortkirr008.mp3", 1533775256, 3058641435)
  21. PlayFlavor(QuestGiver,"","","agree",0,0,Player)
  22. Dialog.AddOption("Then I have no further need of you.")
  23. Dialog.Start()
  24. if not HasItem(Player,1413)then
  25. GiveQuestItem(Quest,Player,"So it shall be! This coin is given to all refugees seeking to start a life in Freeport.",1413)
  26. end
  27. Qeynos = GetFactionAmount(Player, 11)
  28. Freeport = GetFactionAmount(Player, 12)
  29. Neriak = GetFactionAmount(Player, 13)
  30. Kelethin = GetFactionAmount(Player, 14)
  31. Halas = GetFactionAmount(Player, 16)
  32. Gorowyn = GetFactionAmount(Player, 17)
  33. alignment = GetAlignment(Player)
  34. if GetRace(Player) == 0 or GetRace(Player) == 3 or GetRace(Player) == 5 or GetRace(Player) == 6 or GetRace(Player) == 9 or GetRace(Player) == 11 or GetRace(Player) == 20 then
  35. SetAlignment(Player, 0)
  36. end
  37. if Qeynos ==0 then ChangeFaction(Player, 11, -40000)
  38. end
  39. if Freeport ==0 then ChangeFaction(Player, 12, 20000)
  40. end
  41. --[[if Neriak ==0 then ChangeFaction(Player, 13, Neriak)
  42. end
  43. if Kelethin ==0 then ChangeFaction(Player, 14, Kelethin)
  44. end
  45. if Halas ==0 then ChangeFaction(Player, 16, Halas)
  46. end
  47. if Gorowyn ==0 then ChangeFaction(Player, 17, -Gorowyn)
  48. end--]]
  49. end
  50. function Declined(Quest, QuestGiver, Player)
  51. -- Add dialog here for when the quest is declined
  52. end
  53. function Deleted(Quest, QuestGiver, Player)
  54. -- Remove any quest specific items here when the quest is deleted
  55. end
  56. function Step1Complete(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 1, "I've spoken with Duke Ferrin.")
  58. UpdateQuestTaskGroupDescription(Quest, 1, "Duke Ferrin has arranged transport for me to Freeport.")
  59. Race = GetRace(Player)
  60. -- Erudite / Kerra
  61. if Race == 3 or Race == 11 then
  62. AddQuestStepChat(Quest, 2, "I must find the Overseer", 1, "I have been instructed to seek out the Overseer when I arrive in Freeport. I should ring the bell on the docks to book passage to the city.", 11, 1350116)
  63. UpdateQuestZone(Quest, "Stonestair Byway")
  64. -- Ratonga / Gnome
  65. elseif Race == 5 or Race == 13 then
  66. AddQuestStepChat(Quest, 2, "I must find the Overseer", 1, "I have been instructed to seek out the Overseer when I arrive in Freeport. I should ring the bell on the docks to book passage to the city.", 11, 1360197)
  67. UpdateQuestZone(Quest, "Temple Street")
  68. -- Human / Half Elf
  69. elseif Race == 9 or Race == 6 then
  70. AddQuestStepChat(Quest, 2, "I must find the Overseer", 1, "I have been instructed to seek out the Overseer when I arrive in Freeport. I should ring the bell on the docks to book passage to the city.", 11, 1370128)
  71. UpdateQuestZone(Quest, "Beggar's Court")
  72. -- Orge / Troll
  73. elseif Race == 12 or Race == 14 then
  74. AddQuestStepChat(Quest, 2, "I must find the Overseer", 1, "I have been instructed to seek out the Overseer when I arrive in Freeport. I should ring the bell on the docks to book passage to the city.", 11, 1340141)
  75. UpdateQuestZone(Quest, "Big Bend")
  76. -- Dark Elf / Arasai / Freeblood
  77. elseif Race == 1 or Race == 17 or Race == 19 then
  78. AddQuestStepChat(Quest, 2, "I must find the Overseer", 1, "I have been instructed to seek out the Overseer when I arrive in Freeport. I should ring the bell on the docks to book passage to the city.", 11, 1380128)
  79. UpdateQuestZone(Quest, "Longshadow Alley")
  80. -- Barbarian / Iksar / Sarnak
  81. elseif Race == 0 or Race == 10 or Race == 19 then
  82. AddQuestStepChat(Quest, 2, "I must find the Overseer", 1, "I have been instructed to seek out the Overseer when I arrive in Freeport. I should ring the bell on the docks to book passage to the city.", 11, 1390126)
  83. UpdateQuestZone(Quest, "Scale Yard")
  84. end
  85. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  86. end
  87. function QuestComplete(Quest, QuestGiver, Player)
  88. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  89. UpdateQuestStepDescription(Quest, 2, "I found the Overseer")
  90. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with the Overseer.")
  91. UpdateQuestDescription(Quest, "I've managed to make my way to the city of Freeport. Although things aren't exactly as I was promised by Ambassador T'Kirr, I will make do until I am able to forge my own destiny.")
  92. GiveQuestReward(Quest, Player)
  93. end
  94. function Reload(Quest, QuestGiver, Player, Step)
  95. if Step == 1 then
  96. Step1Complete(Quest, QuestGiver, Player)
  97. elseif Step == 2 then
  98. QuestComplete(Quest, QuestGiver, Player)
  99. end
  100. end