9
3

OverseerZerrin.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/OverseerZerrin.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.02 07:10:39
  5. Script Purpose : -FABRICATED HAIL. MISSING VOs/Logs. Most likely out of order.
  6. :
  7. --]]
  8. local Welcome = 5861
  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. elseif GetRace(Spawn)== 12 or GetRace(Spawn) == 14 then
  20. if CanReceiveQuest(Spawn, Welcome)then
  21. PlayFlavor(NPC,"","Refugees will report to me at once!","nod",0,0,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. function ResetCallout(NPC,Spawn)
  34. CalloutTimer = false
  35. end
  36. function hailed(NPC, Spawn)
  37. if GetFactionAmount(Spawn,12)<0 then
  38. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  39. else
  40. if GetRace(Spawn)== 9 or GetRace(Spawn) == 6 then --FABRICATED HAIL. MISSING VOs/Logs. Most likely out of order.
  41. if not HasQuest(Spawn, Welcome) and not HasCompletedQuest(Spawn,Welcome)then
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("You've got the look of a drowned rat! I have nothing for you needy types. Be on your way before I summon the Malitia.")
  45. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", 0, 0)
  46. PlayFlavor(NPC,"","","no",0,0,Spawn)
  47. Dialog.AddOption("I'm suppose to meet an Overseer here. Is that you?","Dialog1")
  48. Dialog.AddOption("But... I'll be back.")
  49. Dialog.Start()
  50. else
  51. Talk(NPC,Spawn)
  52. end
  53. else
  54. Talk(NPC,Spawn)
  55. end
  56. end
  57. end
  58. function Talk(NPC,Spawn)
  59. FaceTarget(NPC, Spawn)
  60. local choice = MakeRandomInt(1,2)
  61. if choice == 1 then
  62. PlayFlavor(NPC,"","Refugees will report to me at once!","sniff",850117394,1406850605,Spawn) --FABRICATED
  63. else
  64. PlayFlavor(NPC,"voiceover/english/overseer_zerrin/fprt_hood04/qst_overseer_zerrin_callout1_5fcc363d.mp3","Ever wonder how long you can breathe water? Keep talking to me and you'll find out.","glare",1789839755,3380246682,Spawn)
  65. end
  66. end
  67. function respawn(NPC)
  68. spawn(NPC)
  69. end
  70. function Dialog1(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. Dialog.New(NPC, Spawn)
  73. Dialog.AddDialog("Let's cut to the chase, shall we? I don't know you. I don't want to know you, and come to think of it, I'd rather chew on glass than even talk to you. Unfortunately, my position requires me to help you. So, refugee, welcome to Freeport, City of the Free.")
  74. PlayFlavor(NPC,"","","sniff",0,0,Spawn)
  75. Dialog.AddOption("I don't quite like your tone.", "Dialog2")
  76. Dialog.Start()
  77. end
  78. function Dialog2(NPC, Spawn) --
  79. FaceTarget(NPC, Spawn)
  80. Dialog.New(NPC, Spawn)
  81. Dialog.AddDialog("No one ever does. Now shut up and listen to what I say; The Overlord, all praise him, has ordered that all new refugees receive a house. In exchange, you are indebted to him. Pray that he never asks you to pay him back, understand?")
  82. PlayFlavor(NPC,"","","no",0,0,Spawn)
  83. Dialog.AddOption("A 'free' house? I'll take my chances.", "QuestStart")
  84. Dialog.Start()
  85. end
  86. function QuestStart(NPC,Spawn)
  87. FaceTarget(NPC, Spawn)
  88. OfferQuest(NPC,Spawn,Welcome)
  89. end