OverseerIvagora.lua 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/OverseerIvagora.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.02 06:10:28
  5. Script Purpose :
  6. :
  7. --]]
  8. local Welcome = 5864
  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)== 5 or GetRace(Spawn) ==13 then
  20. if CanReceiveQuest(Spawn, Welcome)then
  21. PlayFlavor(NPC,"voiceover/english/overseer_ivagora/fprt_hood03/qst_overseer_ivagora_callout2_29d95cf.mp3","Here! Here! Here! Refugees come here!!!","beckon",50468124,3582989183,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,"","","heckno",0,0,Spawn)
  39. else
  40. if GetRace(Spawn)== 5 or GetRace(Spawn) ==13 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("You are to talk to me, because I am the overseer of the refugees! You will listen to me, understand? I am telling you what you need to do now that you are owned by Freeport! You will listen, you got it?!")
  45. Dialog.AddVoiceover("voiceover/english/overseer_ivagora/fprt_hood03/overseer_ivagora001.mp3", 697563957, 4075827788)
  46. PlayFlavor(NPC,"","","smirk",0,0,Spawn)
  47. Dialog.AddOption("What do I need to do?","Dialog1")
  48. Dialog.AddOption("I... must be going!")
  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_ivagora/fprt_hood03/qst_overseer_ivagora_callout1_7a7c78d2.mp3","I am very important! You speak to me only when I speak to you!","stare",629512654,4246602300,Spawn)
  63. elseif choice == 2 then
  64. PlayFlavor(NPC,"voiceover/english/overseer_ivagora/fprt_hood03/qst_overseer_ivagora_callout2_29d95cf.mp3","Here! Here! Here! Refugees come here!!!","beckon",50468124,3582989183,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("What you do is you say \"Thank you, Overlord\" and \"You are so strong, Overlord\" and \"Thank you for giving me a house in Freeport because you are the best Overlord, Overlord\". If you are bad and you do not say these things, then you will be given a new dagger.")
  74. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  75. Dialog.AddVoiceover("voiceover/english/overseer_ivagora/fprt_hood03/overseer_ivagora002.mp3", 1025867876, 338880904)
  76. Dialog.AddOption("I could always use a new dagger!", "Dialog2")
  77. Dialog.Start()
  78. end
  79. function Dialog2(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("No, no. You are not understanding! We will give you a dagger in your back. You don't want that kind of dagger. If you are good and you say these things about the Overlord, then you will get a house. The Overlord likes giving houses to refugees. It's free! No strings attached! Trust me!")
  83. Dialog.AddVoiceover("voiceover/english/overseer_ivagora/fprt_hood03/overseer_ivagora003.mp3", 1768168077, 1553750759)
  84. PlayFlavor(NPC,"","","no",0,0,Spawn)
  85. Dialog.AddOption("I see. I'll take a house instead!", "QuestStart")
  86. Dialog.Start()
  87. end
  88. function QuestStart(NPC,Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC,Spawn,Welcome)
  91. end