Knight-LieutenantLaughlin.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/Knight-LieutenantLaughlin.lua
  3. Script Purpose : Knight-Lieutenant Laughlin
  4. Script Author : Dorbin
  5. Script Date : 2022.04.23
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Gnolls = 5543
  10. local Quest2 = 5788 --Fighter Quest pt2
  11. function spawn(NPC)
  12. ProvidesQuest(NPC,Gnolls)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. if GetFactionAmount(Spawn, 11)>0 then
  19. Dialog4(NPC, Spawn)
  20. else
  21. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  22. end
  23. end
  24. function Dialog2(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. Dialog.New(NPC, Spawn)
  27. PlayFlavor(NPC, "","", "shrug", 0, 0,Spawn)
  28. Dialog.AddDialog("Famous, eh? Best keep your feet planted before your head floats off. Though, if you're looking for some recognition, I've been having some problems with the gnolls outside the gates here. I can't spare the men to go hunt them down, you wouldn't be interested in helping out, would you?")
  29. Dialog.AddVoiceover("voiceover/english/optional1/knight-lieutenant_laughlin/qey_north/quests/sirlaughlin/grd_laughlin_x1_initial.mp3", 2796593065, 1366994589)
  30. Dialog.AddOption("I'd be more than happy to carry the banner of Qeynos into battle with the gnolls!", "OfferGnollQuest")
  31. Dialog.AddOption("Gnolls? Send a new recruit out to deal with the problem.")
  32. Dialog.Start()
  33. end
  34. function OfferGnollQuest(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. OfferQuest(NPC, Spawn,Gnolls)
  37. end
  38. function Dialog3(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. PlayFlavor(NPC, "","", "agree", 0, 0,Spawn)
  42. Dialog.AddDialog("So you did... so you did. Well met adventurer you may be famous one day after all. Let me see, I think the city can afford to pay you a bit for your work here. Take this bag of coins, it should suffice.")
  43. Dialog.AddVoiceover("voiceover/english/optional1/knight-lieutenant_laughlin/qey_north/quests/sirlaughlin/grd_laughlin_x1_finish.mp3", 689966140, 111412847)
  44. Dialog.AddOption("Thank you sir. It was a pleasure to serve the city of Qeynos.","QuestFinish")
  45. Dialog.Start()
  46. end
  47. function QuestFinish(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. SetStepComplete(Spawn,Gnolls, 2)
  50. PlayFlavor(Spawn, "","", "salute", 0, 0)
  51. end
  52. function Dialog4(NPC, Spawn) --hail
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. PlayFlavor(NPC, "","", "salute", 0, 0,Spawn)
  56. Dialog.AddDialog("Hail and well met! Please beware that while you are safe within Qeynos' mighty walls, the outside world is not as forgiving. Dangerous creatures roam the lands beyond these gates. Beware!")
  57. Dialog.AddVoiceover("voiceover/english/optional1/knight-lieutenant_laughlin/qey_north/grd_sirlaughlin.mp3", 3112487329, 768408857)
  58. if GetQuestStep(Spawn,Gnolls)==2 then
  59. Dialog.AddOption("I gave those gnolls a good thrashing, and have returned with the ten ears you requested.", "Dialog3")
  60. end
  61. if not HasQuest(Spawn,Gnolls) and not HasCompletedQuest(Spawn,Gnolls)then
  62. Dialog.AddOption("I won't let danger stand in my way. I'm going to be famous one day!", "Dialog2")
  63. Dialog.AddOption("Erk! Dangerous creatures? I think I'll stay inside the gates!")
  64. end
  65. if HasQuest(Spawn,Quest2) and GetQuestStep(Spawn,Quest2)>=1 and GetQuestStep(Spawn,Quest2)<=3 and not QuestStepIsComplete(Spawn,Quest2,1) then
  66. Dialog.AddOption("What made you decide to be a guard?","Dialog1")
  67. end
  68. Dialog.AddOption("Well met to you as well.")
  69. Dialog.Start()
  70. end
  71. function Dialog1(NPC, Spawn) --NO VOs for the below fighter quest pt2
  72. FaceTarget(NPC, Spawn)
  73. Dialog.New(NPC, Spawn)
  74. PlayFlavor(NPC, "","", "ponder", 0, 0,Spawn)
  75. Dialog.AddDialog("Hmm, in my younger years I sought adventure like you. I suppose after being picked up a number of times by guards on patrol I thought - \"Hey, I could do that!\". I've enjoyed being able to repay the kindness to citizens of Qeynos.")
  76. --Dialog.AddVoiceover("voiceover/english/optional1/knight-lieutenant_laughlin/qey_north/quests/sirlaughlin/grd_laughlin_x1_finish.mp3", 689966140, 111412847)--
  77. Dialog.AddOption("We all certainly have the guard to thank.","Dialog1a")
  78. Dialog.Start()
  79. end
  80. function Dialog1a(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. Dialog.New(NPC, Spawn)
  83. PlayFlavor(NPC, "","", "agree", 0, 0,Spawn)
  84. Dialog.AddDialog("I believe so as well, but not often do I hear appreciatation like that. Thank you! So many seem to treat the guard as part of the background, but it our vigilance that keeps Qeynos safe.")
  85. --Dialog.AddVoiceover("voiceover/english/optional1/knight-lieutenant_laughlin/qey_north/quests/sirlaughlin/grd_laughlin_x1_finish.mp3", 689966140, 111412847)
  86. Dialog.AddOption("Keep up the great work!","Dialog1b")
  87. Dialog.Start()
  88. end
  89. function Dialog1b(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. SetStepComplete(Spawn,Quest2, 1)
  92. PlayFlavor(NPC, "","", "salute", 0, 0)
  93. end