Grekin.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Grekin.lua
  3. Script Purpose : Grekin <Bowyer>
  4. Script Author : Dorbin
  5. Script Date : 2022.02.24
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Req931 = 5489
  10. local Req378 = 5488
  11. local Deposit = 5490
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. ProvidesQuest(NPC, Deposit)
  15. end
  16. function InRange(NPC, Spawn) --Quest Callout
  17. if GetFactionAmount(Spawn,11)<0 then
  18. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  19. else
  20. if not HasCompletedQuest(Spawn, Deposit)then
  21. if math.random(1, 100) <= 80 then
  22. choice = math.random(1,3)
  23. FaceTarget(NPC, Spawn)
  24. if choice ==1 then
  25. PlayFlavor(NPC, "voiceover/english/merchant_grekin/qey_village02/100_human_merchant_m_01_multhail1_78077dd5.mp3", "Sorry friend. I don't think you can help me.", "no", 3289788151, 1391553241, Spawn)
  26. elseif choice ==2 then
  27. PlayFlavor(NPC, "voiceover/english/merchant_grekin/qey_village02/100_human_merchant_m_01_callout_9b7d7d4.mp3", "To close the store or deliever the deposit. That is the question. If only I didn't have to choose! Perhaps you can help me traveler?", "ponder", 1399992844, 4031649272, Spawn)
  28. elseif choice ==3 then
  29. PlayFlavor(NPC, "voiceover/english/merchant_grekin/qey_village02/100_human_merchant_m_01_callout_9b7d7d4.mp3", "To close the store or deliever the deposit. That is the question. If only I didn't have to choose! Perhaps you can help me traveler?", "ponder", 1399992844, 4031649272, Spawn)
  30. end
  31. end
  32. end
  33. end
  34. end
  35. function hailed(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. if GetFactionAmount(Spawn,11)<0 then
  38. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  39. else
  40. Dialog1(NPC, Spawn)
  41. end
  42. end
  43. function Dialog1(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. Dialog.New(NPC, Spawn)
  46. PlayFlavor(NPC, "", "", "beckon", 0, 0, Spawn)
  47. Dialog.AddDialog("Come close. Come close! See what I have to offer today.")
  48. Dialog.AddVoiceover("voiceover/english/merchant_grekin/qey_village02/merchantgrekin.mp3", 2492969401, 3280493975)
  49. if not HasQuest(Spawn, Deposit) and not HasCompletedQuest(Spawn, Deposit) then
  50. Dialog.AddOption("You seem to be rather busy. I'm looking for work if you need help.","DepositStart")
  51. end
  52. if GetQuestStep(Spawn, Deposit)==2 then
  53. Dialog.AddOption("I have delivered your deposit to the Qeynos Exchange.","DepositDone")
  54. end
  55. if GetQuestStep(Spawn, Req931)==3 or GetQuestStep(Spawn, Req378)==2 then
  56. Dialog.AddOption("I have completed a requisition order for you.","ReqDone")
  57. end
  58. Dialog.AddOption("I'm just browsing. Thank you.")
  59. Dialog.Start()
  60. end
  61. function DepositStart(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. Dialog.AddDialog("If it's coin you need I can help out, but you'll have to do a favor for me. I need my daily proceeds delivered to the bank.")
  65. Dialog.AddVoiceover("voiceover/english/merchant_grekin/qey_village02/merchantgrekin000.mp3", 1743731083,2583786819)
  66. Dialog.AddOption("You would trust me with your money?", "Trust")
  67. Dialog.AddOption("On second thought, I shouldn't be handling someone else's large sums of coin.")
  68. Dialog.Start()
  69. end
  70. function Trust(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. Dialog.New(NPC, Spawn)
  73. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  74. Dialog.AddDialog("For starters, it is only a day's proceeds. Also, there are three guards between the banks and us. I'm pretty sure you would be caught if you tried to run. Aside from all that, you have a friendly face and I think I can trust you. Take this box to the bank and return with the recipt.")
  75. Dialog.AddVoiceover("voiceover/english/merchant_grekin/qey_village02/merchantgrekin001.mp3", 2487079650,1001036096)
  76. Dialog.AddOption("Okay. I will be back shortly with the recipt.", "DepositBegin")
  77. Dialog.AddOption("I don't want to get tangled up in this.")
  78. Dialog.Start()
  79. end
  80. function DepositBegin (NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. OfferQuest(NPC, Spawn, Deposit)
  83. end
  84. function DepositDone(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  88. SetStepComplete(Spawn, Deposit, 2)
  89. Dialog.AddDialog("Excellent! I'm so busy here I don't have time for simple chores. I would have to close up shop, and I don't have time for that.")
  90. Dialog.AddVoiceover("voiceover/english/merchant_grekin/qey_village02/merchantgrekin002.mp3", 1911828027, 460668749)
  91. Dialog.AddOption("Glad I could help.")
  92. Dialog.Start()
  93. end
  94. function ReqDone(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. Dialog.New(NPC, Spawn)
  97. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn)
  98. if GetQuestStep(Spawn, Req931)==3 then
  99. SetStepComplete(Spawn, Req931, 3)
  100. end
  101. if GetQuestStep(Spawn, Req378)== 2 then
  102. SetStepComplete(Spawn, Req378, 2)
  103. end
  104. Dialog.AddDialog("My requisition! I've waited for this for far too long. You would think a local requisition could be fulfilled much quicker. Take your fee and be off.")
  105. Dialog.AddVoiceover("voiceover/english/merchant_grekin/qey_village02/merchantgrekin003.mp3", 57347681,3755735620)
  106. Dialog.AddOption("Thanks.")
  107. Dialog.Start()
  108. end