aBlackshielddockhand.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/aBlackshielddockhand.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.01.07 03:01:18
  5. Script Purpose :
  6. :
  7. --]]
  8. local BlackshieldRecruitID = 299540
  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 hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. end
  19. -- TIMERS USED FOR CALLING DIALOGUE FUNCTIONS FROM "a Blackshield Recruit" Script
  20. function dlgtimer2(NPC, Spawn)
  21. local zone = GetZone(NPC)
  22. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  23. if BlackshieldRecruit ~= nil then
  24. AddTimer(BlackshieldRecruit, 1000, "BlackshieldRecruitLine2", 1, Spawn)
  25. end
  26. end
  27. function dlgtimer3(NPC, Spawn)
  28. local zone = GetZone(NPC)
  29. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  30. if BlackshieldRecruit ~= nil then
  31. AddTimer(BlackshieldRecruit, 1000, "BlackshieldRecruitLine3", 1, Spawn)
  32. end
  33. end
  34. function dlgtimer5(NPC, Spawn)
  35. local zone = GetZone(NPC)
  36. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  37. if BlackshieldRecruit ~= nil then
  38. AddTimer(BlackshieldRecruit, 1000, "BlackshieldRecruitLine4", 1, Spawn)
  39. end
  40. end
  41. function dlgtimerCratesOnTheNerves01(NPC, Spawn)
  42. local zone = GetZone(NPC)
  43. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  44. if BlackshieldRecruit ~= nil then
  45. AddTimer(BlackshieldRecruit, 1000, "BlackshieldRecruitLineCratesOnTheNerves", 1, Spawn)
  46. end
  47. end
  48. function dlgtimerCratesOnTheNerves03(NPC, Spawn)
  49. local zone = GetZone(NPC)
  50. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  51. if BlackshieldRecruit ~= nil then
  52. AddTimer(BlackshieldRecruit, 1000, "BlackshieldRecruitLineCratesOnTheNervesFinal", 1, Spawn)
  53. end
  54. end
  55. -- Dialog Part for "a Blackshield Dockhand"
  56. function BlackshieldDockhandLine1(NPC, Spawn)
  57. local zone = GetZone(NPC)
  58. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  59. FaceTarget(NPC, BlackshieldRecruit)
  60. conversation = CreateConversation()
  61. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer2")
  62. StartConversation(conversation, NPC, Spawn, "This a calm seas kind'a deal. You don't ask questions about it.")
  63. end
  64. function BlackshieldDockhandLine2(NPC, Spawn)
  65. local zone = GetZone(NPC)
  66. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  67. FaceTarget(NPC, BlackshieldRecruit)
  68. conversation = CreateConversation()
  69. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer3")
  70. StartConversation(conversation, NPC, Spawn, "I can. I got gold for ale and beddin'. That's all I care for.")
  71. end
  72. function BlackshieldDockhandLine3(NPC, Spawn)
  73. local zone = GetZone(NPC)
  74. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  75. FaceTarget(NPC, BlackshieldRecruit)
  76. PlayAnimation(NPC, 10843)
  77. conversation = CreateConversation()
  78. AddConversationOption(conversation, "Who, me?", "dlgtimer5")
  79. StartConversation(conversation, NPC, Spawn, "Finally. Come 'ere courier, and take this message to the rendezvous.")
  80. end
  81. function BlackshieldDockhandLine4(NPC, Spawn)
  82. local zone = GetZone(NPC)
  83. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  84. FaceTarget(NPC, BlackshieldRecruit)
  85. PlayAnimation(NPC, 12216)
  86. SetStepComplete(Spawn, SmugglersSecrets, 2)
  87. conversation = CreateConversation()
  88. AddConversationOption(conversation, "Riiiight.")
  89. StartConversation(conversation, NPC, Spawn, "Should be. Now see to it this message gets to the rendezvous at Pride Lake, and be quick about it!")
  90. end
  91. function BlackshieldDockhandLineQuest2Part1(NPC, Spawn)
  92. local zone = GetZone(NPC)
  93. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  94. FaceTarget(NPC, BlackshieldRecruit)
  95. conversation = CreateConversation()
  96. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimerCratesOnTheNerves01")
  97. StartConversation(conversation, NPC, Spawn, "You unloaded that quick. Good job.")
  98. end
  99. function BlackshieldDockhandLineCratesOnTheNerves2(NPC, Spawn)
  100. local zone = GetZone(NPC)
  101. local BlackshieldRecruit = GetSpawnByLocationID(zone, BlackshieldRecruitID)
  102. FaceTarget(NPC, BlackshieldRecruit)
  103. conversation = CreateConversation()
  104. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimerCratesOnTheNerves03")
  105. StartConversation(conversation, NPC, Spawn, "I don't. I like the profit that lines the Blackshield coffers.")
  106. end
  107. function InRange(NPC, Spawn)
  108. if GetQuestStep(Spawn, CratesOnTheNerves) == 12 then
  109. BlackshieldDockhandLineQuest2Part1(NPC, Spawn)
  110. end
  111. end
  112. function respawn(NPC)
  113. spawn(NPC)
  114. end