OverseerDaerla.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/Longshadow/OverseerDaerla.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.02 06:10:41
  5. Script Purpose :
  6. :
  7. --]]
  8. local Welcome = 5862
  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)== 1 or GetRace(Spawn) == 19 or GetRace(Spawn) == 17 then
  20. if CanReceiveQuest(Spawn, Welcome)then
  21. PlayFlavor(NPC,"voiceover/english/overseer_daerla/fprt_hood05/qst_overseer_daerla_callout2_8e8f4739.mp3","All of you lowly refugees are to speak with me at once!","sniff",2064397815,2852618419,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,"","","shame",0,0,Spawn)
  39. else
  40. if GetRace(Spawn)== 1 or GetRace(Spawn) == 19 or GetRace(Spawn) == 17 then
  41. if not HasQuest(Spawn, Welcome) and not HasCompletedQuest(Spawn,Welcome)then
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("Ah ... Yes ... what have we here? A refugee? Now, how do I know you are a lowly refugee, hmm? Perhaps by your tattered, commoner clothing, or is it your rancid stench? No ... that's not it ... let's see ... Ahhh ... yes. I see now, the stupid look on your face gives away your lowly status.")
  45. Dialog.AddVoiceover("voiceover/english/overseer_daerla/fprt_hood05/overseer_daerla001.mp3", 2177122562, 2434125400)
  46. PlayFlavor(NPC,"","","sarcasm",0,0,Spawn)
  47. Dialog.AddOption("Who are you to speak to me that way?","Dialog1")
  48. Dialog.AddOption("I don't have time for this!")
  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,"voiceover/english/overseer_daerla/fprt_hood05/qst_overseer_daerla_callout1_1b99f97d.mp3","Begone, you filthy commoner! I have important work to do.","stare",850117394,1406850605,Spawn)
  63. elseif choice == 2 then
  64. PlayFlavor(NPC,"voiceover/english/overseer_daerla/fprt_hood05/qst_overseer_daerla_callout2_8e8f4739.mp3","All of you lowly refugees are to speak with me at once!","sniff",2064397815,2852618419,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("I'll say this once: You are in Freeport, ruled by the Overlord. Our Lord charges me with the task of either processing refugees or flaying the flesh from their bodies with my sword. If you choose to speak up again, I shall choose the latter! ")
  74. PlayFlavor(NPC,"","","scold",0,0,Spawn)
  75. Dialog.AddVoiceover("voiceover/english/overseer_daerla/fprt_hood05/overseer_daerla002.mp3", 1998853027, 544729221)
  76. Dialog.AddOption("I see... ahem... what are my instructions, then?", "Dialog2")
  77. Dialog.Start()
  78. end
  79. function Dialog2(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("Much better. You are in Longshadow Alley, the district set aside for the greatest race, the Teir'Dal. Our loving Overlord offers you a place to live, a house. Show your appreciation for this gift by undertaking any task his servants demand of you. I am one of those servants. ")
  83. Dialog.AddVoiceover("voiceover/english/overseer_daerla/fprt_hood05/overseer_daerla003.mp3", 2404917247, 404866112)
  84. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  85. Dialog.AddOption("Very well. Are there any demands at this moment, Overseer?", "QuestStart")
  86. Dialog.Start()
  87. end
  88. function QuestStart(NPC,Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC,Spawn,Welcome)
  91. end