OverseerTravogg.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/BigBend/OverseerTravogg.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.03 03:10:59
  5. Script Purpose :
  6. :
  7. --]]
  8. local Welcome = 5860
  9. require "SpawnScripts/Generic/DialogModule"
  10. local CalloutTimer = false
  11. function spawn(NPC)
  12. ProvidesQuest(NPC,Welcome)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. end
  15. function InRange(NPC, Spawn) --Quest Callout
  16. if GetFactionAmount(Spawn,12)<0 then
  17. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if GetRace(Spawn)== 12 or GetRace(Spawn) == 14 then
  20. if CanReceiveQuest(Spawn, Welcome)then
  21. PlayFlavor(NPC,"","Refugees will report to me at once!","wave",850117394,1406850605,Spawn)
  22. elseif CalloutTimer == false then
  23. CalloutTimer = true
  24. AddTimer(NPC,90000,"ResetCallout",1,Spawn)
  25. Talk(NPC,Spawn)
  26. end
  27. elseif CalloutTimer == false then
  28. CalloutTimer = true
  29. AddTimer(NPC,90000,"ResetCallout",1,Spawn)
  30. Talk(NPC,Spawn)
  31. end
  32. end
  33. end
  34. function ResetCallout(NPC,Spawn)
  35. CalloutTimer = false
  36. end
  37. function hailed(NPC, Spawn)
  38. if GetFactionAmount(Spawn,12)<0 then
  39. PlayFlavor(NPC,"","","shame",0,0,Spawn)
  40. else
  41. if GetRace(Spawn)== 12 or GetRace(Spawn) == 14 then
  42. if not HasQuest(Spawn, Welcome) and not HasCompletedQuest(Spawn,Welcome)then
  43. FaceTarget(NPC, Spawn)
  44. Dialog.New(NPC, Spawn)
  45. Dialog.AddDialog("Freeport welcomes you, traveler. Enter our city and you are no longer a refugee. Know this – you are now an asset of our mighty city. Consider yourself lucky. ")
  46. Dialog.AddVoiceover("voiceover/english/overseer_travogg/fprt_hood1/overseer_travogg001.mp3", 2748948544, 618605369)
  47. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  48. Dialog.AddOption("I don't feel lucky.","Dialog1")
  49. Dialog.AddOption("...I'll be right back.")
  50. Dialog.Start()
  51. else
  52. Talk(NPC,Spawn)
  53. end
  54. else
  55. Talk(NPC,Spawn)
  56. end
  57. end
  58. end
  59. function Talk(NPC,Spawn)
  60. FaceTarget(NPC, Spawn)
  61. local choice = MakeRandomInt(1,2)
  62. if choice == 1 then
  63. PlayFlavor(NPC,"","Refugees will report to me at once!","sniff",850117394,1406850605,Spawn)
  64. else
  65. PlayFlavor(NPC,"","Disturb me again and you will suffer the consequences.","glare",850117394,1406850605,Spawn)
  66. end
  67. end
  68. function respawn(NPC)
  69. spawn(NPC)
  70. end
  71. function Dialog1(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. Dialog.New(NPC, Spawn)
  74. Dialog.AddDialog("Your feelings mean nothing to the Overlord. He is your ruler and such an honor should delight you, peasant. If you are not delighted, I will smash open your skull. ")
  75. PlayFlavor(NPC,"","","heckno",0,0,Spawn)
  76. Dialog.AddVoiceover("voiceover/english/overseer_travogg/fprt_hood1/overseer_travogg002.mp3", 3261798868, 2615741361)
  77. Dialog.AddOption("I see... then I'm happy to be here.", "Dialog2")
  78. Dialog.Start()
  79. end
  80. function Dialog2(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. Dialog.New(NPC, Spawn)
  83. Dialog.AddDialog("You choose wisely. For this you may live. The Overlord has granted you a house in Big Bend, home to ogres and trolls. You must work to afford this gift. Does this please you?")
  84. Dialog.AddVoiceover("voiceover/english/overseer_travogg/fprt_hood1/overseer_travogg003.mp3", 2428117614, 1340985853)
  85. Dialog.AddOption("Happy?", "QuestStart")
  86. Dialog.Start()
  87. end
  88. function QuestStart(NPC,Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC,Spawn,Welcome)
  91. end