9
3

ClanChiefMalachiSleetsaberBeggarsCourtVersion.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt2/ClanChiefMalachiSleetsaberBeggarsCourtVersion.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.09.01 08:09:43
  5. Script Purpose :
  6. :
  7. --]]
  8. local QUEST = 579
  9. local citizenID = 133770930
  10. function spawn(NPC)
  11. SetTempVariable(NPC, "speak", "true")
  12. AddSpawnAccess(NPC, NPC)
  13. SetPlayerProximityFunction(NPC, 5, "InRange", "OutRange")
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange(NPC, Spawn)
  22. AddSpawnAccess(NPC, Spawn)
  23. if GetQuestStep(Spawn, QUEST) == 3 and GetTempVariable(NPC, "speak") == "true" then
  24. SetTempVariable(NPC, "speak", "false")
  25. AddTimer(NPC, 10000, "speech", 1, Spawn)
  26. elseif GetQuestStep(Spawn, QUEST) == 7 and GetTempVariable(NPC, "speak") == "true" then
  27. SetTempVariable(NPC, "speak", "false")
  28. AddTimer(NPC, 10000, "speech6", 1, Spawn)
  29. elseif not HasQuest(Spawn, QUEST) or GetQuestStep(Spawn, QUEST) == 1 or GetQuestStep(Spawn, QUEST) == 5 then
  30. RemoveSpawnAccess(NPC, Spawn)
  31. end
  32. end
  33. function OutRange(NPC, Spawn)
  34. end
  35. function speech(NPC, Spawn)
  36. if GetQuestStep(Spawn, QUEST) == 3 then
  37. AddTimer(NPC, 10000, "speech1", 1, Spawn)
  38. end
  39. end
  40. function speech1(NPC, Spawn)
  41. PlayFlavor(NPC, "", "My barbarian brothers and sisters, why must we fill our time here, serving as weapons to The Overlord, and this lot of ungrateful trash?", "", 1689589577, 4560189, Spawn)
  42. AddTimer(NPC, 10000, "speech2", 1, Spawn)
  43. end
  44. function speech2(NPC, Spawn)
  45. PlayFlavor(NPC, "", "How have the Northmen fallen so far?", "", 1689589577, 4560189, Spawn)
  46. AddTimer(NPC, 10000, "speech3", 1, Spawn)
  47. end
  48. function speech3(NPC, Spawn)
  49. PlayFlavor(NPC, "", "At one time we had secretly set our sights upon taking Freeport and remaking it our new Halas. That will never be, now.", "", 1689589577, 4560189, Spawn)
  50. AddTimer(NPC, 10000, "speech4", 1, Spawn)
  51. end
  52. function speech4(NPC, Spawn)
  53. PlayFlavor(NPC, "", "But within the Frostfang Sea the answer lies. In the names and memories of our ancestors, we must move to New Halas!", "", 1689589577, 4560189, Spawn)
  54. AddTimer(NPC, 10000, "speech5", 1, Spawn)
  55. end
  56. function speech5(NPC, Spawn)
  57. SetTempVariable(NPC, "speak", "true")
  58. PlayFlavor(NPC, "", "We will remove the humans, frogloks, halflings and the rest of the thin-bloods, and remake it a city for the Northmen! A city worthy of us!", "", 1689589577, 4560189, Spawn)
  59. SetStepComplete(Spawn, QUEST, 3)
  60. end
  61. function speech6(NPC, Spawn)
  62. PlayFlavor(NPC, "", "My barbarian brothers and sisters, One of our brave clan stood up and showed me the error of my thoughts.", "", 1689589577, 4560189, Spawn)
  63. AddTimer(NPC, 10000, "speech7", 1, Spawn)
  64. end
  65. function speech7(NPC, Spawn)
  66. PlayFlavor(NPC, "", "I have been so focused on rebuilding the past, I had not seen the present.", "", 1689589577, 4560189, Spawn)
  67. AddTimer(NPC, 10000, "speech8", 1, Spawn)
  68. end
  69. function speech8(NPC, Spawn)
  70. PlayFlavor(NPC, "", "The Overlord will surely see us as betrayers and command The Militia to deal with all of us, if I continue.", "", 1689589577, 4560189, Spawn)
  71. AddTimer(NPC, 10000, "citizenspeech", 1, Spawn)
  72. end
  73. function citizenspeech(NPC, Spawn)
  74. local zone = GetZone(NPC)
  75. local citizen = GetSpawnByLocationID(zone, citizenID)
  76. if citizen ~= nil then
  77. PlayFlavor(citizen, "", "Let them try! There would be nothing left but ashes and wailing women by the end!", "", 1689589577, 4560189)
  78. AddTimer(NPC, 10000, "speech9", 1, Spawn)
  79. end
  80. end
  81. function speech9(NPC, Spawn)
  82. PlayFlavor(NPC, "", "Yes, some theirs, but mostly ours. And then who would be left to take on New Halas?", "", 1689589577, 4560189, Spawn)
  83. AddTimer(NPC, 10000, "speech10", 1, Spawn)
  84. end
  85. function speech10(NPC, Spawn)
  86. PlayFlavor(NPC, "", "Freeport is not the Halas of old, but it is a strong place, where we are free to battle and feast.", "", 1689589577, 4560189, Spawn)
  87. AddTimer(NPC, 10000, "speech11", 1, Spawn)
  88. end
  89. function speech11(NPC, Spawn)
  90. SetTempVariable(NPC, "speak", "true")
  91. PlayFlavor(NPC, "", "I am proud to call this bastion of strength and wealth my home and follow our fearful leader, The Overlord, into any battlefield!", "", 1689589577, 4560189, Spawn)
  92. SetStepComplete(Spawn, QUEST, 7)
  93. end