StewardDaedeakovoon.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/StewardDaedeakovoon.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.02 08:11:01
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local CalloutTimer = false
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,5762)
  12. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn) --Quest Callout
  15. if GetFactionAmount(Spawn,11)<0 then
  16. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. elseif GetRace(Spawn)== 9 or GetRace(Spawn)== 3 or GetRace(Spawn)== 20 then
  19. if not HasQuest(Spawn,5762) and not HasCompletedQuest(Spawn, 5762) and HasQuest(Spawn, 5763) and not HasCompletedQuest(Spawn, 5763) then
  20. Talk(NPC,Spawn)
  21. elseif CalloutTimer == false then
  22. CalloutTimer = true
  23. AddTimer(NPC,90000,"ResetCallout",1,Spawn)
  24. Talk(NPC,Spawn)
  25. end
  26. elseif CalloutTimer == false then
  27. CalloutTimer = true
  28. AddTimer(NPC,90000,"ResetCallout",1,Spawn)
  29. Talk(NPC,Spawn)
  30. end
  31. end
  32. function ResetCallout(NPC,Spawn)
  33. CalloutTimer = false
  34. end
  35. --(1115601018)[Sun May 08 21:10:18 2005] \aNPC 11530 Steward Daedeakovoon:Steward Daedeakovoon\/a says,"I cannot help you now, but you have potential. Use it wisely."
  36. function hailed(NPC, Spawn)
  37. if GetFactionAmount(Spawn,11)<0 then
  38. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  39. else
  40. if GetRace(Spawn)== 9 or GetRace(Spawn)== 3 or GetRace(Spawn)== 20 then
  41. if not HasQuest(Spawn,5762) and not HasCompletedQuest(Spawn, 5762) and HasQuest(Spawn, 5763) and not HasCompletedQuest(Spawn, 5763)then
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("On behalf of Qeynos, we open our arms to you, friend. Your journey is over, and now you dwell among friends.")
  45. Dialog.AddVoiceover("voiceover/english/steward_daedeakovoon/qey_village02/steward_daedeakovoon001.mp3", 2946421503, 2803311810)
  46. PlayFlavor(NPC,"","","salute",0,0,Spawn)
  47. Dialog.AddOption("Thank you for the warm welcome.", "Dialog1")
  48. Dialog.AddOption("I'll have to continue this conversation a bit later.")
  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/steward_daedeakovoon/qey_village02/qst_steward_daedeakovoon_callout1_cfd05996.mp3","You have much potential. Be wise and use it to its fullest.","agree",1059310994,1083041509,Spawn)
  63. elseif choice == 2 then
  64. PlayFlavor(NPC,"voiceover/english/steward_daedeakovoon/qey_village02/qst_steward_daedeakovoon_multhail2_78a42729.mp3","On behalf of Qeynos, I welcome you, friend. Your journey is over, and now you are among friends.","hello",1550457164,405052003,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("No, child, it is I who should thank you. Gazing into your eyes, I see you've overcome many hardships. Your strength inspires us all. Though your journey is complete, you'll find it is only the beginning of another. Let me help you with the first step of your new adventure.")
  74. PlayFlavor(NPC,"","","no",0,0,Spawn)
  75. Dialog.AddVoiceover("voiceover/english/steward_daedeakovoon/qey_village02/steward_daedeakovoon002.mp3", 1867915275, 19667391)
  76. Dialog.AddOption("I appreciate the assistance.", "Dialog2")
  77. Dialog.Start()
  78. end
  79. function Dialog2(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("I bear a message from our Queen. Though young in years, she possesses ancient wisdom and a kind heart. She has set aside a house for each homeless refugee in our commune, Starcrest. This includes you, child.")
  83. Dialog.AddVoiceover("voiceover/english/steward_daedeakovoon/qey_village02/steward_daedeakovoon003.mp3", 3420117817, 2473207721)
  84. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  85. Dialog.AddOption("A home here in Starcrest? What can you tell me about it?", "QuestStart")
  86. Dialog.Start()
  87. end
  88. function QuestStart(NPC,Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC,Spawn,5762)
  91. end