9
3

aBlackshieldrecruit.lua 5.1 KB

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