9
3

InnkeeperGalsway.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 merchants' names for you. Let's just call this a test of your abilities!")
  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.AddOption("No thanks. I'm not going to run all over the place to check on your fish.")
  56. Dialog.Start()
  57. end
  58. function QuestStart(NPC, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. OfferQuest(NPC,Spawn,fishy)
  61. end
  62. function FishDelivered(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. PlayFlavor(NPC,"","","smile",0,0,Spawn)
  66. 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.")
  67. Dialog.AddVoiceover("voiceover/english/innkeeper_galsway/qey_harbor/qst_innkeepergalsway002.mp3", 2911692262, 1585415232)
  68. Dialog.AddOption("Glad to have been of assistance.", "FishyFinished")
  69. Dialog.Start()
  70. end
  71. function FishyFinished(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. SetStepComplete(Spawn,fishy, 5)
  74. end
  75. function MessageDelivered(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. PlayFlavor(NPC,"","","sigh",0,0,Spawn)
  79. 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 arrives! Let Dawson know I'm anxiously awaiting his arrival.")
  80. Dialog.AddVoiceover("voiceover/english/dawson_magnificent/qey_north/quests/dawsonmagnificent/galsway_dawson_x1_initial.mp3", 1399252863, 3888111882)
  81. Dialog.AddOption("I'll be sure to let him know. ","MessageFinished")
  82. Dialog.Start()
  83. end
  84. function MessageFinished(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. SetStepComplete(Spawn,message, 1)
  87. end