aFreeportpartisan.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Script Name : SpawnScripts/QeynosCitizenshipTrialChamber/aFreeportpartisan.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.31 05:08:02
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local BBQCitizen = 5718
  10. local CVQCitizen = 5719
  11. local GQCitizen = 5720
  12. local NQCitizen = 5721
  13. local SCQCitizen = 5722
  14. local WWQCitizen = 5723
  15. function spawn(NPC)
  16. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  17. end
  18. function InRange(NPC, Spawn)
  19. PlayFlavor(NPC, "","Hello, friend. You look like a sensible Qeynosian!", "", 0,0, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. Dialog1(NPC, Spawn)
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function Dialog1(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. PlayAnimation(NPC,"539")
  30. Dialog.New(NPC, Spawn)
  31. Dialog.AddDialog("Qeynos has all our exits blocked, but perhaps you can find a way to get me through!")
  32. Dialog.AddVoiceover("voiceover/english/a_freeport_partisan/qey_catacomb_epic01/bribingtraitor000.mp3", 3482178504, 3473502837)
  33. Dialog.AddOption("How would I do that?", "Dialog2")
  34. Dialog.AddOption("You must be punished for your crimes!", "AttackTimer")
  35. Dialog.Start()
  36. end
  37. function Dialog2(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. Dialog.New(NPC, Spawn)
  40. Dialog.AddDialog("I made arrangements to transfer my wealth to the Freeport Reserve, but mayhaps I can spare some coins if you let me go.")
  41. Dialog.AddVoiceover("voiceover/english/a_freeport_partisan/qey_catacomb_epic01/bribingtraitor001.mp3", 4211876752, 3637644957)
  42. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  43. Dialog.AddOption("Perhaps. I need to think upon this further.")
  44. Dialog.AddOption("I'm not sure I can trust you. You're here as a traitor.", "Dialog3")
  45. Dialog.AddOption("Coin cannot cover what you've done!", "AttackTimer")
  46. Dialog.AddOption("No, there can be no bribery.", "AttackTimer")
  47. Dialog.Start()
  48. end
  49. function Dialog3(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. Dialog.New(NPC, Spawn)
  52. Dialog.AddDialog("I'm not asking you to trust my word ... trust my gold!")
  53. Dialog.AddVoiceover("voiceover/english/a_freeport_partisan/qey_catacomb_epic01/bribingtraitor002.mp3", 298356076, 2184308899)
  54. PlayFlavor(NPC,"","","whome",0,0,Spawn)
  55. Dialog.AddOption("Interesting. I will return shortly once I've considered this.")
  56. Dialog.AddOption("Tempting, but I have a duty to Qeynos. You must face judgement for your deeds.", "AttackTimer")
  57. Dialog.AddOption("No way!", "AttackTimer")
  58. Dialog.Start()
  59. end
  60. function AttackTimer(NPC,Spawn)
  61. AddTimer(NPC,1200,"Attacking",1,Spawn)
  62. end
  63. function Attacking(NPC,Spawn)
  64. SpawnSet(NPC,"attackable",1)
  65. SpawnSet(NPC,"show_level",1)
  66. SpawnSet(NPC,"command_primary",11)
  67. Attack(NPC,Spawn)
  68. end
  69. function aggro(NPC,Spawn)
  70. SpawnSet(NPC,"attackable",1)
  71. SpawnSet(NPC,"show_level",1)
  72. SpawnSet(NPC,"command_primary",11)
  73. SpawnSet(NPC,"action_state",0)
  74. end
  75. function death(NPC,Spawn)
  76. if HasQuest(Spawn,BQCitizen) then
  77. SetStepComplete(Spawn,BQCitizen,6)
  78. elseif HasQuest(Spawn,CVQCitizen) then
  79. SetStepComplete(Spawn,CVQCitizen,6)
  80. elseif HasQuest(Spawn,GQCitizen) then
  81. SetStepComplete(Spawn,GQCitizen,6)
  82. elseif HasQuest(Spawn,NQCitizen) then
  83. SetStepComplete(Spawn,NQCitizen,6)
  84. elseif HasQuest(Spawn,SCQCitizen) then
  85. SetStepComplete(Spawn,SCQCitizen,6)
  86. elseif HasQuest(Spawn,WWQCitizen) then
  87. SetStepComplete(Spawn,WWQCitizen,6)
  88. end
  89. end