9
3

Gauldry.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --[[
  2. Script Name : SpawnScripts/SouthQeynos/Gauldry.lua
  3. Script Purpose : Gauldry <Shieldsmith>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.30
  6. Script Notes :
  7. --]]
  8. local snakes = 5570
  9. require "SpawnScripts/Generic/DialogModule"
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,snakes)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. if GetFactionAmount(Spawn,11) <0 then
  24. choice = math.random(1,2)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  29. end
  30. else
  31. if not HasCompletedQuest(Spawn,snakes)then
  32. Dialog1(NPC,Spawn)
  33. else
  34. local choice = math.random(1,3)
  35. if choice == 1 then
  36. PlayFlavor(NPC, "voiceover/english/optional2/halfling_eco_good_2/ft/service/merchant/halfling_merchant_service_good_2_hail_gm_24322c5d.mp3", "Greetings, friend traveler! We have the finest supplies to fill your adventuring needs.", "smile", 841946130, 955678666, Spawn)
  37. elseif choice == 2 then
  38. PlayFlavor(NPC, "voiceover/english/optional2/halfling_eco_good_2/ft/service/merchant/halfling_merchant_service_good_2_hail_gm_45d92a75.mp3", "Welcome! What can I help you with?", "bow", 561391296, 3932646865, Spawn)
  39. else
  40. PlayFlavor(NPC, "voiceover/english/merchant_gauldry/qey_south/100_mer_appraisor_gauldry_hail_c65547fa.mp3", "My wares cost more than the cheap goods of the sisters in the other room, but one must pay a price for extravagance, am I right?", "", 3552991495, 1168562652, Spawn, 0)
  41. end
  42. end
  43. end
  44. end
  45. function Dialog1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. Dialog.AddDialog("My wares cost more than the cheap goods of the sisters in the other room, but one must pay a price for extravagance, am I right?")
  49. Dialog.AddVoiceover("voiceover/english/merchant_gauldry/qey_south/100_mer_appraisor_gauldry_hail_c65547fa.mp3", 3552991495, 1168562652)
  50. if not HasQuest(Spawn,snakes) then
  51. Dialog.AddOption("With goods like yours you must need rare supplies.", "Dialog2")
  52. end
  53. if GetQuestStep(Spawn,snakes)==2 then
  54. Dialog.AddOption("Here are the flying snake wings you asked for.", "Dialog3")
  55. end
  56. Dialog.AddOption("I just might take a look at what you have.")
  57. Dialog.Start()
  58. end
  59. function Dialog2(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. Dialog.AddDialog("As a matter of fact, I do! I'm needing more and more as people come running in off the streets. Say, perhaps you could do me a favor? I'd pay ya for your time, of course.")
  63. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  64. Dialog.AddOption("Sure. If your looking for some help, I would be happy too.","Job")
  65. Dialog.AddOption("Another time, perhaps.")
  66. Dialog.Start()
  67. end
  68. function Job(NPC,Spawn)
  69. FaceTarget(NPC,Spawn)
  70. OfferQuest(NPC, Spawn,snakes)
  71. end
  72. function Dialog3(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("Indeed you have. I'm pleased with your work! Very pleased, indeed. Take this coin as a token of my appreciation.")
  76. Dialog.AddVoiceover("voiceover/english/merchant_gauldry/qey_south/100_mer_appraisor_gauldry_finish_b562a34d.mp3", 3870377435, 2109541208)
  77. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  78. Dialog.AddOption("Gladly.","JobDone")
  79. Dialog.Start()
  80. end
  81. function JobDone(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. SetStepComplete(Spawn,snakes, 2)
  84. end