9
3

aBlackshieldrecruit.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. if HasSpellEffect(Spawn, 5459) and GetQuestStep(Spawn, SmugglersSecrets) == 3 then
  19. PlayFlavor(NPC, "", "No loafings! We gaves you the scroll, now goes.", "", 1689589577, 4560189, Spawn)
  20. end
  21. end
  22. -- TIMERS USED FOR CALLING DIALOGUE FUNCTIONS FROM "a Blackshield Dockhand" Script
  23. function dlgtimer(NPC, Spawn)
  24. local zone = GetZone(NPC)
  25. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  26. if BlackshieldDockhand ~= nil then
  27. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine1", 1, Spawn)
  28. end
  29. end
  30. function dlgtimer2(NPC, Spawn)
  31. local zone = GetZone(NPC)
  32. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  33. if BlackshieldDockhand ~= nil then
  34. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine2", 1, Spawn)
  35. end
  36. end
  37. function dlgtimer4(NPC, Spawn)
  38. local zone = GetZone(NPC)
  39. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  40. if BlackshieldDockhand ~= nil then
  41. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine3", 1, Spawn)
  42. end
  43. end
  44. function dlgtimer6(NPC, Spawn)
  45. local zone = GetZone(NPC)
  46. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  47. if BlackshieldDockhand ~= nil then
  48. AddTimer(BlackshieldDockhand, 1000, "BlackshieldDockhandLine4", 1, Spawn)
  49. end
  50. end
  51. -- Dialog Part for "a Blackshield Recruit"
  52. function BlackshieldRecruitLine(NPC, Spawn)
  53. local zone = GetZone(NPC)
  54. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  55. FaceTarget(NPC, BlackshieldDockhand)
  56. conversation = CreateConversation()
  57. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer")
  58. StartConversation(conversation, NPC, Spawn, "Nice set ups, though don't yous think?")
  59. end
  60. function BlackshieldRecruitLine2(NPC, Spawn)
  61. local zone = GetZone(NPC)
  62. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  63. PlayAnimation(NPC, 10745)
  64. FaceTarget(NPC, BlackshieldDockhand)
  65. conversation = CreateConversation()
  66. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer2")
  67. StartConversation(conversation, NPC, Spawn, "I knows, but I can't help to wonders who the client is.")
  68. end
  69. function BlackshieldRecruitLine3(NPC, Spawn)
  70. local zone = GetZone(NPC)
  71. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  72. FaceTarget(NPC, BlackshieldDockhand)
  73. PlayAnimation(NPC, 10843)
  74. conversation = CreateConversation()
  75. AddConversationOption(conversation, "[Continue eavesdropping.]", "dlgtimer4")
  76. StartConversation(conversation, NPC, Spawn, "Yous don't ever wond... Hey, there ya are.")
  77. end
  78. function BlackshieldRecruitLine4(NPC, Spawn)
  79. local zone = GetZone(NPC)
  80. local BlackshieldDockhand = GetSpawnByLocationID(zone, BlackshieldDockhandID)
  81. FaceTarget(NPC, BlackshieldDockhand)
  82. PlayAnimation(NPC, 13056)
  83. conversation = CreateConversation()
  84. AddConversationOption(conversation, "I'm sorry?", "dlgtimer6")
  85. StartConversation(conversation, NPC, Spawn, "Betters get there faster then yous got here!")
  86. end
  87. function InRange(NPC, Spawn)
  88. if HasSpellEffect(Spawn, 5459) then
  89. BlackshieldRecruitLine(NPC, Spawn)
  90. end
  91. end