AlissaCleeway.lua 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/AlissaCleeway.lua
  3. Script Purpose : Alissa Cleeway <General Goods>
  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, "", "", "beckon", 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, "", "", "orate", 0, 0, Spawn)
  55. Dialog.AddDialog("Browse the docks all you want, I guarantee you won't find better fish than mine.")
  56. Dialog.AddVoiceover("voiceover/english/merchant_alissa_cleeway/qey_harbor/alissacleeway000.mp3", 3954670515, 1312504794)
  57. if not QuestStepIsComplete(Spawn,fishy,1) and HasQuest(Spawn,fishy) then
  58. Dialog.AddOption("Galsway is looking for the best bargin on his next fish order. Can you offer something he can't refuse?","FishQuestion")
  59. end
  60. Dialog.AddOption("I don't need your goods.")
  61. Dialog.Start()
  62. end
  63. function FishQuestion(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. Dialog.New(NPC, Spawn)
  66. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  67. Dialog.AddDialog("Ah... Galsway is shopping for a better price, is he? You tell him my prices are fair, and if he finds something better he's not getting fresh goods!")
  68. Dialog.AddVoiceover("voiceover/english/merchant_alissa_cleeway/qey_harbor/alissacleeway001.mp3", 1777937692, 1427691386)
  69. Dialog.AddOption("I'll let him know. Thanks.","FishDone")
  70. Dialog.Start()
  71. end
  72. function FishDone(NPC,Spawn)
  73. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. SetStepComplete(Spawn,fishy, 1)
  76. end