9
3

CaptainLNek.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : SpawnScripts/LongshadowAlley/CaptainLNek.lua
  3. Script Purpose : Captain L`Nek
  4. Script Author : torsten
  5. Script Date : 2022.07.20
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local TheTruthisoutThere = 5684
  10. local SilencedSpeech = 5685
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, TheTruthisoutThere)
  13. ProvidesQuest(NPC, SilencedSpeech)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. if not HasQuest(Spawn, TheTruthisoutThere) and not HasCompletedQuest(Spawn, TheTruthisoutThere) then
  20. OfferQuest(NPC, Spawn, TheTruthisoutThere)
  21. end
  22. if HasCompletedQuest(Spawn, TheTruthisoutThere) then
  23. if not HasQuest(Spawn, SilencedSpeech) and not HasCompletedQuest(Spawn, SilencedSpeech) then
  24. OfferQuest(NPC, Spawn, SilencedSpeech)
  25. end
  26. end
  27. if GetQuestStep(Spawn, TheTruthisoutThere) == 2 then
  28. FaceTarget(NPC, Spawn)
  29. Dialog.New(NPC, Spawn)
  30. Dialog.AddDialog("Imnat is such a coward. I bet he told you everything he knows...")
  31. Dialog.AddOption("Of course he did.")
  32. Dialog.Start()
  33. SetStepComplete(Spawn, TheTruthisoutThere, 2)
  34. end
  35. if GetQuestStep(Spawn, SilencedSpeech) == 2 then
  36. FaceTarget(NPC, Spawn)
  37. Dialog.New(NPC, Spawn)
  38. Dialog.AddDialog("Thanks for your help citizen. The Freeport Militia will not forget that.")
  39. Dialog.AddOption("Of course.")
  40. Dialog.Start()
  41. SetStepComplete(Spawn, SilencedSpeech, 2)
  42. end
  43. RandomGreeting(NPC, Spawn)
  44. end
  45. function RandomGreeting(NPC, Spawn)
  46. local choice = MakeRandomInt(1,1)
  47. if choice == 1 then
  48. PlayFlavor(NPC, "voiceover/english/captain_l_nek/fprt_hood05/100_captain_lnek_multhail5_54f94dfc.mp3", "Hmm ... I am mistaken. You are not the one I seek.", "", 3750262963, 2820443341, Spawn, 0)
  49. end
  50. end