9
3

aQeynosiansympathizer.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. --[[
  2. Script Name : SpawnScripts/FreeportCitizenshipTrialChamber/aQeynosiansympathizer.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.25 04:06:11
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. require "SpawnScripts/Generic/CombatModule"
  10. local BBCitizen = 5866 --Big Bend
  11. local BCCitizen = 5867 --Beggar's Court
  12. local LACitizen = 5868 --Longshadow Alley
  13. local SYCitizen = 5869 -- Scale Yard
  14. local SBCitizen = 5870 --Stonestair Byway
  15. local TSCitizen = 5871 --Temple St
  16. function spawn(NPC)
  17. combatModule(NPC, Spawn)
  18. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  19. end
  20. function InRange(NPC, Spawn)
  21. if not IsInCombat(NPC) then
  22. PlayFlavor(NPC, "","No! Please don't hurt me!", "beg", 0,0, Spawn)
  23. end
  24. end
  25. function hailed(NPC, Spawn)
  26. Dialog1(NPC, Spawn)
  27. end
  28. function respawn(NPC)
  29. spawn(NPC)
  30. end
  31. function Dialog1(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. Dialog.New(NPC, Spawn)
  34. Dialog.AddDialog("I didn't do it! They pulled me from my home! All I did was make this invention that they stole!")
  35. PlayFlavor(NPC,"","","whome",0,0,Spawn)
  36. Dialog.AddVoiceover("voiceover/english/a_qeynosian_sympathizer/fprt_sewer_epic08/falselyaccused000.mp3", 1319923328, 1248891325)
  37. Dialog.AddOption("What invention? Does it explode?", "Dialog2")
  38. Dialog.AddOption("Freeport's only mistake was accepting you as a refugee.", "Attacking")
  39. Dialog.Start()
  40. end
  41. function Dialog2(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("For the last time, gnomes didn't make Luclin explode! We would have gone with disintegration.")
  45. Dialog.AddVoiceover("voiceover/english/gnome_eco_evil_1/ft/gnome/gnome_eco_evil_1_hail_gm_3b50e81d.mp3", 269246846, 1507536385)
  46. PlayFlavor(NPC,"","","grumble",0,0,Spawn)
  47. Dialog.AddOption("Are... you sure you're a traitor?", "Dialog3")
  48. Dialog.AddOption("Another reason you should die!", "AttackTimer")
  49. Dialog.Start()
  50. end
  51. function Dialog3(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("I will prove to them that I'm not mad! If I have to kill everyone of them to prove it, I will!")
  55. Dialog.AddVoiceover("voiceover/english/gnome_eco_evil_1/ft/gnome/gnome_eco_evil_1_hail_gm_87cefc8f.mp3", 3561903619, 1901803882)
  56. PlayFlavor(NPC,"","","heckno",0,0,Spawn)
  57. Dialog.AddOption("You don't seem Qeynosian... You should get out of here.","Fail")
  58. Dialog.AddOption("The Overlord has deemed you unworthy!", "Attacking")
  59. Dialog.AddOption("Enough. Tell me where your invention is!", "AttackTimer")
  60. Dialog.Start()
  61. end
  62. function AttackTimer(NPC,Spawn)
  63. Dialog.New(NPC, Spawn)
  64. Dialog.AddDialog("You'll never steal my experiment!")
  65. Dialog.AddVoiceover("voiceover/english/gnome_base_1/ft/gnome/gnome_base_1_1_aggro_gm_7d3374f8.mp3", 671789066, 1889150438)
  66. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  67. Dialog.AddOption("...", "AttackTimer")
  68. Dialog.Start()
  69. AddTimer(NPC,2200,"Attacking",1,Spawn)
  70. end
  71. function Attacking(NPC,Spawn)
  72. CloseConversation(NPC,Spawn)
  73. SpawnSet(NPC,"attackable",1)
  74. SpawnSet(NPC,"show_level",1)
  75. AddPrimaryEntityCommand(Spawn,NPC,"",0,"")
  76. AddPrimaryEntityCommand(Spawn,NPC,"attack",10000,"attack")
  77. SendUpdateDefaultCommand(NPC,10000,"attack")
  78. Attack(NPC,Spawn)
  79. end
  80. function Fail(NPC,Spawn)
  81. PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  82. SendPopUpMessage(Spawn,"The Overlord's will must not be questioned!",255,50,50)
  83. SendMessage(Spawn,"The Overlord's will must not be questioned!","red")
  84. AddTimer(NPC,4500,"FailureExit",1,Spawn)
  85. end
  86. function aggro(NPC,Spawn)
  87. SpawnSet(NPC,"attackable",1)
  88. SpawnSet(NPC,"show_level",1)
  89. AddPrimaryEntityCommand(Spawn,NPC,"",0,"")
  90. AddPrimaryEntityCommand(Spawn,NPC,"attack",10000,"attack")
  91. SendUpdateDefaultCommand(NPC,10000,"attack")zSpawnSet(NPC,"action_state",0)
  92. end
  93. function death(NPC,Spawn)
  94. local Traitor1 = GetSpawn(NPC,1640001)
  95. local Traitor2 = GetSpawn(NPC,1640002)
  96. local Traitor3 = GetSpawn(NPC,1640018)
  97. local Traitor3 = GetSpawn(NPC,1640021)
  98. if Traitor1 == nil or not IsAlive(Traitor1) then
  99. if Traitor2 == nil or not IsAlive(Traitor2) then
  100. if Traitor3 == nil or not IsAlive(Traitor3) then
  101. if Traitor3 == nil or not IsAlive(Traitor3) then
  102. if HasQuest(Spawn,BBCitizen) then
  103. SetStepComplete(Spawn,BBCitizen,4)
  104. elseif HasQuest(Spawn,BCCitizen) then
  105. SetStepComplete(Spawn,BCCitizen,4)
  106. elseif HasQuest(Spawn,LACitizen) then
  107. SetStepComplete(Spawn,LACitizen,4)
  108. elseif HasQuest(Spawn,SYCitizen) then
  109. SetStepComplete(Spawn,SYCitizen,4)
  110. elseif HasQuest(Spawn,SBCitizen) then
  111. SetStepComplete(Spawn,SBCitizen,4)
  112. elseif HasQuest(Spawn,TSCitizen) then
  113. SetStepComplete(Spawn,TSCitizen,4)
  114. end
  115. end
  116. end
  117. end
  118. end
  119. end
  120. function victory(NPC,Spawn)
  121. AddTimer(NPC,2500,"FailureExit",1,Spawn)
  122. end
  123. function FailureExit(NPC,Spawn)
  124. CloseConversation(NPC,Spawn)
  125. Race = GetRace(Spawn)
  126. -- Erudite / Kerra
  127. if Race == 3 or Race == 11 then
  128. ZoneRef = GetZone("Stonestair")
  129. Zone(ZoneRef,Spawn,3.24, -4.37, -98.46, 185.35)
  130. -- Ratonga / Gnome
  131. elseif Race == 5 or Race == 13 then
  132. ZoneRef = GetZone("TempleSt")
  133. Zone(ZoneRef,Spawn,21.81, 2.92, 21.37, 190.87)
  134. -- Human / Half Elf
  135. elseif Race == 9 or Race == 6 then
  136. ZoneRef = GetZone("BeggarsCourt")
  137. Zone(ZoneRef,Spawn,61.07, -7.08, 111.67, 339.27)
  138. -- Orge / Troll
  139. elseif Race == 12 or Race == 14 then
  140. ZoneRef = GetZone("BigBend")
  141. Zone(ZoneRef,Spawn,94.12, -2.00, 2.53, 98)
  142. -- Dark Elf
  143. elseif Race == 1 or Race == 19 or Race == 17 then
  144. ZoneRef = GetZone("longshadow")
  145. Zone(ZoneRef,Spawn,4.22, 3.00, 71.07, 353.87)
  146. -- Barbarian / Iksar / Sarnak
  147. elseif Race == 0 or Race == 10 or Race == 18 then
  148. ZoneRef = GetZone("ScaleYard")
  149. Zone(ZoneRef,Spawn,-6.78, -5.63, -12.96, 194.63)
  150. else
  151. ZoneRef = GetZone("BeggarsCourt")
  152. Zone(ZoneRef,Spawn,58.67, -7.08, 112.61, 352.60)
  153. end
  154. end