StewardSal.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. --[[
  2. Script Name : SpawnScripts/Graystone/StewardSal.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.20 04:07:00
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local CalloutTimer = false
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,5764)
  12. SetPlayerProximityFunction(NPC, 10, "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)== 0 or GetRace(Spawn)== 2 then
  19. if not HasQuest(Spawn,5764) and not HasCompletedQuest(Spawn, 5764)then
  20. FaceTarget(NPC, Spawn)
  21. PlayFlavor(NPC,"voiceover/english/steward_sal/qey_village03/qst_steward_sal_callout1_46762b99.mp3","No time for talkin', friend! I gotta keep an eye out for new refugees.","bye",1387716528,1390458474,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,11)<0 then
  38. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  39. else
  40. if GetRace(Spawn)== 0 or GetRace(Spawn)== 2 then
  41. if not HasQuest(Spawn,5764) and not HasCompletedQuest(Spawn, 5764)then
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("So, you came from the Isle, did ya? Yeah, you have the look of a drowned rat, you do! Har Har! Take no offense, friend. 'Twas just a joke, that's all. I'm here to welcome ya to Qeynos, but that doesn't mean I have to be a sourpuss, does it? Har Har!")
  45. Dialog.AddVoiceover("voiceover/english/steward_sal/qey_village03/steward_sal001.mp3", 3208153307, 1430720634)
  46. PlayFlavor(NPC,"","","hello",0,0,Spawn)
  47. Dialog.AddOption("No offense taken, friend. It's nice to laugh again.","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_sal/qey_village03/qst_steward_sal_callout1_46762b99.mp3","No time for talkin', friend! I gotta keep an eye out for new refugees.","no",1387716528,1390458474,Spawn)
  63. elseif choice == 2 then
  64. PlayFlavor(NPC,"voiceover/english/steward_sal/qey_village03/qst_steward_sal_callout1_46762b99.mp3","No time for talkin', friend! I gotta keep an eye out for new refugees.","hello",1387716528,1390458474,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("Well, that's good to hear! The way you refugees get jostled up, sometimes you lose yer sense of humor. Why am I saying \"you refugees\"? We're all refugees in our own way, if you think about it. Ah, but it's nice to have a house waiting for ya' at night, ain't that right?")
  74. PlayFlavor(NPC,"","","happy",0,0,Spawn)
  75. Dialog.AddVoiceover("voiceover/english/steward_sal/qey_village03/steward_sal002.mp3", 2420359673, 808472399)
  76. Dialog.AddOption("Ummm... I think you might be wrong. I don't have a house.", "Dialog2")
  77. Dialog.Start()
  78. end
  79. function Dialog2(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("Ahh ... but yer wrong, friend. About the house part, I mean ... The Queen used her own money to set up houses for those who can't afford them. That means you! Your house is right here in Graystone! That's what I'm here to tell ya!")
  83. Dialog.AddVoiceover("voiceover/english/steward_sal/qey_village03/steward_sal003.mp3", 3422117225, 1713331897)
  84. PlayFlavor(NPC,"","","no",0,0,Spawn)
  85. Dialog.AddOption("Really? That's very nice of her. Where did you say this place was?", "QuestStart")
  86. Dialog.Start()
  87. end
  88. function QuestStart(NPC,Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC,Spawn,5764)
  91. end
  92. function respawn(NPC)
  93. spawn(NPC)
  94. end