9
3

InnkeeperGalsway.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/InnkeeperGalsway.lua
  3. Script Purpose : Innkeeper Galsway <General Goods>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.24
  6. Script Notes :
  7. --]]
  8. local message = 5546
  9. local fishy = 5564
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,fishy)
  13. end
  14. require "SpawnScripts/Generic/DialogModule"
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. if GetFactionAmount(Spawn,11) <0 then
  20. choice = math.random(1,2)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  23. elseif choice == 2 then
  24. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  25. end
  26. else
  27. Dialog1(NPC, Spawn)
  28. end
  29. end
  30. function Dialog1(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. Dialog.New(NPC, Spawn)
  33. PlayFlavor(NPC,"","","hello",0,0,Spawn)
  34. Dialog.AddDialog("What is it you need, traveler? If it's reasonable rates, fine food and ale you desire, you've come to the right inn.")
  35. Dialog.AddVoiceover("voiceover/english/innkeeper_galsway/qey_harbor/qst_innkeepergalsway.mp3", 4253649718, 828678171)
  36. if GetQuestStep(Spawn,message) ==1 then
  37. Dialog.AddOption("Dawson Magnificent wanted to let you know that he and his troupe will be late this evening.", "MessageDelivered")
  38. end
  39. if GetQuestStep(Spawn,fishy) ==5 then
  40. Dialog.AddOption("I asked the fish mongers around the market for their best price. Only Umli was willing to wiggle some on the price as long as word doesn't get out on his deal.", "FishDelivered")
  41. end
  42. if not HasQuest(Spawn,fishy) and not HasCompletedQuest(Spawn, fishy) then
  43. Dialog.AddOption("I am actually looking around for work. Have anything I can do to help?", "Dialog3")
  44. end
  45. Dialog.AddOption("Great. I plan to enjoy myself.")
  46. Dialog.Start()
  47. end
  48. function Dialog3(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. Dialog.New(NPC, Spawn)
  51. Dialog.AddDialog("Looking for work, eh? Well, alright. Let's see what you can do. Go to the fisherman's market and find me the best price on three baskets of fresh fish. Here, let me write down the merchant's names for you. Let's just call this a test of your abiities!")
  52. Dialog.AddVoiceover("voiceover/english/innkeeper_galsway/qey_harbor/qst_innkeepergalsway000.mp3", 2510257560, 588326201)
  53. Dialog.AddOption("Alright. I'll ask around the harbor market for you.", "QuestStart")
  54. Dialog.AddOption("Not sure what I expected coming from a place called 'Fish's Alehouse and Inn', but I'm not interested in this sorty of fishy business.")
  55. Dialog.Start()
  56. end
  57. function QuestStart(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. OfferQuest(NPC,Spawn,fishy)
  60. end
  61. function FishDelivered(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. PlayFlavor(NPC,"","","smile",0,0,Spawn)
  65. Dialog.AddDialog("Well done! That's the kind of entrepreneurial spirit and clever deal making that rebuilt this city. I'll have proper work with proper pay sometime in the future. For now, you have my gratitude.")
  66. Dialog.AddVoiceover("voiceover/english/innkeeper_galsway/qey_harbor/qst_innkeepergalsway002.mp3", 2911692262, 1585415232)
  67. Dialog.AddOption("Glad to have been of assistance.", "FishyFinished")
  68. Dialog.Start()
  69. end
  70. function FishyFinished(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. SetStepComplete(Spawn,fishy, 5)
  73. end
  74. function MessageDelivered(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. PlayFlavor(NPC,"","","sigh",0,0,Spawn)
  78. Dialog.AddDialog("Well, that is a shame. The patrons will be disappointed. I'll have to dock his wages, but at least the crowd can keep drinking until the troupe arives! Let Dawson know I'm anxiously awaiting his arrival.")
  79. Dialog.AddVoiceover("voiceover/english/dawson_magnificent/qey_north/quests/dawsonmagnificent/galsway_dawson_x1_initial.mp3", 1399252863, 3888111882)
  80. Dialog.AddOption("I'll be sure to let him know. ","MessageFinished")
  81. Dialog.Start()
  82. end
  83. function MessageFinished(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. SetStepComplete(Spawn,message, 1)
  86. end