9
3

LotniKIria.lua 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. --[[
  2. Script Name : SpawnScripts/LongshadowAlley/LotniKIria.lua
  3. Script Purpose : Lotni K`Iria
  4. Script Author : torsten
  5. Script Date : 2022.07.19
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local TheMissingBook = 5681
  10. local MagicalRetribution = 5682
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, TheMissingBook)
  13. ProvidesQuest(NPC, MagicalRetribution)
  14. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC, Spawn)
  20. if GetFactionAmount(Spawn,12) <0 then
  21. FaceTarget(NPC, Spawn)
  22. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  23. else
  24. if not HasCompletedQuest(Spawn, TheMissingBook) then
  25. if math.random(0, 100) <= 85 then
  26. FaceTarget(NPC, Spawn)
  27. PlayFlavor(NPC, "voiceover/english/lotni_k_iria/fprt_hood05/100_std_de_female_lotni_kiria_callout_462c415.mp3", "Another refugee... What do YOU want, peasant?", "", 1297124107, 2736745015, Spawn, 0)
  28. end
  29. end
  30. end
  31. end
  32. function hailed(NPC, Spawn)
  33. if GetFactionAmount(Spawn,12) <0 then
  34. FaceTarget(NPC, Spawn)
  35. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  36. else
  37. Dialog1(NPC,Spawn)
  38. end
  39. end
  40. function Dialog1(NPC,Spawn)
  41. FaceTarget(NPC, Spawn)
  42. Dialog.New(NPC, Spawn)
  43. Dialog.AddDialog("The endless number of refugees who enter my home sickens me, but I doubt boarding up my door would deter people like you. Get out of my sight. I've nothing to offer you.")
  44. PlayFlavor(NPC, "","","tapfoot",0,0, Spawn)
  45. Dialog.AddVoiceover("voiceover/english/standard_dark_elf_female/fprt_hood05/std_de_female_lotni_kiria.mp3",3857109569,3713028139)
  46. if CanReceiveQuest(Spawn, TheMissingBook) then
  47. Dialog.AddOption("I didn't mean to bother you.", "Dialog1a")
  48. elseif GetQuestStep(Spawn, TheMissingBook)==2 then
  49. Dialog.AddOption("I found the Ratonga, but she didn't have the book.", "Dialog2")
  50. end
  51. if CanReceiveQuest(Spawn, MagicalRetribution) then
  52. Dialog.AddOption("Are you still searching for your lost book?", "Dialog3")
  53. end
  54. Dialog.AddOption("Alright! I'm going.")
  55. Dialog.Start()
  56. end
  57. --QUEST 1
  58. function Dialog1a(NPC,Spawn)
  59. FaceTarget(NPC, Spawn)
  60. Dialog.New(NPC, Spawn)
  61. Dialog.AddDialog("Well I don't appreciate you walking into my home! Because of people like you, I can't leave out any of the precious possessions that remind me of Neriak. In fact, I lost the Fourth Book of Shadowed Mysteries. It's the last of its kind, and I'm certain an intruder took it!")
  62. PlayFlavor(NPC, "","","stare",0,0, Spawn)
  63. Dialog.AddVoiceover("voiceover/english/standard_dark_elf_female/fprt_hood05/quests/lotniklria/lotni_x1_initial.mp3",679420375,3622118352)
  64. Dialog.AddOption("Perhaps I could lend you a hand...", "OfferQuest1")
  65. Dialog.AddOption("Don't worry. I'll see myself out.")
  66. Dialog.Start()
  67. end
  68. function OfferQuest1(NPC,Spawn)
  69. if CanReceiveQuest(Spawn, TheMissingBook) then
  70. OfferQuest(NPC, Spawn, TheMissingBook)
  71. end
  72. end
  73. function Dialog2(NPC,Spawn)
  74. FaceTarget(NPC, Spawn)
  75. Dialog.New(NPC, Spawn)
  76. Dialog.AddDialog("Well then, did she divulge where my book is? If you are holding out on me I'll twist a dagger so far into your chest I'll...")
  77. PlayFlavor(NPC, "","","stare",0,0, Spawn)
  78. Dialog.AddOption("She said some mage in the Sprawl made her do it.", "Dialog2a")
  79. Dialog.Start()
  80. end
  81. function Dialog2a(NPC,Spawn)
  82. FaceTarget(NPC, Spawn)
  83. Dialog.New(NPC, Spawn)
  84. Dialog.AddDialog("It was him! I knew it! Blast that mage! That wiry little ratonga came to me several months ago asking for training in the magical ways, and I turned him away. Shortly there after, my book went missing. I already confronted him and killed him ... AARRG!! Now I'll never get my book. Uh ... thank you for your help, I guess. ")
  85. PlayFlavor(NPC, "","","frustrated",0,0, Spawn)
  86. Dialog.AddOption("Oh! You killed him already? Will you still try to find it?.","Dialog3")
  87. Dialog.AddOption("Good luck finding it now...")
  88. Dialog.Start()
  89. SetStepComplete(Spawn, TheMissingBook, 2)
  90. end
  91. --QUEST 2
  92. function Dialog3(NPC,Spawn)
  93. FaceTarget(NPC, Spawn)
  94. Dialog.New(NPC, Spawn)
  95. Dialog.AddDialog("No. I'm convinced the ancient book is lost forever, and it was the only book salvaged from Neriak before it collapsed. But what infuriates me even more is that the book's ancient secrets spread to those ratonga in the Sprawl who make a mockery of art. ")
  96. PlayFlavor(NPC, "","","no",0,0, Spawn)
  97. Dialog.AddOption("Let me give these ratonga what they deserve.","OfferQuest2")
  98. Dialog.AddOption("Well, perhaps you should keep a better eye on your things.")
  99. Dialog.Start()
  100. end
  101. function OfferQuest2(NPC,Spawn)
  102. if CanReceiveQuest(Spawn, MagicalRetribution) then
  103. OfferQuest(NPC, Spawn, MagicalRetribution)
  104. end
  105. end
  106. --
  107. --[[
  108. if HasCompletedQuest(Spawn, TheMissingBook) then
  109. if not HasQuest(Spawn, MagicalRetribution) and not HasCompletedQuest(Spawn, MagicalRetribution) then
  110. OfferQuest(NPC, Spawn, MagicalRetribution)
  111. end
  112. end
  113. if GetQuestStep(Spawn, TheMissingBook) == 2 then
  114. FaceTarget(NPC, Spawn)
  115. Dialog.New(NPC, Spawn)
  116. Dialog.AddDialog("That Ratonga did not have the book? The Black Magi must have stolen it then!")
  117. Dialog.AddOption("I could check that... for the right price.")
  118. Dialog.Start()
  119. SetStepComplete(Spawn, TheMissingBook, 2)
  120. elseif GetQuestStep(Spawn, MagicalRetribution) == 2 then
  121. FaceTarget(NPC, Spawn)
  122. Dialog.New(NPC, Spawn)
  123. Dialog.AddDialog("You have killed the Magi? Yes!")
  124. Dialog.AddOption("No problem Lotni. Good luck!")
  125. Dialog.Start()
  126. SetStepComplete(Spawn, MagicalRetribution, 2)
  127. else
  128. RandomGreeting(NPC, Spawn)
  129. end
  130. end]]--
  131. function RandomGreeting(NPC, Spawn)
  132. local choice = MakeRandomInt(1,1)
  133. if choice == 1 then
  134. PlayFlavor(NPC, "voiceover/english/lotni_k_iria/fprt_hood05/100_std_de_female_lotni_kiria_callout_462c415.mp3", "Another refugee... What do YOU want, peasant?", "", 1297124107, 2736745015, Spawn, 0)
  135. end
  136. end