aBlackshieldrecruit.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/aBlackshieldrecruit.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.01.07 12:01:27
  5. Script Purpose :
  6. :
  7. --]]
  8. local BlackshieldDockhandID = 299539
  9. local SmugglersSecrets = 452
  10. local CratesOnTheNerves = 453
  11. require "SpawnScripts/Generic/NPCModule"
  12. function spawn(NPC, Spawn)
  13. NPCModule(NPC, Spawn)
  14. SetPlayerProximityFunction(NPC, 10, "InRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. if HasSpellEffect(Spawn, 5459) and GetQuestStep(Spawn, SmugglersSecrets) == 3 then
  22. PlayFlavor(NPC, "", "No loafings! We gaves you the scroll, now goes.", "", 1689589577, 4560189, Spawn)
  23. end
  24. end
  25. -- TIMERS USED FOR CALLING DIALOGUE FUNCTIONS FROM "a Blackshield Dockhand" Script
  26. function dlgtimer(NPC, Spawn)
  27. local zone = GetZone(NPC)
  28. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  29. if BlackshieldDockhand ~= nil then
  30. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine1", 1, Spawn)
  31. end
  32. end
  33. function dlgtimer2(NPC, Spawn)
  34. local zone = GetZone(NPC)
  35. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  36. if BlackshieldDockhand ~= nil then
  37. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine2", 1, Spawn)
  38. end
  39. end
  40. function dlgtimer4(NPC, Spawn)
  41. local zone = GetZone(NPC)
  42. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  43. if BlackshieldDockhand ~= nil then
  44. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine3", 1, Spawn)
  45. end
  46. end
  47. function dlgtimer6(NPC, Spawn)
  48. local zone = GetZone(NPC)
  49. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  50. if BlackshieldDockhand ~= nil then
  51. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine4", 1, Spawn)
  52. end
  53. end
  54. function dlgtimerCratesOnTheNerves02(NPC, Spawn)
  55. local zone = GetZone(NPC)
  56. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  57. if BlackshieldDockhand ~= nil then
  58. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLineCratesOnTheNerves2", 1, Spawn)
  59. end
  60. end
  61. -- Dialog Part for "a Blackshield Recruit"
  62. function BlackshieldRecruitLine(NPC, Spawn)
  63. local zone = GetZone(NPC)
  64. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  65. FaceTarget(NPC, BlackshieldDockhand)
  66. conversation = CreateConversation()
  67. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer")
  68. StartConversation(conversation, NPC, Spawn, "Nice set ups, though don't yous think?")
  69. end
  70. function BlackshieldRecruitLine2(NPC, Spawn)
  71. local zone = GetZone(NPC)
  72. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  73. PlayAnimation(NPC, 10745)
  74. FaceTarget(NPC, BlackshieldDockhand)
  75. conversation = CreateConversation()
  76. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer2")
  77. StartConversation(conversation, NPC, Spawn, "I knows, but I can't help to wonders who the client is.")
  78. end
  79. function BlackshieldRecruitLine3(NPC, Spawn)
  80. local zone = GetZone(NPC)
  81. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  82. FaceTarget(NPC, BlackshieldDockhand)
  83. PlayAnimation(NPC, 10843)
  84. conversation = CreateConversation()
  85. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer4")
  86. StartConversation(conversation, NPC, Spawn, "Yous don't ever wond... Hey, there ya are.")
  87. end
  88. function BlackshieldRecruitLine4(NPC, Spawn)
  89. local zone = GetZone(NPC)
  90. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  91. FaceTarget(NPC, BlackshieldDockhand)
  92. PlayAnimation(NPC, 13056)
  93. conversation = CreateConversation()
  94. AddConversationOption(conversation, "I'm sorry?", "dlgtimer6")
  95. StartConversation(conversation, NPC, Spawn, "Betters get there faster then yous got here!")
  96. end
  97. function BlackshieldRecruitLineCratesOnTheNerves(NPC, Spawn)
  98. local zone = GetZone(NPC)
  99. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  100. FaceTarget(NPC, BlackshieldDockhand)
  101. conversation = CreateConversation()
  102. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimerCratesOnTheNerves02")
  103. StartConversation(conversation, NPC, Spawn, "Thanks you! Is find it odd to unpack goods and repack thems to be sold, though.")
  104. end
  105. function BlackshieldRecruitLineCratesOnTheNervesFinal(NPC, Spawn)
  106. SetStepComplete(Spawn, CratesOnTheNerves, 12)
  107. local zone = GetZone(NPC)
  108. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  109. FaceTarget(NPC, BlackshieldDockhand)
  110. conversation = CreateConversation()
  111. AddConversationOption(conversation, "[You've heard enough.]")
  112. StartConversation(conversation, NPC, Spawn, "Profits is always good. Such contracts to get rid of sellable good is nices.")
  113. end
  114. function InRange(NPC, Spawn)
  115. if HasSpellEffect(Spawn, 5459) and GetQuestStep(Spawn, SmugglersSecrets) == 2 then
  116. BlackshieldRecruitLine(NPC, Spawn)
  117. end
  118. end