agnollcamp.lua 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
  1. --[[
  2. Script Name : SpawnScripts/Antonica/agnollcamp.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.15 03:07:38
  5. Script Purpose : Facilitates camps w/ distressed merchants & buffing ark rewards
  6. :
  7. --]]
  8. function spawn(NPC)
  9. CampSpawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function CampSpawn(NPC)
  15. if GetSpawnLocationID(NPC)==591698 then --GnollCamp1
  16. Camp1Spawn(NPC)
  17. elseif GetSpawnLocationID(NPC)==591701 then--GnollCamp2
  18. Camp2Spawn(NPC)
  19. elseif GetSpawnLocationID(NPC)==133773951 then--GnollCamp3
  20. Camp3Spawn(NPC)
  21. elseif GetSpawnLocationID(NPC)==170236 then--GnollCamp4
  22. Camp4Spawn(NPC)
  23. elseif GetSpawnLocationID(NPC)==170234 then--GnollCamp5
  24. Camp5Spawn(NPC)
  25. elseif GetSpawnLocationID(NPC)==170229 then--GnollCamp6
  26. Camp6Spawn(NPC)
  27. end
  28. end
  29. --- CAMP 1
  30. function Camp1Spawn(NPC, Spawn) -- Stage 1
  31. local zone = GetZone(NPC)
  32. local spawn1 = math.random(0,1)
  33. if spawn1 == 1 then
  34. local Camp1Spawn1 = SpawnByLocationID(zone, 133773815) --Gnoll1 (mystic)
  35. else
  36. local Camp1Spawn1a = SpawnByLocationID(zone, 133773937) -- Gnoll1(youth)
  37. end
  38. local spawn2 = math.random(0,1)
  39. if spawn2 == 1 then
  40. local Camp1Spawn2 = SpawnByLocationID(zone, 133773817)--Gnoll2 (mystic)
  41. else
  42. local Camp1Spawn2a = SpawnByLocationID(zone, 133773935)-- Gnoll2(youth)
  43. end
  44. local spawn3 = math.random(0,1)
  45. if spawn3 == 1 then
  46. local Camp1Spawn3 = SpawnByLocationID(zone, 133773812)--Gnoll3 (mystic)
  47. else
  48. local Camp1Spawn3a = SpawnByLocationID(zone, 133773933)-- Gnoll3(youth)
  49. end
  50. local spawn4 = math.random(0,1)
  51. if spawn4 == 1 then
  52. local Camp1Spawn4 = SpawnByLocationID(zone, 133773816)--Gnoll4 (mystic)
  53. else
  54. local Camp1Spawn4a = SpawnByLocationID(zone, 133773936)-- Gnoll4(youth)
  55. end
  56. local spawn5 = math.random(0,1)
  57. if spawn5 == 1 then
  58. local Camp1Spawn5 = SpawnByLocationID(zone, 133773932)--Gnoll5 (mystic)
  59. else
  60. local Camp1Spawn5a = SpawnByLocationID(zone, 133773813)-- Gnoll5(youth)
  61. end
  62. local spawn6 = math.random(0,1)
  63. if spawn6 == 1 then
  64. local Camp1Spawn6 = SpawnByLocationID(zone, 133773934)--Gnoll6 (mystic)
  65. else
  66. local Camp1Spawn6a = SpawnByLocationID(zone, 133773814)-- Gnoll6(youth)
  67. end
  68. local MerchantSpawn = math.random(0,1)
  69. if MerchantSpawn == 1 then
  70. local Camp1MerchantSpawn = SpawnByLocationID(zone, 134655)--Distressed Merchant
  71. else
  72. end
  73. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage1")
  74. end
  75. function Camp1SpawnCheck_Stage1(NPC, Spawn) --Stage 1 Living Check
  76. local zone = GetZone(NPC)
  77. local Camp1Spawn1 = GetSpawnByLocationID(zone, 133773815)
  78. local Camp1Spawn1a = GetSpawnByLocationID(zone, 133773937)
  79. local Camp1Spawn2 = GetSpawnByLocationID(zone, 133773817)
  80. local Camp1Spawn2a = GetSpawnByLocationID(zone, 133773935)
  81. local Camp1Spawn3 = GetSpawnByLocationID(zone, 133773812)
  82. local Camp1Spawn3a = GetSpawnByLocationID(zone, 133773933)
  83. local Camp1Spawn4 = GetSpawnByLocationID(zone, 133773816)
  84. local Camp1Spawn4a = GetSpawnByLocationID(zone, 133773936)
  85. local Camp1Spawn5 = GetSpawnByLocationID(zone, 133773932)
  86. local Camp1Spawn5a = GetSpawnByLocationID(zone, 133773813)
  87. local Camp1Spawn6 = GetSpawnByLocationID(zone, 133773934)
  88. local Camp1Spawn6a = GetSpawnByLocationID(zone, 133773814)
  89. if IsAlive(Camp1Spawn1) == true or IsAlive(Camp1Spawn1a) == true then
  90. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage1",1, Spawn)
  91. elseif IsAlive(Camp1Spawn2) == true or IsAlive(Camp1Spawn2a) == true then
  92. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage1",1, Spawn)
  93. elseif IsAlive(Camp1Spawn3) == true or IsAlive(Camp1Spawn3a) == true then
  94. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage1",1, Spawn)
  95. elseif IsAlive(Camp1Spawn4) == true or IsAlive(Camp1Spawn4a) == true then
  96. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage1",1, Spawn)
  97. elseif IsAlive(Camp1Spawn5) == true or IsAlive(Camp1Spawn5a) == true then
  98. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage1",1, Spawn)
  99. elseif IsAlive(Camp1Spawn6) == true or IsAlive(Camp1Spawn6a) == true then
  100. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage1",1, Spawn)
  101. else
  102. AddTimer(NPC, 6000, "Camp1_Stage2")
  103. end
  104. end
  105. function Camp1_Stage2(NPC, Spawn) --Stage 2
  106. local zone = GetZone(NPC)
  107. local Camp1_Stage2Spawn1=SpawnByLocationID(zone, 190452)--darkpack pack leader
  108. FaceTarget(Camp1_Stage2Spawn1, Spawn)
  109. Attack(Camp1_Stage2Spawn1, Spawn)
  110. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage2")
  111. end
  112. function Camp1SpawnCheck_Stage2(NPC, Spawn) --Stage 2 Living Check
  113. local zone = GetZone(NPC)
  114. local Camp1_Stage2Spawn1 = GetSpawnByLocationID(zone, 190452)
  115. if IsAlive(Camp1_Stage2Spawn1) == true then
  116. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage2",1, Spawn)
  117. else
  118. AddTimer(NPC, 6000, "Camp1_Stage3")
  119. end
  120. end
  121. function Camp1_Stage3(NPC, Spawn) --Stage 3 (Possible Boss)
  122. local zone = GetZone(NPC)
  123. local choice = math.random(0,100)
  124. if choice <=33 then -- % Chance for Boss to Spawn
  125. local Camp1_Stage3Spawn1=SpawnByLocationID(zone, 133773818)--Tark
  126. FaceTarget(Camp1_Stage3Spawn1, Spawn)
  127. Attack(Camp1_Stage3Spawn1, Spawn)
  128. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage3")
  129. else -- Failed Boss Spawn
  130. local Camp1ArkofPower = SpawnByLocationID(zone, 133773939)--Ark of Power
  131. local Camp1MerchantSpawn = GetSpawnByLocationID(zone, 134655)--Distressed Merchant
  132. if Camp1MerchantSpawn ~=nil then
  133. Despawn(Camp1MerchantSpawn)
  134. local Camp1GratifiedMerchant = SpawnByLocationID(zone, 133773938)--Gratified Merchant
  135. AddTimer(NPC,90000,"Camp1Reset")
  136. else
  137. AddTimer(NPC,60000,"Camp1Reset")
  138. end
  139. end
  140. end
  141. function Camp1SpawnCheck_Stage3(NPC, Spawn) --Stage 2 Living Check
  142. local zone = GetZone(NPC)
  143. local Camp1_Stage3Spawn1 = GetSpawnByLocationID(zone, 133773818)
  144. if IsAlive(Camp1_Stage2Spawn1) == true then
  145. AddTimer(NPC,6000,"Camp1SpawnCheck_Stage3",1,Spawn)
  146. else
  147. local Camp1MerchantSpawn = GetSpawnByLocationID(zone, 134655)--Distressed Merchant
  148. if Camp1MerchantSpawn ~=nil then
  149. Despawn(Camp1MerchantSpawn)
  150. local Camp1GratifiedMerchant = SpawnByLocationID(zone, 133773938)--Gratified Merchant
  151. AddTimer(NPC, 90000, "Camp1Reset",1,Spawn)
  152. else
  153. AddTimer(NPC, 10000, "Camp1Reset",1,Spawn)
  154. end
  155. end
  156. end
  157. function Camp1Reset(NPC)
  158. local zone = GetZone(NPC)
  159. local Camp1Object = GetSpawnByLocationID(zone, 591698)
  160. if Camp1Object~= nil then
  161. Despawn(Camp1Object)
  162. local Camp1ArkofPower = GetSpawnByLocationID(zone, 133773939)--Ark of Power
  163. if Camp1ArkofPower ~=nil then
  164. Despawn(Camp1ArkofPower)
  165. end
  166. local Camp1GratifiedMerchant = GetSpawnByLocationID(zone, 133773938)--Gratified Merchant
  167. if Camp1GratifiedMerchant ~=nil then
  168. Despawn(Camp1GratifiedMerchant)
  169. end
  170. end
  171. end
  172. --- CAMP 2
  173. function Camp2Spawn(NPC, Spawn) -- Stage 1
  174. local zone = GetZone(NPC)
  175. local Camp2Object2 = SpawnByLocationID(zone, 170244)
  176. local spawn1 = math.random(0,1)
  177. if spawn1 == 1 then
  178. local Camp2Spawn1 = SpawnByLocationID(zone, 133773943) --Gnoll1 (mystic)
  179. else
  180. local Camp2Spawn1a = SpawnByLocationID(zone, 133773809) -- Gnoll1(youth)
  181. end
  182. local spawn2 = math.random(0,1)
  183. if spawn2 == 1 then
  184. local Camp2Spawn2 = SpawnByLocationID(zone, 133773946)--Gnoll2 (mystic)
  185. else
  186. local Camp2Spawn2a = SpawnByLocationID(zone, 133773806)-- Gnoll2(youth)
  187. end
  188. local spawn3 = math.random(0,1)
  189. if spawn3 == 1 then
  190. local Camp1Spawn3 = SpawnByLocationID(zone, 133773810)--Gnoll3 (mystic)
  191. else
  192. local Camp1Spawn3a = SpawnByLocationID(zone, 133773944)-- Gnoll3(youth)
  193. end
  194. local spawn4 = math.random(0,1)
  195. if spawn4 == 1 then
  196. local Camp2Spawn4 = SpawnByLocationID(zone, 133773945)--Gnoll4 (mystic)
  197. else
  198. local Camp2Spawn4a = SpawnByLocationID(zone, 133773807)-- Gnoll4(youth)
  199. end
  200. local spawn5 = math.random(0,1)
  201. if spawn5 == 1 then
  202. local Camp2Spawn5 = SpawnByLocationID(zone, 133773808)--Gnoll5 (mystic)
  203. else
  204. local Camp2Spawn5a = SpawnByLocationID(zone, 133773942)-- Gnoll5(youth)
  205. end
  206. local spawn6 = math.random(0,1)
  207. if spawn6 == 1 then
  208. local Camp2Spawn6 = SpawnByLocationID(zone, 133773947)--Gnoll6 (mystic)
  209. else
  210. local Camp2Spawn6a = SpawnByLocationID(zone, 133773805)-- Gnoll6(youth)
  211. end
  212. local MerchantSpawn = math.random(0,1)
  213. if MerchantSpawn == 1 then
  214. local Camp2MerchantSpawn = SpawnByLocationID(zone, 133773948)--Distressed Merchant
  215. else
  216. end
  217. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage1")
  218. end
  219. function Camp2SpawnCheck_Stage1(NPC, Spawn) --Stage 1 Living Check
  220. local zone = GetZone(NPC)
  221. local Camp2Spawn1 = GetSpawnByLocationID(zone, 133773943)
  222. local Camp2Spawn1a = GetSpawnByLocationID(zone, 133773809)
  223. local Camp2Spawn2 = GetSpawnByLocationID(zone, 133773946)
  224. local Camp2Spawn2a = GetSpawnByLocationID(zone, 133773806)
  225. local Camp2Spawn3 = GetSpawnByLocationID(zone, 133773810)
  226. local Camp2Spawn3a = GetSpawnByLocationID(zone, 133773944)
  227. local Camp2Spawn4 = GetSpawnByLocationID(zone, 133773945)
  228. local Camp2Spawn4a = GetSpawnByLocationID(zone, 133773807)
  229. local Camp2Spawn5 = GetSpawnByLocationID(zone, 133773808)
  230. local Camp2Spawn5a = GetSpawnByLocationID(zone, 133773942)
  231. local Camp2Spawn6 = GetSpawnByLocationID(zone, 133773947)
  232. local Camp2Spawn6a = GetSpawnByLocationID(zone, 133773805)
  233. if IsAlive(Camp2Spawn1) == true or IsAlive(Camp2Spawn1a) == true then
  234. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage1",1, Spawn)
  235. elseif IsAlive(Camp2Spawn2) == true or IsAlive(Camp2Spawn2a) == true then
  236. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage1",1, Spawn)
  237. elseif IsAlive(Camp2Spawn3) == true or IsAlive(Camp2Spawn3a) == true then
  238. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage1",1, Spawn)
  239. elseif IsAlive(Camp2Spawn4) == true or IsAlive(Camp2Spawn4a) == true then
  240. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage1",1, Spawn)
  241. elseif IsAlive(Camp2Spawn5) == true or IsAlive(Camp2Spawn5a) == true then
  242. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage1",1, Spawn)
  243. elseif IsAlive(Camp2Spawn6) == true or IsAlive(Camp2Spawn6a) == true then
  244. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage1",1, Spawn)
  245. else
  246. AddTimer(NPC, 6000, "Camp2_Stage2")
  247. end
  248. end
  249. function Camp2_Stage2(NPC, Spawn) --Stage 2
  250. local zone = GetZone(NPC)
  251. local Camp2_Stage2Spawn1=SpawnByLocationID(zone, 190461)--darkpack pack leader
  252. FaceTarget(Camp2_Stage2Spawn1, Spawn)
  253. Attack(Camp2_Stage2Spawn1, Spawn)
  254. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage2")
  255. end
  256. function Camp2SpawnCheck_Stage2(NPC, Spawn) --Stage 2 Living Check
  257. local zone = GetZone(NPC)
  258. local Camp2_Stage2Spawn1 = GetSpawnByLocationID(zone, 190461)
  259. if IsAlive(Camp2_Stage2Spawn1) == true then
  260. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage2",1, Spawn)
  261. else
  262. AddTimer(NPC, 6000, "Camp2_Stage3")
  263. end
  264. end
  265. function Camp2_Stage3(NPC, Spawn) --Stage 3 (Possible Boss)
  266. local zone = GetZone(NPC)
  267. local choice = math.random(0,100)
  268. if choice <=33 then -- % Chance for Boss to Spawn
  269. local Camp2_Stage3Spawn1=SpawnByLocationID(zone, 133773811)--Tark
  270. FaceTarget(Camp2_Stage3Spawn1, Spawn)
  271. Attack(Camp2_Stage3Spawn1, Spawn)
  272. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage3")
  273. else -- Failed Boss Spawn
  274. local Camp2ArkofPower = SpawnByLocationID(zone, 133773940)--Ark of Power
  275. local Camp2MerchantSpawn = GetSpawnByLocationID(zone, 133773948)--Distressed Merchant
  276. if Camp2MerchantSpawn ~=nil then
  277. Despawn(Camp2MerchantSpawn)
  278. local Camp2GratifiedMerchant = SpawnByLocationID(zone, 133773938)--Gratified Merchant
  279. AddTimer(NPC,90000,"Camp2Reset")
  280. else
  281. AddTimer(NPC,60000,"Camp2Reset")
  282. end
  283. end
  284. end
  285. function Camp2SpawnCheck_Stage3(NPC, Spawn) --Stage 2 Living Check
  286. local zone = GetZone(NPC)
  287. local Camp2_Stage3Spawn1 = GetSpawnByLocationID(zone, 133773811)
  288. if IsAlive(Camp2_Stage2Spawn1) == true then
  289. AddTimer(NPC,6000,"Camp2SpawnCheck_Stage3",1,Spawn)
  290. else
  291. local Camp2MerchantSpawn = GetSpawnByLocationID(zone, 133773948)--Distressed Merchant
  292. if Camp2MerchantSpawn ~=nil then
  293. Despawn(Camp2MerchantSpawn)
  294. local Camp2GratifiedMerchant = SpawnByLocationID(zone, 133773941)--Gratified Merchant
  295. AddTimer(NPC, 90000, "Camp2Reset",1,Spawn)
  296. else
  297. AddTimer(NPC, 10000, "Camp2Reset",1,Spawn)
  298. end
  299. end
  300. end
  301. function Camp2Reset(NPC)
  302. local zone = GetZone(NPC)
  303. local Camp2Object = GetSpawnByLocationID(zone, 591701)
  304. local Camp2Object2 = GetSpawnByLocationID(zone, 170244)
  305. if Camp2Object~= nil then
  306. Despawn(Camp2Object)
  307. end
  308. if Camp2Object2~= nil then
  309. Despawn(Camp2Object2)
  310. end
  311. local Camp2ArkofPower = GetSpawnByLocationID(zone, 133773940)--Ark of Power
  312. if Camp2ArkofPower ~=nil then
  313. Despawn(Camp2ArkofPower)
  314. end
  315. local Camp2GratifiedMerchant = GetSpawnByLocationID(zone, 133773941)--Gratified Merchant
  316. if Camp2GratifiedMerchant ~=nil then
  317. Despawn(Camp2GratifiedMerchant)
  318. end
  319. end
  320. --- CAMP 3
  321. function Camp3Spawn(NPC, Spawn) -- Stage 1
  322. local zone = GetZone(NPC)
  323. local Camp3Object2 = SpawnByLocationID(zone, 170247)
  324. local spawn1 = math.random(0,1)
  325. if spawn1 == 1 then
  326. local Camp3Spawn1 = SpawnByLocationID(zone, 133773953) --Gnoll1 (mystic)
  327. else
  328. local Camp3Spawn1a = SpawnByLocationID(zone, 133773797) -- Gnoll1(youth)
  329. end
  330. local spawn2 = math.random(0,1)
  331. if spawn2 == 1 then
  332. local Camp3Spawn2 = SpawnByLocationID(zone, 133773800)--Gnoll2 (mystic)
  333. else
  334. local Camp3Spawn2a = SpawnByLocationID(zone, 133773957)-- Gnoll2(youth)
  335. end
  336. local spawn3 = math.random(0,1)
  337. if spawn3 == 1 then
  338. local Camp3Spawn3 = SpawnByLocationID(zone, 133773952)--Gnoll3 (mystic)
  339. else
  340. local Camp3Spawn3a = SpawnByLocationID(zone, 133773796)-- Gnoll3(youth)
  341. end
  342. local spawn4 = math.random(0,1)
  343. if spawn4 == 1 then
  344. local Camp3Spawn4 = SpawnByLocationID(zone, 133773801)--Gnoll4 (mystic)
  345. else
  346. local Camp3Spawn4a = SpawnByLocationID(zone, 133773955)-- Gnoll4(youth)
  347. end
  348. local spawn5 = math.random(0,1)
  349. if spawn5 == 1 then
  350. local Camp3Spawn5 = SpawnByLocationID(zone, 133773803)--Gnoll5 (mystic)
  351. else
  352. local Camp3Spawn5a = SpawnByLocationID(zone, 133773956)-- Gnoll5(youth)
  353. end
  354. local spawn6 = math.random(0,1)
  355. if spawn6 == 1 then
  356. local Camp3Spawn6 = SpawnByLocationID(zone, 133773954)--Gnoll6 (mystic)
  357. else
  358. local Camp3Spawn6a = SpawnByLocationID(zone, 133773804)-- Gnoll6(youth)
  359. end
  360. local MerchantSpawn = math.random(0,1)
  361. if MerchantSpawn == 1 then
  362. local Camp3MerchantSpawn = SpawnByLocationID(zone, 134657)--Distressed Merchant
  363. else
  364. end
  365. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage1")
  366. end
  367. function Camp3SpawnCheck_Stage1(NPC, Spawn) --Stage 1 Living Check
  368. local zone = GetZone(NPC)
  369. local Camp3Spawn1 = GetSpawnByLocationID(zone, 133773953)
  370. local Camp3Spawn1a = GetSpawnByLocationID(zone, 133773797)
  371. local Camp3Spawn2 = GetSpawnByLocationID(zone, 133773800)
  372. local Camp3Spawn2a = GetSpawnByLocationID(zone, 133773957)
  373. local Camp3Spawn3 = GetSpawnByLocationID(zone, 133773952)
  374. local Camp3Spawn3a = GetSpawnByLocationID(zone, 133773796)
  375. local Camp3Spawn4 = GetSpawnByLocationID(zone, 133773801)
  376. local Camp3Spawn4a = GetSpawnByLocationID(zone, 133773955)
  377. local Camp3Spawn5 = GetSpawnByLocationID(zone, 133773803)
  378. local Camp3Spawn5a = GetSpawnByLocationID(zone, 133773956)
  379. local Camp3Spawn6 = GetSpawnByLocationID(zone, 133773954)
  380. local Camp3Spawn6a = GetSpawnByLocationID(zone, 133773804)
  381. if IsAlive(Camp3Spawn1) == true or IsAlive(Camp3Spawn1a) == true then
  382. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage1",1, Spawn)
  383. elseif IsAlive(Camp3Spawn2) == true or IsAlive(Camp3Spawn2a) == true then
  384. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage1",1, Spawn)
  385. elseif IsAlive(Camp3Spawn3) == true or IsAlive(Camp3Spawn3a) == true then
  386. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage1",1, Spawn)
  387. elseif IsAlive(Camp3Spawn4) == true or IsAlive(Camp3Spawn4a) == true then
  388. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage1",1, Spawn)
  389. elseif IsAlive(Camp3Spawn5) == true or IsAlive(Camp3Spawn5a) == true then
  390. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage1",1, Spawn)
  391. elseif IsAlive(Camp3Spawn6) == true or IsAlive(Camp3Spawn6a) == true then
  392. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage1",1, Spawn)
  393. else
  394. AddTimer(NPC, 6000, "Camp3_Stage2")
  395. end
  396. end
  397. function Camp3_Stage2(NPC, Spawn) --Stage 2
  398. local zone = GetZone(NPC)
  399. local Camp3_Stage2Spawn1=SpawnByLocationID(zone, 133773958)--darkpack pack leader
  400. FaceTarget(Camp3_Stage2Spawn1, Spawn)
  401. Attack(Camp3_Stage2Spawn1, Spawn)
  402. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage2")
  403. end
  404. function Camp3SpawnCheck_Stage2(NPC, Spawn) --Stage 2 Living Check
  405. local zone = GetZone(NPC)
  406. local Camp3_Stage2Spawn1 = GetSpawnByLocationID(zone, 133773958)
  407. if IsAlive(Camp2_Stage2Spawn1) == true then
  408. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage2",1, Spawn)
  409. else
  410. AddTimer(NPC, 6000, "Camp3_Stage3")
  411. end
  412. end
  413. function Camp3_Stage3(NPC, Spawn) --Stage 3 (Possible Boss)
  414. local zone = GetZone(NPC)
  415. local choice = math.random(0,100)
  416. if choice <=33 then -- % Chance for Boss to Spawn
  417. local Camp3_Stage3Spawn1=SpawnByLocationID(zone, 133773802)--Tark
  418. FaceTarget(Camp3_Stage3Spawn1, Spawn)
  419. Attack(Camp3_Stage3Spawn1, Spawn)
  420. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage3")
  421. else -- Failed Boss Spawn
  422. local Camp3ArkofPower = SpawnByLocationID(zone, 133773959)--Ark of Power
  423. local Camp3MerchantSpawn = GetSpawnByLocationID(zone, 134657)--Distressed Merchant
  424. if Camp3MerchantSpawn ~=nil then
  425. Despawn(Camp3MerchantSpawn)
  426. local Camp3GratifiedMerchant = SpawnByLocationID(zone, 133773938)--Gratified Merchant
  427. AddTimer(NPC,90000,"Camp3Reset")
  428. else
  429. AddTimer(NPC,60000,"Camp3Reset")
  430. end
  431. end
  432. end
  433. function Camp3SpawnCheck_Stage3(NPC, Spawn) --Stage 2 Living Check
  434. local zone = GetZone(NPC)
  435. local Camp3_Stage3Spawn1 = GetSpawnByLocationID(zone, 133773802)--Tark
  436. if IsAlive(Camp3_Stage2Spawn1) == true then
  437. AddTimer(NPC,6000,"Camp3SpawnCheck_Stage3",1,Spawn)
  438. else
  439. local Camp3MerchantSpawn = GetSpawnByLocationID(zone, 134657)--Distressed Merchant
  440. if Camp3MerchantSpawn ~=nil then
  441. Despawn(Camp3MerchantSpawn)
  442. local Camp3GratifiedMerchant = SpawnByLocationID(zone, 133773960)--Gratified Merchant
  443. AddTimer(NPC, 90000, "Camp3Reset",1,Spawn)
  444. else
  445. AddTimer(NPC, 10000, "Camp3Reset",1,Spawn)
  446. end
  447. end
  448. end
  449. function Camp3Reset(NPC)
  450. local zone = GetZone(NPC)
  451. local Camp3Object = GetSpawnByLocationID(zone, 133773951)
  452. local Camp3Object2 = GetSpawnByLocationID(zone, 170247)
  453. if Camp3Object~= nil then
  454. Despawn(Camp3Object)
  455. end
  456. if Camp3Object2~= nil then
  457. Despawn(Camp3Object2)
  458. end
  459. local Camp3ArkofPower = GetSpawnByLocationID(zone, 133773959)--Ark of Power
  460. if Camp3ArkofPower ~=nil then
  461. Despawn(Camp3ArkofPower)
  462. end
  463. local Camp3GratifiedMerchant = GetSpawnByLocationID(zone, 133773960)--Gratified Merchant
  464. if Camp3GratifiedMerchant ~=nil then
  465. Despawn(Camp3GratifiedMerchant)
  466. end
  467. end
  468. --- CAMP 4
  469. function Camp4Spawn(NPC, Spawn) -- Stage 1
  470. local zone = GetZone(NPC)
  471. --local Camp4Object2 = SpawnByLocationID(zone, 170247)
  472. local spawn1 = math.random(0,1)
  473. if spawn1 == 1 then
  474. local Camp4Spawn1 = SpawnByLocationID(zone, 133770865) --Gnoll1 (mystic)
  475. else
  476. local Camp4Spawn1a = SpawnByLocationID(zone, 133774023) -- Gnoll1(youth)
  477. end
  478. local spawn2 = math.random(0,1)
  479. if spawn2 == 1 then
  480. local Camp4Spawn2 = SpawnByLocationID(zone, 133770866)--Gnoll2 (mystic)
  481. else
  482. local Camp4Spawn2a = SpawnByLocationID(zone, 133774022)-- Gnoll2(youth)
  483. end
  484. local spawn3 = math.random(0,1)
  485. if spawn3 == 1 then
  486. local Camp4Spawn3 = SpawnByLocationID(zone, 133770867)--Gnoll3 (mystic)
  487. else
  488. local Camp4Spawn3a = SpawnByLocationID(zone, 133774021)-- Gnoll3(youth)
  489. end
  490. local spawn4 = math.random(0,1)
  491. if spawn4 == 1 then
  492. local Camp4Spawn4 = SpawnByLocationID(zone, 133774019)--Gnoll4 (mystic)
  493. else
  494. local Camp4Spawn4a = SpawnByLocationID(zone, 133774020)-- Gnoll4(youth)
  495. end
  496. local spawn5 = math.random(0,1)
  497. if spawn5 == 1 then
  498. local Camp4Spawn5 = SpawnByLocationID(zone, 133774017)--Gnoll5 (mystic)
  499. else
  500. local Camp4Spawn5a = SpawnByLocationID(zone, 133774025)-- Gnoll5(youth)
  501. end
  502. local spawn6 = math.random(0,1)
  503. if spawn6 == 1 then
  504. local Camp4Spawn6 = SpawnByLocationID(zone, 133774018)--Gnoll6 (mystic)
  505. else
  506. local Camp4Spawn6a = SpawnByLocationID(zone, 133774024)-- Gnoll6(youth)
  507. end
  508. local MerchantSpawn = math.random(0,1)
  509. if MerchantSpawn == 1 then
  510. local Camp4MerchantSpawn = SpawnByLocationID(zone, 134653)--Distressed Merchant
  511. else
  512. end
  513. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage1")
  514. end
  515. function Camp4SpawnCheck_Stage1(NPC, Spawn) --Stage 1 Living Check
  516. local zone = GetZone(NPC)
  517. local Camp4Spawn1 = GetSpawnByLocationID(zone, 133770865)
  518. local Camp4Spawn1a = GetSpawnByLocationID(zone, 133774023)
  519. local Camp4Spawn2 = GetSpawnByLocationID(zone, 133770866)
  520. local Camp4Spawn2a = GetSpawnByLocationID(zone, 133774022)
  521. local Camp4Spawn3 = GetSpawnByLocationID(zone, 133770867)
  522. local Camp4Spawn3a = GetSpawnByLocationID(zone, 133774021)
  523. local Camp4Spawn4 = GetSpawnByLocationID(zone, 133774019)
  524. local Camp4Spawn4a = GetSpawnByLocationID(zone, 133774020)
  525. local Camp4Spawn5 = GetSpawnByLocationID(zone, 133774017)
  526. local Camp4Spawn5a = GetSpawnByLocationID(zone, 133774025)
  527. local Camp4Spawn6 = GetSpawnByLocationID(zone, 133774018)
  528. local Camp4Spawn6a = GetSpawnByLocationID(zone, 133774024)
  529. if IsAlive(Camp4Spawn1) == true or IsAlive(Camp4Spawn1a) == true then
  530. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage1",1, Spawn)
  531. elseif IsAlive(Camp4Spawn2) == true or IsAlive(Camp4Spawn2a) == true then
  532. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage1",1, Spawn)
  533. elseif IsAlive(Camp4Spawn3) == true or IsAlive(Camp4Spawn3a) == true then
  534. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage1",1, Spawn)
  535. elseif IsAlive(Camp4Spawn4) == true or IsAlive(Camp4Spawn4a) == true then
  536. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage1",1, Spawn)
  537. elseif IsAlive(Camp4Spawn5) == true or IsAlive(Camp4Spawn5a) == true then
  538. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage1",1, Spawn)
  539. elseif IsAlive(Camp4Spawn6) == true or IsAlive(Camp4Spawn6a) == true then
  540. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage1",1, Spawn)
  541. else
  542. AddTimer(NPC, 6000, "Camp4_Stage2")
  543. end
  544. end
  545. function Camp4_Stage2(NPC, Spawn) --Stage 2
  546. local zone = GetZone(NPC)
  547. local Camp4_Stage2Spawn1=SpawnByLocationID(zone, 190448)--darkpack pack leader
  548. FaceTarget(Camp4_Stage2Spawn1, Spawn)
  549. Attack(Camp4_Stage2Spawn1, Spawn)
  550. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage2")
  551. end
  552. function Camp4SpawnCheck_Stage2(NPC, Spawn) --Stage 2 Living Check
  553. local zone = GetZone(NPC)
  554. local Camp4_Stage2Spawn1 = GetSpawnByLocationID(zone, 190448)
  555. if IsAlive(Camp4_Stage2Spawn1) == true then
  556. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage2",1, Spawn)
  557. else
  558. AddTimer(NPC, 6000, "Camp4_Stage3")
  559. end
  560. end
  561. function Camp4_Stage3(NPC, Spawn) --Stage 3 (Possible Boss)
  562. local zone = GetZone(NPC)
  563. local choice = math.random(0,100)
  564. if choice <=33 then -- % Chance for Boss to Spawn
  565. local Camp4_Stage3Spawn1=SpawnByLocationID(zone, 193391)--Tark
  566. FaceTarget(Camp4_Stage3Spawn1, Spawn)
  567. Attack(Camp4_Stage3Spawn1, Spawn)
  568. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage3")
  569. else -- Failed Boss Spawn
  570. local Camp4ArkofPower = SpawnByLocationID(zone, 133774075)--Ark of Power
  571. local Camp4MerchantSpawn = GetSpawnByLocationID(zone, 134653)--Distressed Merchant
  572. if Camp4MerchantSpawn ~=nil then
  573. Despawn(Camp4MerchantSpawn)
  574. local Camp4GratifiedMerchant = SpawnByLocationID(zone, 134690)--Gratified Merchant
  575. AddTimer(NPC,90000,"Camp4Reset")
  576. else
  577. AddTimer(NPC,60000,"Camp4Reset")
  578. end
  579. end
  580. end
  581. function Camp4SpawnCheck_Stage3(NPC, Spawn) --Stage 2 Living Check
  582. local zone = GetZone(NPC)
  583. local Camp4_Stage3Spawn1 = GetSpawnByLocationID(zone, 193391)--Tark
  584. if IsAlive(Camp4_Stage2Spawn1) == true then
  585. AddTimer(NPC,6000,"Camp4SpawnCheck_Stage3",1,Spawn)
  586. else
  587. local Camp4MerchantSpawn = GetSpawnByLocationID(zone, 134653)--Distressed Merchant
  588. if Camp4MerchantSpawn ~=nil then
  589. Despawn(Camp4MerchantSpawn)
  590. local Camp4GratifiedMerchant = SpawnByLocationID(zone, 134690)--Gratified Merchant
  591. AddTimer(NPC, 90000, "Camp4Reset",1,Spawn)
  592. else
  593. AddTimer(NPC, 10000, "Camp4Reset",1,Spawn)
  594. end
  595. end
  596. end
  597. function Camp4Reset(NPC)
  598. local zone = GetZone(NPC)
  599. local Camp4Object = GetSpawnByLocationID(zone, 170236)
  600. --local Camp4Object2 = GetSpawnByLocationID(zone, 170247)
  601. if Camp4Object~= nil then
  602. Despawn(Camp4Object)
  603. end
  604. --if Camp4Object2~= nil then
  605. --Despawn(Camp4Object2)
  606. --end
  607. local Camp4ArkofPower = GetSpawnByLocationID(zone, 133774075)--Ark of Power
  608. if Camp4ArkofPower ~=nil then
  609. Despawn(Camp4ArkofPower)
  610. end
  611. local Camp4GratifiedMerchant = GetSpawnByLocationID(zone, 134690)--Gratified Merchant
  612. if Camp4GratifiedMerchant ~=nil then
  613. Despawn(Camp4GratifiedMerchant)
  614. end
  615. end
  616. --- CAMP 5
  617. function Camp5Spawn(NPC, Spawn) -- Stage 1
  618. local zone = GetZone(NPC)
  619. --local Camp5Object2 = SpawnByLocationID(zone, 170247)
  620. local spawn1 = math.random(0,1)
  621. if spawn1 == 1 then
  622. local Camp5Spawn1 = SpawnByLocationID(zone, 133774071) --Gnoll1 (mystic)
  623. else
  624. local Camp5Spawn1a = SpawnByLocationID(zone, 133774066) -- Gnoll1(youth)
  625. end
  626. local spawn2 = math.random(0,1)
  627. if spawn2 == 1 then
  628. local Camp5Spawn2 = SpawnByLocationID(zone, 133774072)--Gnoll2 (mystic)
  629. else
  630. local Camp5Spawn2a = SpawnByLocationID(zone, 133774067)-- Gnoll2(youth)
  631. end
  632. local spawn3 = math.random(0,1)
  633. if spawn3 == 1 then
  634. local Camp5Spawn3 = SpawnByLocationID(zone, 130814)--Gnoll3 (mystic)
  635. else
  636. local Camp5Spawn3a = SpawnByLocationID(zone, 133774065)-- Gnoll3(youth)
  637. end
  638. local spawn4 = math.random(0,1)
  639. if spawn4 == 1 then
  640. local Camp5Spawn4 = SpawnByLocationID(zone, 133774070)--Gnoll4 (mystic)
  641. else
  642. local Camp5Spawn4a = SpawnByLocationID(zone, 128918)-- Gnoll4(youth)
  643. end
  644. local spawn5 = math.random(0,1)
  645. if spawn5 == 1 then
  646. local Camp5Spawn5 = SpawnByLocationID(zone, 133774069)--Gnoll5 (mystic)
  647. else
  648. local Camp5Spawn5a = SpawnByLocationID(zone, 133774068)-- Gnoll5(youth)
  649. end
  650. local spawn6 = math.random(0,1)
  651. if spawn6 == 1 then
  652. local Camp5Spawn6 = SpawnByLocationID(zone, 130815)--Gnoll6 (mystic)
  653. else
  654. local Camp5Spawn6a = SpawnByLocationID(zone, 128919)-- Gnoll6(youth)
  655. end
  656. local MerchantSpawn = math.random(0,1)
  657. if MerchantSpawn == 1 then
  658. local Camp5MerchantSpawn = SpawnByLocationID(zone, 134649)--Distressed Merchant
  659. else
  660. end
  661. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage1")
  662. end
  663. function Camp5SpawnCheck_Stage1(NPC, Spawn) --Stage 1 Living Check
  664. local zone = GetZone(NPC)
  665. local Camp5Spawn1 = GetSpawnByLocationID(zone, 1337704071)
  666. local Camp5Spawn1a = GetSpawnByLocationID(zone, 133774066)
  667. local Camp5Spawn2 = GetSpawnByLocationID(zone, 133774072)
  668. local Camp5Spawn2a = GetSpawnByLocationID(zone, 133774067)
  669. local Camp5Spawn3 = GetSpawnByLocationID(zone, 130814)
  670. local Camp5Spawn3a = GetSpawnByLocationID(zone, 133774065)
  671. local Camp5Spawn4 = GetSpawnByLocationID(zone, 133774070)
  672. local Camp5Spawn4a = GetSpawnByLocationID(zone, 128918)
  673. local Camp5Spawn5 = GetSpawnByLocationID(zone, 133774069)
  674. local Camp5Spawn5a = GetSpawnByLocationID(zone, 133774068)
  675. local Camp5Spawn6 = GetSpawnByLocationID(zone, 130815)
  676. local Camp5Spawn6a = GetSpawnByLocationID(zone, 128919)
  677. if IsAlive(Camp5Spawn1) == true or IsAlive(Camp5Spawn1a) == true then
  678. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage1",1, Spawn)
  679. elseif IsAlive(Camp5Spawn2) == true or IsAlive(Camp5Spawn2a) == true then
  680. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage1",1, Spawn)
  681. elseif IsAlive(Camp5Spawn3) == true or IsAlive(Camp5Spawn3a) == true then
  682. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage1",1, Spawn)
  683. elseif IsAlive(Camp5Spawn4) == true or IsAlive(Camp5Spawn4a) == true then
  684. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage1",1, Spawn)
  685. elseif IsAlive(Camp5Spawn5) == true or IsAlive(Camp5Spawn5a) == true then
  686. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage1",1, Spawn)
  687. elseif IsAlive(Camp5Spawn6) == true or IsAlive(Camp5Spawn6a) == true then
  688. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage1",1, Spawn)
  689. else
  690. AddTimer(NPC, 6000, "Camp5_Stage2")
  691. end
  692. end
  693. function Camp5_Stage2(NPC, Spawn) --Stage 2
  694. local zone = GetZone(NPC)
  695. local Camp5_Stage2Spawn1=SpawnByLocationID(zone, 190444)--darkpack pack leader
  696. FaceTarget(Camp5_Stage2Spawn1, Spawn)
  697. Attack(Camp5_Stage2Spawn1, Spawn)
  698. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage2")
  699. end
  700. function Camp5SpawnCheck_Stage2(NPC, Spawn) --Stage 2 Living Check
  701. local zone = GetZone(NPC)
  702. local Camp5_Stage2Spawn1 = GetSpawnByLocationID(zone, 190444)
  703. if IsAlive(Camp5_Stage2Spawn1) == true then
  704. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage2",1, Spawn)
  705. else
  706. AddTimer(NPC, 6000, "Camp5_Stage3")
  707. end
  708. end
  709. function Camp5_Stage3(NPC, Spawn) --Stage 3 (Possible Boss)
  710. local zone = GetZone(NPC)
  711. local choice = math.random(0,100)
  712. if choice <=33 then -- % Chance for Boss to Spawn
  713. local Camp5_Stage3Spawn1=SpawnByLocationID(zone, 133774073)--Tark
  714. FaceTarget(Camp5_Stage3Spawn1, Spawn)
  715. Attack(Camp5_Stage3Spawn1, Spawn)
  716. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage3")
  717. else -- Failed Boss Spawn
  718. local Camp5ArkofPower = SpawnByLocationID(zone, 133774076)--Ark of Power
  719. local Camp5MerchantSpawn = GetSpawnByLocationID(zone, 134649)--Distressed Merchant
  720. if Camp5MerchantSpawn ~=nil then
  721. Despawn(Camp5MerchantSpawn)
  722. local Camp5GratifiedMerchant = SpawnByLocationID(zone, 134690)--Gratified Merchant
  723. AddTimer(NPC,90000,"Camp5Reset")
  724. else
  725. AddTimer(NPC,60000,"Camp5Reset")
  726. end
  727. end
  728. end
  729. function Camp5SpawnCheck_Stage3(NPC, Spawn) --Stage 2 Living Check
  730. local zone = GetZone(NPC)
  731. local Camp5_Stage3Spawn1 = GetSpawnByLocationID(zone, 133774073)--Tark
  732. if IsAlive(Camp5_Stage2Spawn1) == true then
  733. AddTimer(NPC,6000,"Camp5SpawnCheck_Stage3",1,Spawn)
  734. else
  735. local Camp5MerchantSpawn = GetSpawnByLocationID(zone, 134649)--Distressed Merchant
  736. if Camp5MerchantSpawn ~=nil then
  737. Despawn(Camp5MerchantSpawn)
  738. local Camp5GratifiedMerchant = SpawnByLocationID(zone, 133774064)--Gratified Merchant
  739. AddTimer(NPC, 90000, "Camp5Reset",1,Spawn)
  740. else
  741. AddTimer(NPC, 10000, "Camp5Reset",1,Spawn)
  742. end
  743. end
  744. end
  745. function Camp5Reset(NPC)
  746. local zone = GetZone(NPC)
  747. local Camp5Object = GetSpawnByLocationID(zone, 170236)
  748. --local Camp5Object2 = GetSpawnByLocationID(zone, 170247)
  749. if Camp5Object~= nil then
  750. Despawn(Camp5Object)
  751. end
  752. --if Camp5Object2~= nil then
  753. --Despawn(Camp5Object2)
  754. --end
  755. local Camp5ArkofPower = GetSpawnByLocationID(zone, 133774076)--Ark of Power
  756. if Camp5ArkofPower ~=nil then
  757. Despawn(Camp5ArkofPower)
  758. end
  759. local Camp5GratifiedMerchant = GetSpawnByLocationID(zone, 133774064)--Gratified Merchant
  760. if Camp5GratifiedMerchant ~=nil then
  761. Despawn(Camp5GratifiedMerchant)
  762. end
  763. end
  764. --- CAMP 6
  765. function Camp6Spawn(NPC, Spawn) -- Stage 1
  766. local zone = GetZone(NPC)
  767. --local Camp6Object2 = SpawnByLocationID(zone, 170247)
  768. local spawn1 = math.random(0,1)
  769. if spawn1 == 1 then
  770. local Camp6Spawn1 = SpawnByLocationID(zone, 133774055) --Gnoll1 (mystic)
  771. else
  772. local Camp6Spawn1a = SpawnByLocationID(zone, 128913) -- Gnoll1(youth)
  773. end
  774. local spawn2 = math.random(0,1)
  775. if spawn2 == 1 then
  776. local Camp6Spawn2 = SpawnByLocationID(zone, 133774057)--Gnoll2 (mystic)
  777. else
  778. local Camp6Spawn2a = SpawnByLocationID(zone, 133774058)-- Gnoll2(youth)
  779. end
  780. local spawn3 = math.random(0,1)
  781. if spawn3 == 1 then
  782. local Camp6Spawn3 = SpawnByLocationID(zone, 133774056)--Gnoll3 (mystic)
  783. else
  784. local Camp6Spawn3a = SpawnByLocationID(zone, 133774062)-- Gnoll3(youth)
  785. end
  786. local spawn4 = math.random(0,1)
  787. if spawn4 == 1 then
  788. local Camp6Spawn4 = SpawnByLocationID(zone, 130799)--Gnoll4 (mystic)
  789. else
  790. local Camp6Spawn4a = SpawnByLocationID(zone, 133774061)-- Gnoll4(youth)
  791. end
  792. local spawn5 = math.random(0,1)
  793. if spawn5 == 1 then
  794. local Camp6Spawn5 = SpawnByLocationID(zone, 130806)--Gnoll5 (mystic)
  795. else
  796. local Camp6Spawn5a = SpawnByLocationID(zone, 133774060)-- Gnoll5(youth)
  797. end
  798. local spawn6 = math.random(0,1)
  799. if spawn6 == 1 then
  800. local Camp6Spawn6 = SpawnByLocationID(zone, 133774054)--Gnoll6 (mystic)
  801. else
  802. local Camp6Spawn6a = SpawnByLocationID(zone, 133774059)-- Gnoll6(youth)
  803. end
  804. local MerchantSpawn = math.random(0,1)
  805. if MerchantSpawn == 1 then
  806. local Camp6MerchantSpawn = SpawnByLocationID(zone, 134646)--Distressed Merchant
  807. else
  808. end
  809. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage1")
  810. end
  811. function Camp6SpawnCheck_Stage1(NPC, Spawn) --Stage 1 Living Check
  812. local zone = GetZone(NPC)
  813. local Camp6Spawn1 = GetSpawnByLocationID(zone, 1337704055)
  814. local Camp6Spawn1a = GetSpawnByLocationID(zone, 128913)
  815. local Camp6Spawn2 = GetSpawnByLocationID(zone, 133774057)
  816. local Camp6Spawn2a = GetSpawnByLocationID(zone, 133774058)
  817. local Camp6Spawn3 = GetSpawnByLocationID(zone, 133774056)
  818. local Camp6Spawn3a = GetSpawnByLocationID(zone, 133774062)
  819. local Camp6Spawn4 = GetSpawnByLocationID(zone, 130799)
  820. local Camp6Spawn4a = GetSpawnByLocationID(zone, 133774061)
  821. local Camp6Spawn5 = GetSpawnByLocationID(zone, 130806)
  822. local Camp6Spawn5a = GetSpawnByLocationID(zone, 133774060)
  823. local Camp6Spawn6 = GetSpawnByLocationID(zone, 133774054)
  824. local Camp6Spawn6a = GetSpawnByLocationID(zone, 133774059)
  825. if IsAlive(Camp6Spawn1) == true or IsAlive(Camp6Spawn1a) == true then
  826. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage1",1, Spawn)
  827. elseif IsAlive(Camp6Spawn2) == true or IsAlive(Camp6Spawn2a) == true then
  828. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage1",1, Spawn)
  829. elseif IsAlive(Camp6Spawn3) == true or IsAlive(Camp6Spawn3a) == true then
  830. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage1",1, Spawn)
  831. elseif IsAlive(Camp6Spawn4) == true or IsAlive(Camp6Spawn4a) == true then
  832. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage1",1, Spawn)
  833. elseif IsAlive(Camp6Spawn5) == true or IsAlive(Camp6Spawn5a) == true then
  834. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage1",1, Spawn)
  835. elseif IsAlive(Camp6Spawn6) == true or IsAlive(Camp6Spawn6a) == true then
  836. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage1",1, Spawn)
  837. else
  838. AddTimer(NPC, 6000, "Camp6_Stage2")
  839. end
  840. end
  841. function Camp6_Stage2(NPC, Spawn) --Stage 2
  842. local zone = GetZone(NPC)
  843. local Camp6_Stage2Spawn1=SpawnByLocationID(zone, 190438)--darkpack pack leader
  844. FaceTarget(Camp6_Stage2Spawn1, Spawn)
  845. Attack(Camp6_Stage2Spawn1, Spawn)
  846. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage2")
  847. end
  848. function Camp6SpawnCheck_Stage2(NPC, Spawn) --Stage 2 Living Check
  849. local zone = GetZone(NPC)
  850. local Camp6_Stage2Spawn1 = GetSpawnByLocationID(zone, 190438)
  851. if IsAlive(Camp6_Stage2Spawn1) == true then
  852. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage2",1, Spawn)
  853. else
  854. AddTimer(NPC, 6000, "Camp6_Stage3")
  855. end
  856. end
  857. function Camp6_Stage3(NPC, Spawn) --Stage 3 (Possible Boss)
  858. local zone = GetZone(NPC)
  859. local choice = math.random(0,100)
  860. if choice <=33 then -- % Chance for Boss to Spawn
  861. local Camp6_Stage3Spawn1=SpawnByLocationID(zone, 193390)--Tark
  862. FaceTarget(Camp6_Stage3Spawn1, Spawn)
  863. Attack(Camp6_Stage3Spawn1, Spawn)
  864. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage3")
  865. else -- Failed Boss Spawn
  866. local Camp6ArkofPower = SpawnByLocationID(zone, 133774138)--Ark of Power
  867. local Camp6MerchantSpawn = GetSpawnByLocationID(zone, 134646)--Distressed Merchant
  868. if Camp6MerchantSpawn ~=nil then
  869. Despawn(Camp6MerchantSpawn)
  870. local Camp6GratifiedMerchant = SpawnByLocationID(zone, 134690)--Gratified Merchant
  871. AddTimer(NPC,90000,"Camp5Reset")
  872. else
  873. AddTimer(NPC,60000,"Camp5Reset")
  874. end
  875. end
  876. end
  877. function Camp6SpawnCheck_Stage3(NPC, Spawn) --Stage 2 Living Check
  878. local zone = GetZone(NPC)
  879. local Camp5_Stage6Spawn1 = GetSpawnByLocationID(zone, 193390)--Tark
  880. if IsAlive(Camp6_Stage2Spawn1) == true then
  881. AddTimer(NPC,6000,"Camp6SpawnCheck_Stage3",1,Spawn)
  882. else
  883. local Camp6MerchantSpawn = GetSpawnByLocationID(zone, 134649)--Distressed Merchant
  884. if Camp6MerchantSpawn ~=nil then
  885. Despawn(Camp6MerchantSpawn)
  886. local Camp6GratifiedMerchant = SpawnByLocationID(zone, 133774063)--Gratified Merchant
  887. AddTimer(NPC, 90000, "Camp6Reset",1,Spawn)
  888. else
  889. AddTimer(NPC, 10000, "Camp6Reset",1,Spawn)
  890. end
  891. end
  892. end
  893. function Camp6Reset(NPC)
  894. local zone = GetZone(NPC)
  895. local Camp6Object = GetSpawnByLocationID(zone, 170229)
  896. --local Camp6Object2 = GetSpawnByLocationID(zone, 170247)
  897. if Camp6Object~= nil then
  898. Despawn(Camp6Object)
  899. end
  900. --if Camp6Object2~= nil then
  901. --Despawn(Camp6Object2)
  902. --end
  903. local Camp6ArkofPower = GetSpawnByLocationID(zone, 133774138)--Ark of Power
  904. if Camp6ArkofPower ~=nil then
  905. Despawn(Camp6ArkofPower)
  906. end
  907. local Camp6GratifiedMerchant = GetSpawnByLocationID(zone, 133774063)--Gratified Merchant
  908. if Camp6GratifiedMerchant ~=nil then
  909. Despawn(Camp6GratifiedMerchant)
  910. end
  911. end