TavithiNsari.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/QeynosCitizenshipTrialChamber/TavithiNsari.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.31 06:08:32
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local BQCitizen = 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, "","No! Please don't hurt me!", "cringe", 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. Dialog.New(NPC, Spawn)
  30. Dialog.AddDialog("I swear, I didn't do anything! The guards pulled me from my home and beat me! I just want to go home!")
  31. Dialog.AddVoiceover("voiceover/english/tavithi_n_sari/qey_catacomb_epic01/tavithinsari000.mp3", 4098142648, 4182661778)
  32. PlayFlavor(NPC,"","","no",0,0,Spawn)
  33. Dialog.AddOption("Wait a minute... they beat you?", "Dialog2")
  34. Dialog.AddOption("You're saying you don't belong down here?", "Dialog2")
  35. Dialog.Start()
  36. end
  37. function Dialog2(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. Dialog.New(NPC, Spawn)
  40. Dialog.AddDialog("Yes! You must believe me! I was minding my own business, when they came for me! I wasn't even near the Ironforge Estate!")
  41. Dialog.AddVoiceover("voiceover/english/tavithi_n_sari/qey_catacomb_epic01/tavithinsari001.mp3", 3040294218, 711712198)
  42. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  43. Dialog.AddOption("Well for that, I'm sorry you had to endure it. Wait here until I've made my decision.")
  44. Dialog.AddOption("Err, who said anything about the Ironforges?", "Dialog3")
  45. Dialog.Start()
  46. end
  47. function Dialog3(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("You did! Just a second ago, don't you remember?")
  51. Dialog.AddVoiceover("voiceover/english/tavithi_n_sari/qey_catacomb_epic01/tavithinsari002.mp3", 2424577779, 2139550412)
  52. PlayFlavor(NPC,"","","stare",0,0,Spawn)
  53. Dialog.AddOption("Did I? It must have slipped my mind.")
  54. Dialog.AddOption("I never said anything of the sort.", "Dialog4")
  55. Dialog.Start()
  56. end
  57. function Dialog4(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. Dialog.New(NPC, Spawn)
  60. Dialog.AddDialog("You fool! You should've let me go when you had the chance! Prepare to be a stain on the floor of Innoruuk's realm!")
  61. Dialog.AddVoiceover("voiceover/english/tavithi_n_sari/qey_catacomb_epic01/tavithinsari003.mp3", 3211336740, 2450849190)
  62. PlayFlavor(NPC,"","","cackle",0,0,Spawn)
  63. SpawnSet(NPC,"mood_state",11852)
  64. Dialog.AddOption("...", "AttackTimer")
  65. Dialog.Start()
  66. end
  67. function AttackTimer(NPC,Spawn)
  68. AddTimer(NPC,1200,"Attacking",1,Spawn)
  69. end
  70. function Attacking(NPC,Spawn)
  71. SpawnSet(NPC,"attackable",1)
  72. SpawnSet(NPC,"show_level",1)
  73. SpawnSet(NPC,"command_primary",11)
  74. Attack(NPC,Spawn)
  75. end
  76. function aggro(NPC,Spawn)
  77. SpawnSet(NPC,"attackable",1)
  78. SpawnSet(NPC,"show_level",1)
  79. SpawnSet(NPC,"command_primary",11)
  80. end
  81. function death(NPC,Spawn)
  82. if HasQuest(Spawn,BQCitizen) then
  83. SetStepComplete(Spawn,BQCitizen,7)
  84. elseif HasQuest(Spawn,CVQCitizen) then
  85. SetStepComplete(Spawn,CVQCitizen,7)
  86. elseif HasQuest(Spawn,GQCitizen) then
  87. SetStepComplete(Spawn,GQCitizen,7)
  88. elseif HasQuest(Spawn,NQCitizen) then
  89. SetStepComplete(Spawn,NQCitizen,7)
  90. elseif HasQuest(Spawn,SCQCitizen) then
  91. SetStepComplete(Spawn,SCQCitizen,7)
  92. elseif HasQuest(Spawn,WWQCitizen) then
  93. SetStepComplete(Spawn,WWQCitizen,7)
  94. end
  95. end