aBlackshielddockhand.lua 4.9 KB

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