9
3

PhenDomlinson.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/PhenDomlinson.lua
  3. Script Purpose : Phen Domlinson <Bowyer>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.25
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local fishy = 5564
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if GetFactionAmount(Spawn,11) <0 then
  18. choice = math.random(1,2)
  19. FaceTarget(NPC, Spawn)
  20. if choice == 1 then
  21. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  22. elseif choice == 2 then
  23. PlayFlavor(NPC, "", "", "glare", 1584866727, 581589457, Spawn)
  24. end
  25. else
  26. if math.random(1,100)<60 then
  27. choice = math.random(1,2)
  28. FaceTarget(NPC, Spawn)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "", "", "bye", 2088886924, 3736631596, Spawn)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "", "", "hello", 1584866727, 581589457, Spawn)
  33. end
  34. end
  35. end
  36. end
  37. function LeaveRange(NPC, Spawn)
  38. end
  39. function hailed(NPC, Spawn)
  40. if GetFactionAmount(Spawn,11) <0 then
  41. choice = math.random(1,2)
  42. if choice == 1 then
  43. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  44. elseif choice == 2 then
  45. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  46. end
  47. else
  48. Dialog1(NPC, Spawn)
  49. end
  50. end
  51. function Dialog1(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  55. Dialog.AddDialog("Fresh supplies every week! Step up and see for yourself.")
  56. Dialog.AddVoiceover("voiceover/english/merchant_phen_domlinson/qey_harbor/phendominlson000.mp3", 3656550620, 1100622613)
  57. if not QuestStepIsComplete(Spawn,fishy,4) and HasQuest(Spawn,fishy) then
  58. Dialog.AddOption("I'm working for Galsway to find the best price on fish here at the harbor. Think you can make an offer?","FishQuestion")
  59. end
  60. Dialog.AddOption("Every week? That's not fresh. No thanks.")
  61. Dialog.Start()
  62. end
  63. function FishQuestion(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. Dialog.New(NPC, Spawn)
  66. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  67. Dialog.AddDialog("I won't haggle with a go-between. Tell Galsway the cost stays the same.")
  68. Dialog.AddVoiceover("voiceover/english/merchant_phen_domlinson/qey_harbor/phendominlson001.mp3", 447644690, 3871643004)
  69. Dialog.AddOption("Well that's too bad. Good day to you then.","FishDone")
  70. Dialog.AddOption("Most likely for the best. Your stall smells a week past it's prime.","FishDone2")
  71. Dialog.Start()
  72. end
  73. function FishDone(NPC,Spawn)
  74. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. SetStepComplete(Spawn,fishy, 4)
  77. end
  78. function FishDone2(NPC,Spawn)
  79. PlayFlavor(NPC, "", "", "rude", 0, 0, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. SetStepComplete(Spawn,fishy, 4)
  82. end