LotniKIria.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. if not HasQuest(Spawn, TheMissingBook) and not HasCompletedQuest(Spawn, TheMissingBook) then
  20. OfferQuest(NPC, Spawn, TheMissingBook)
  21. end
  22. if HasCompletedQuest(Spawn, TheMissingBook) then
  23. if not HasQuest(Spawn, MagicalRetribution) and not HasCompletedQuest(Spawn, MagicalRetribution) then
  24. OfferQuest(NPC, Spawn, MagicalRetribution)
  25. end
  26. end
  27. if GetQuestStep(Spawn, TheMissingBook) == 2 then
  28. FaceTarget(NPC, Spawn)
  29. Dialog.New(NPC, Spawn)
  30. Dialog.AddDialog("That Ratonga did not have the book? The Black Magi must have stolen it then!")
  31. Dialog.AddOption("I could check that... for the right price.")
  32. Dialog.Start()
  33. SetStepComplete(Spawn, TheMissingBook, 2)
  34. elseif GetQuestStep(Spawn, MagicalRetribution) == 2 then
  35. FaceTarget(NPC, Spawn)
  36. Dialog.New(NPC, Spawn)
  37. Dialog.AddDialog("You have killed the Magi? Yes!")
  38. Dialog.AddOption("No problem Lotni. Good luck!")
  39. Dialog.Start()
  40. SetStepComplete(Spawn, MagicalRetribution, 2)
  41. else
  42. RandomGreeting(NPC, Spawn)
  43. end
  44. end
  45. function RandomGreeting(NPC, Spawn)
  46. local choice = MakeRandomInt(1,1)
  47. if choice == 1 then
  48. 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)
  49. end
  50. end