TsuulNyghtfallow.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/TsuulNyghtfallow.lua
  3. Script Purpose : Tsuul Nyghtfallow
  4. Script Author : torsten\\Dorbin
  5. Script Date : 2022.07.17
  6. Script Notes : MANUFACTURED MOST DIALOG. NO VOs nor RECORDS. -- Dorbin
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  10. local TheNyghtfallowHeirloom = 5664
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, TheNyghtfallowHeirloom)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. if GetFactionAmount(Spawn,12) <0 then
  19. FaceTarget(NPC, Spawn)
  20. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  21. elseif not HasLanguage(Spawn,7) then
  22. FaceTarget(NPC, Spawn)
  23. Garbled(NPC,Spawn)
  24. else
  25. if CanReceiveQuest(Spawn, TheNyghtfallowHeirloom) then
  26. Dialog1(NPC,Spawn)
  27. elseif GetQuestStep(Spawn,TheNyghtfallowHeirloom) >=1 then
  28. DialogWait_Quest1(NPC,Spawn)
  29. else
  30. Dialog1(NPC,Spawn)
  31. end
  32. end
  33. end
  34. function Dialog1(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. Dialog.New(NPC, Spawn)
  37. Dialog.AddLanguage(7)
  38. Dialog.AddDialog("Better for us to watch eachother's backs than to find a blade in them.")
  39. Dialog.AddVoiceover("voiceover/english/halfelf_eco_race_good/ft/eco/good/halfelf_eco_race_good_halfelf_gm_7a593271.mp3", 2010917197, 1213460588)
  40. PlayFlavor(NPC,"","","hello",0,0,Spawn)
  41. if CanReceiveQuest(Spawn, TheNyghtfallowHeirloom) then
  42. Dialog.AddOption("I'd agree with that.","Dialog1_Quest1")
  43. end
  44. Dialog.AddOption("I might just stick you with one.","Whoa")
  45. Dialog.Start()
  46. end
  47. function Whoa(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. PlayFlavor(NPC,"","","lookaway",0,0,Spawn)
  50. end
  51. function Dialog1_Quest1(NPC,Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddLanguage(7)
  55. Dialog.AddDialog("Ahh, it is nice to find someone who understands Ayr'Dal. Attempts to fit in here have been... stressful... to say the least... I've only come to realize something very important to me has slipped through my fingers after we arrived from the island. Good luck trying to get the Militia to help with anything! Worthless! My family's name deserves respect!")
  56. PlayFlavor(NPC,"","","grumble",0,0,Spawn)
  57. Dialog.AddOption("What are you looking for?","Dialog2_Quest1")
  58. Dialog.AddOption("Good luck with that.")
  59. Dialog.Start()
  60. end
  61. function Dialog2_Quest1(NPC,Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. Dialog.AddLanguage(7)
  65. Dialog.AddDialog("My brother, in his efforts to gain citizenship to the city proper, was slain two nights ago in the Sprawl. He had a family heirloom with him when he died. I'd like to have the pendant returned. If you can arrange this, the coin is yours.")
  66. Dialog.AddOption("I could use some coin. Who might have your pendant?","Offer")
  67. Dialog.AddOption("Your brother was weak. You don't deserve to find your trinket!","Whoa")
  68. Dialog.Start()
  69. end
  70. function Offer(NPC,Spawn)
  71. OfferQuest(NPC, Spawn, TheNyghtfallowHeirloom)
  72. end
  73. function DialogWait_Quest1(NPC,Spawn)
  74. FaceTarget(NPC, Spawn)
  75. Dialog.New(NPC, Spawn)
  76. Dialog.AddLanguage(7)
  77. Dialog.AddDialog("Did you find my precious heirloom? What became of my foolhardy brother? I must know!")
  78. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_"..MakeRandomInt(1,3).."_1022.mp3", 0, 0)
  79. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  80. if GetQuestStep(Spawn, TheNyghtfallowHeirloom)==2 then
  81. Dialog.AddOption("I found your pendant on a Guttersnipe, but there was no sign of your brother.","Dialog3_Quest1")
  82. else
  83. Dialog.AddOption("Still looking...")
  84. end
  85. Dialog.Start()
  86. end
  87. function Dialog3_Quest1(NPC,Spawn)
  88. FaceTarget(NPC, Spawn)
  89. Dialog.New(NPC, Spawn)
  90. Dialog.AddLanguage(7)
  91. Dialog.AddDialog("No luck, eh? Well, you've been so helpful tracking down that blasted heirloom that I think it'd be downright cruel of me not to give you anything. Here, why don't you take this necklace?")
  92. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  93. Dialog.AddOption("Sounds fair enough. Thanks.","Finish")
  94. Dialog.Start()
  95. end
  96. function Finish(NPC,Spawn)
  97. FaceTarget(NPC, Spawn)
  98. SetStepComplete(Spawn, TheNyghtfallowHeirloom, 2)
  99. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  100. end