Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.24 KB | None | 0 0
  1. PeasentTypes = {"mwwand1","mwwand2","mwwand3","mwwand6","mwwand4","mwwand5","mwwand10","mwwand11","mwwand12"}
  2. Noble = {"noble3","noble4","noble1","noble2"}
  3. PropsList = {"mwconst1","mwconst2","mwconst3","mwconst4","mwconst5","mwconst6","mwconst7"}
  4. Transporter1 = {}
  5. Transporter2 = {}
  6. Transporter3 = {}
  7. TransportProvider = {}
  8. FreeEngineer = {}
  9.  
  10. WorldLoaded = function()
  11. -- set up Player
  12. People = {}
  13. LumberShaks = {}
  14. Lumberer = {}
  15.  
  16. CamelShacks = {}
  17. CamelTrader = {}
  18.  
  19. --Timer = 50
  20. Timer = Utils.RandomInteger(625,1250)
  21. CamelTimer = Utils.RandomInteger(325,650)
  22.  
  23. Trigger.AfterDelay(1, function()
  24. People = Player.GetPlayers(function(P)
  25. return P.InternalName ~= "Neutral" and P.InternalName ~= "Creeps" and P.InternalName ~= "Everyone"
  26. end)
  27. end)
  28.  
  29. Trigger.AfterDelay(2,function()
  30. --print(tostring(#People) .. " player found")
  31. for i = 1,#People do
  32.  
  33. local who = People[i]
  34. --print(who.Name .. " Triggeredd!")
  35.  
  36. Trigger.AfterDelay(DateTime.Seconds(10),function()
  37. SpawnSettlers(who)
  38. end)
  39. end
  40.  
  41. LumberShaks = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  42. return C.Type == "split5"
  43. end)
  44. if LumberShaks and #LumberShaks > 0 then
  45. for i = 1, #LumberShaks do
  46. table.insert(Lumberer,"empty")
  47. end
  48. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(25,45)),CheckForLumberjacks)
  49. end
  50.  
  51. CamelShacks = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  52. return C.Type == "split6"
  53. end)
  54. if CamelShacks and #CamelShacks > 0 then
  55. for i = 1, #CamelShacks do
  56. table.insert(CamelTrader,"empty")
  57. Trigger.AfterDelay(DateTime.Seconds(1),function()
  58. SpawnACamel(CamelShacks[i])
  59. end)
  60. end
  61. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(25,45)),CheckForCamelTrader)
  62. end
  63.  
  64. Trigger.OnEnteredProximityTrigger(Map.CenterOfCell(CPos.New(24,24)), WDist.FromCells(512), function(a)
  65.  
  66.  
  67.  
  68. if a.Type == "factnew" then
  69. local fact = a
  70. table.insert(TransportProvider,fact)
  71. table.insert(Transporter1,"empty")
  72. table.insert(Transporter2,"empty")
  73. table.insert(Transporter3,"empty")
  74. table.insert(FreeEngineer,"empty")
  75. Trigger.AfterDelay(45,function() SpawnStartTransporterA(fact) end)
  76. Trigger.AfterDelay(50,function() SpawnStartTransporterB(fact) end)
  77. Trigger.AfterDelay(55,function() SpawnStartTransporterC(fact) end)
  78. Trigger.AfterDelay(60,function() FreeEngeneer(fact) end)
  79.  
  80. CallA(fact)
  81.  
  82. Trigger.OnKilled(fact,function()
  83. local index = 0
  84. for i = 1, #TransportProvider do
  85. if TransportProvider[i] == fact then
  86. index = i
  87. print("87")
  88. break
  89. end
  90. end
  91. if fact.IsDead then
  92. table.remove(TransportProvider,index)
  93. table.remove(Transporter1,index)
  94. table.remove(Transporter2,index)
  95. table.remove(Transporter3,index)
  96. table.remove(FreeEngineer,index)
  97. Trigger.RemoveProximityTrigger(ProxyTriger[index])
  98. table.remove(ProxyTriger,index)
  99. print("99")
  100. end
  101.  
  102. end)
  103. end
  104. end)
  105.  
  106. end)
  107. end
  108.  
  109. CallA = function(fact)
  110.  
  111. Trigger.OnExitedProximityTrigger(fact.CenterPosition,WDist.FromCells(5),function(b)
  112. --WorkerReturnWhenIdle(fact,b)
  113. table.insert(ProxyTriger,id)
  114. end)
  115.  
  116. end
  117.  
  118.  
  119. SpawnStartTransporterA = function(fact)
  120.  
  121. local index = 0
  122. for i = 1, #TransportProvider do
  123. if TransportProvider[i] == fact then
  124. index = i
  125. break
  126. end
  127. end
  128. if Transporter1[index] == "empty" and fact and not fact.IsDead then
  129. Transporter1[index] = Actor.Create("transporter",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  130. Transporter1[index].Move(Transporter1[index].Location+CVec.New(-1,1),3)
  131. Trigger.OnKilled(Transporter1[index],function()
  132. Trigger.AfterDelay(DateTime.Seconds(30),function()
  133. RespawnWorker(Transporter1[index], Transporter1)
  134. end)
  135. end)
  136. end
  137. end
  138. SpawnStartTransporterB = function(fact)
  139.  
  140. local index = 0
  141. for i = 1, #TransportProvider do
  142. if TransportProvider[i] == fact then
  143. index = i
  144. break
  145. end
  146. end
  147. if Transporter2[index] == "empty" and fact and not fact.IsDead then
  148. Transporter2[index] = Actor.Create("transporter",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  149. Transporter2[index].Move(Transporter2[index].Location+CVec.New(0,1),3)
  150. Trigger.OnKilled(Transporter2[index],function()
  151. Trigger.AfterDelay(DateTime.Seconds(30),function()
  152. RespawnWorker(Transporter2[index], Transporter2)
  153. end)
  154. end)
  155. end
  156. end
  157. SpawnStartTransporterC = function(fact)
  158.  
  159. local index = 0
  160. for i = 1, #TransportProvider do
  161. if TransportProvider[i] == fact then
  162. index = i
  163. break
  164. end
  165. end
  166. if Transporter3[index] == "empty" and fact and not fact.IsDead then
  167. Transporter3[index] = Actor.Create("transporter",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  168. Transporter3[index].Move(Transporter3[index].Location+CVec.New(1,1),3)
  169. Trigger.OnKilled(Transporter3[index],function()
  170. Trigger.AfterDelay(DateTime.Seconds(30),function()
  171. RespawnWorker(Transporter3[index], Transporter3)
  172. end)
  173. end)
  174. end
  175.  
  176. end
  177. FreeEngeneer = function(fact)
  178.  
  179. local index = 0
  180. for i = 1, #TransportProvider do
  181. if TransportProvider[i] == fact then
  182. index = i
  183. break
  184. end
  185. end
  186. if FreeEngineer[index] == "empty" and fact and not fact.IsDead then
  187. FreeEngineer[index] = Actor.Create("engeneer",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  188. FreeEngineer[index].Move(FreeEngineer[index].Location+CVec.New(0,2),3)
  189. Trigger.OnKilled(FreeEngineer[index],function()
  190. Trigger.AfterDelay(DateTime.Seconds(30),function()
  191. RespawnWorker(FreeEngineer[index], FreeEngineer)
  192. end)
  193. end)
  194. end
  195.  
  196. end
  197.  
  198. WorkerReturnWhenIdle = function (fact, worker)
  199.  
  200. local index = nil
  201. local fact = nil
  202.  
  203. for i = 1, #TransportProvider do
  204. if TransportProvider[i] == fact then
  205. index = i
  206. print("196")
  207. break
  208. end
  209. end
  210.  
  211. Trigger.OnIdle(worker,function()
  212. if fact and not fact.IsDead and worker and not worker.IsDead and math.abs(worker.Location.X - fact.Location.X) > 5 and math.abs(worker.Location.Y - fact.Location.Y) > 5 then
  213. worker.Move(fact.Location+CVec.New(2,1),5)
  214. end
  215. end)
  216.  
  217. end
  218.  
  219.  
  220. RespawnWorker = function(Worker, tablevar)
  221.  
  222.  
  223. local index = nil
  224. local fact = nil
  225.  
  226. for i = 1, #tablevar do
  227. if tablevar[i] == Worker then
  228. index = i
  229. break
  230. end
  231. end
  232.  
  233. if index then
  234.  
  235. if TransportProvider[index] and not TransportProvider[index].IsDead then
  236. fact = TransportProvider[index]
  237. end
  238.  
  239. if Transporter1[index] == Worker and not Transporter3[index].IsDead and not fact.IsDead and fact then
  240.  
  241. Transporter1[index] = Actor.Create("transporter",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  242. Transporter1[index].Move(Transporter1[index].Location+CVec.New(0,1),3)
  243. Trigger.OnKilled(Transporter1[index],function()
  244. Trigger.AfterDelay(DateTime.Seconds(30),function()
  245. RespawnWorker(Transporter1[index], Transporter1)
  246. end)
  247. end)
  248.  
  249. elseif Transporter2[index] == Worker and not Transporter3[index].IsDead and not fact.IsDead and fact then
  250.  
  251. Transporter2[index] = Actor.Create("transporter",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  252. Transporter2[index].Move(Transporter2[index].Location+CVec.New(0,1),3)
  253. Trigger.OnKilled(Transporter2[index],function()
  254. Trigger.AfterDelay(DateTime.Seconds(30),function()
  255. RespawnWorker(Transporter2[index], Transporter2)
  256. end)
  257. end)
  258.  
  259. elseif Transporter3[index] == Worker and not Transporter3[index].IsDead and not fact.IsDead and fact then
  260.  
  261. Transporter3[index] = Actor.Create("transporter",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  262. Transporter3[index].Move(Transporter3[index].Location+CVec.New(0,1),3)
  263. Trigger.OnKilled(Transporter3[index],function()
  264. Trigger.AfterDelay(DateTime.Seconds(30),function()
  265. RespawnWorker(Transporter3[index], Transporter3)
  266. end)
  267. end)
  268. elseif FreeEngineer[index] == Worker and not FreeEngineer[index].IsDead and not fact.IsDead and fact then
  269.  
  270. FreeEngineer[index] = Actor.Create("engeneer",true,{Owner = fact.Owner ,Location = fact.Location+CVec.New(1,1)})
  271. FreeEngineer[index].Move(FreeEngineer[index].Location+CVec.New(0,1),3)
  272. Trigger.OnKilled(FreeEngineer[index],function()
  273. Trigger.AfterDelay(DateTime.Seconds(30),function()
  274. RespawnWorker(FreeEngineer[index], FreeEngineer)
  275. end)
  276. end)
  277. end
  278. end
  279. end
  280.  
  281.  
  282. CheckForCamelTrader = function()
  283.  
  284. if CamelShacks and #CamelShacks > 0 then
  285. for i = 1, #CamelShacks do
  286. if CamelTrader[i] == "empty" then
  287. --print("Line 107, Camel: " .. tostring(CamelShacks[i].Location))
  288. table.insert(CamelTrader,i,Actor.Create("cameltrader",true,{Owner = CamelShacks[i].Owner,Location = CamelShacks[i].Location}))
  289. CamelTrader[i].Move(CamelTrader[i].Location+CVec.New(0,1),3)
  290. elseif CamelTrader[i].IsDead then
  291. table.remove(CamelTrader,i)
  292. --print("Line 111, Camel: " .. tostring(CamelShacks[i].Location))
  293. table.insert(CamelTrader,i,Actor.Create("cameltrader",true,{Owner = CamelShacks[i].Owner,Location = CamelShacks[i].Location}))
  294. CamelTrader[i].Move(CamelTrader[i].Location+CVec.New(0,1),3)
  295. end
  296. end
  297. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(25,45)),CheckForCamelTrader)
  298. end
  299. end
  300.  
  301. CheckForLumberjacks = function()
  302.  
  303. if LumberShaks and #LumberShaks > 0 then
  304. for i = 1, #LumberShaks do
  305. if Lumberer[i] == "empty" then
  306. table.insert(Lumberer,i,Actor.Create("mwlumberer",true,{Owner = LumberShaks[i].Owner,Location = LumberShaks[i].Location}))
  307. --print("Line 107, Lumberer: " .. tostring(LumberShaks[i].Location)); Lumberer[i].Move(Lumberer[i].Location+CVec.New(0,1),3)
  308. elseif Lumberer[i].IsDead then
  309. table.remove(Lumberer,i)
  310. table.insert(Lumberer,i,Actor.Create("mwlumberer",true,{Owner = LumberShaks[i].Owner,Location = LumberShaks[i].Location}))
  311. --print("Line 107, Lumberer: " .. tostring(LumberShaks[i].Location)); table.insert(Lumberer,i,Actor.Create("mwlumberer",true,{Owner = LumberShaks[i].Owner,Location = LumberShaks[i].Location}))
  312. Lumberer[i].Move(Lumberer[i].Location+CVec.New(0,1),3)
  313. end
  314. end
  315. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(25,45)),CheckForLumberjacks)
  316. end
  317. end
  318.  
  319. SpawnACamel = function(Lactor)
  320.  
  321. local actors = Map.ActorsInCircle(Map.CenterOfCell(Lactor.Location),WDist.FromCells(8),function(C)
  322. return (C.Type == "mwcamel" or C.Type == "grownmwcamel") and (not C.IsDead)
  323. end)
  324.  
  325. if #actors < 9 and Lactor and (not Lactor.IsDead) then
  326. local camel = Actor.Create("mwcamel",true,{Owner = Lactor.Owner,Location = Lactor.Location+CVec.New(1,0)})
  327. camel.Move(camel.Location+CVec.New(0,1),3)
  328. end
  329.  
  330. end
  331.  
  332.  
  333.  
  334.  
  335. Talkagain = function(Actor)
  336. if Actor and (not Actor.IsDead) then
  337. Actor.GrantCondition("Talking",Utils.RandomInteger(150,500))
  338. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(15,90)),function()
  339. if Actor and (not Actor.IsDead) then
  340. Talkagain(Actor)
  341. end
  342. end)
  343. end
  344. end
  345.  
  346. SpawnSettlers = function(Player)
  347.  
  348.  
  349. local who = Player
  350. local hut = nil
  351. local largehuts = {}
  352. local huts = {}
  353. local peasantss = {}
  354. local peasent = nil
  355. local PeasType = nil
  356. local castles = {}
  357. local nobles = {}
  358. local Facts = {}
  359. local Chicken = {}
  360.  
  361. peasantss = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  362. return (C.Type == "mwwand1" or C.Type == "mwwand2" or C.Type == "mwwand3" or C.Type == "mwwand4" or C.Type == "mwwand5" or C.Type == "mwwand6" or C.Type == "mwwand10" or C.Type == "mwwand11" or C.Type == "mwwand12") and C.Owner == who
  363. end)
  364.  
  365. Chicken = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  366. return (C.Type == "mwchick1") and C.Owner == who
  367. end)
  368.  
  369. huts = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  370. return (C.Type == "nukenew" or C.Type == "sulnuke" or C.Type == "nodnuke" ) and C.Owner == who
  371. end)
  372.  
  373. largehuts = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  374. return (C.Type == "nuk2new" or C.Type == "sulnuk2" or C.Type == "nodnuk2") and C.Owner == who
  375. end)
  376.  
  377. Facts = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  378. return C.Type == "factnew" and C.Owner == who
  379. end)
  380.  
  381. if #peasantss < (#huts*2 + #largehuts*3) then
  382.  
  383. if #largehuts ~= 0 and #huts ~= 0 then
  384.  
  385. local rnd = Utils.RandomInteger(1,3)
  386. if rnd == 1 and #huts > 0 then
  387. hut = Utils.Random(huts)
  388. elseif rnd == 2 and #largehuts > 0 then
  389. hut = Utils.Random(largehuts)
  390. end
  391.  
  392. elseif #largehuts > 0 then
  393. hut = Utils.Random(largehuts)
  394. elseif #huts > 0 then
  395. hut = Utils.Random(huts)
  396. elseif #Facts > 0 then
  397. hut = Utils.Random(Facts)
  398. end
  399.  
  400. PeasType = Utils.Random(PeasentTypes)
  401.  
  402. if hut and (not hut.IsDead) then
  403. --print("Line 424, Peasant: " .. tostring(hut.Location))
  404. peasent = Actor.Create(PeasType,true,{Owner = who,Location = hut.Location+CVec.New(1,1)})
  405. peasent.Move(peasent.Location+CVec.New(0,1),3)
  406. table.insert(peasantss,peasent)
  407.  
  408. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(30,150)),function()
  409. if peasent and (not peasent.IsDead) then
  410. Talkagain(peasent)
  411. end
  412. end)
  413.  
  414.  
  415. if (#peasantss + #nobles) > #Chicken*5 and hut and (not hut.IsDead) then
  416. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(25,100)),function()
  417. if hut and (not hut.IsDead) then
  418. --print("Line 439, Chicken: " .. tostring(hut.Location))
  419. local chicko = Actor.Create("mwchick1",true,{Owner = who,Location = hut.Location+CVec.New(1,2)})
  420. chicko.Move(chicko.Location+CVec.New(0,1),3)
  421. end
  422. end)
  423. end
  424. end
  425.  
  426. end
  427.  
  428. nobles = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  429. return (C.Type == "noble1" or C.Type == "noble2" or C.Type == "noble3" or C.Type == "noble4") and C.Owner == who
  430. end)
  431.  
  432. castles = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  433. return (C.Type == "castle" or C.Type == "castle2" or C.Type == "sulcastle") and C.Owner == who
  434. end)
  435.  
  436.  
  437.  
  438. landlord = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  439. return C.Type == "noble5" and C.Owner == who
  440. end)
  441.  
  442. if #landlord < (#castles) and #castles > 0 then
  443.  
  444. hut = Utils.Random(castles)
  445. peasent = nil
  446.  
  447. if hut and (not hut.IsDead) then
  448. --print("Line 469, Noble: " .. tostring(hut.Location))
  449. peasent = Actor.Create("noble5",true,{Owner = who,Location = hut.Location+CVec.New(1,2)})
  450. peasent.Move(peasent.Location+CVec.New(0,1),3)
  451.  
  452. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(15,90)),function()
  453. if (not peasent.IsDead) and peasent then
  454. Talkagain(peasent)
  455. end
  456. end)
  457. end
  458. elseif #nobles < (#castles+4) and #castles > 0 then
  459.  
  460. peasent = nil
  461.  
  462.  
  463. hut = Utils.Random(castles)
  464. PeasType = Utils.Random(Noble)
  465.  
  466. if hut and (not hut.IsDead) then
  467. --print("Line 488, Noble: " .. tostring(hut.Location))
  468. peasent = Actor.Create(PeasType,true,{Owner = who,Location = hut.Location+CVec.New(1,2)})
  469. peasent.Move(peasent.Location+CVec.New(0,1),3)
  470. table.insert(peasantss,peasent)
  471.  
  472. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(15,90)),function()
  473. if peasent and (not peasent.IsDead) then
  474. Talkagain(peasent)
  475. end
  476. end)
  477. end
  478. end
  479.  
  480. if (#largehuts + #huts) == 0 then
  481. Trigger.AfterDelay(DateTime.Seconds(10),function()
  482. SpawnSettlers(who)
  483. SpawnHunter(who)
  484. end)
  485. else
  486. Trigger.AfterDelay(DateTime.Seconds(10+math.floor(100/((#castles*3 +#largehuts*2 + #huts +2)/2))),function()
  487. SpawnSettlers(who)
  488. SpawnHunter(who)
  489. end)
  490. end
  491.  
  492. local Stuff = {}
  493. local Spawn = nil
  494. local dep = nil
  495. local here = {}
  496. local Factor = nil
  497.  
  498. here = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  499. return (C.Type == "nukenew" or C.Type == "sulnuke" or C.Type == "sulnuk2" or C.Type == "nuk2new" or C.Type == "nodnuke" or C.Type == "nodnuk2") and C.Owner == who
  500. end)
  501.  
  502. Stuff = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  503. return (C.Type == "mwconst1" or C.Type == "mwconstback" or C.Type == "prop1" or C.Type == "prop2" or C.Type == "prop3" or C.Type == "prop4" or C.Type == "prop5" or C.Type == "prop6" or C.Type == "prop7" ) and C.Owner == who
  504. end)
  505.  
  506. if #peasantss > ((#Stuff+1)*4) and #here > 0 and #Facts > 0 then
  507.  
  508. Spawn = Utils.Random(here)
  509. Factor = Utils.Random(Facts)
  510.  
  511.  
  512. Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3,8)),function()
  513. if Spawn and Factor and (not Factor.IsDead) and (not Spawn.IsDead) then
  514. --print("Line 533, Props: " .. tostring(hut.Location))
  515. dep = Actor.Create(Utils.Random(PropsList),true,{Owner = who,Location = Factor.Location+CVec.New(1,1)})
  516.  
  517. dep.Move(dep.Location+CVec.New(0,1),3)
  518. dep.Move(Spawn.Location+CVec.New(Utils.RandomInteger(-4,5),Utils.RandomInteger(-4,5)),5)
  519. dep.Deploy()
  520. end
  521. end)
  522.  
  523. end
  524. end
  525.  
  526. SpawnHunter = function(Player)
  527.  
  528. local who = Player
  529. local hunteres = {}
  530. local hunter = nil
  531. local hut = nil
  532. local Facts = {}
  533. local peasent = nil
  534. local Add = 0
  535. local Smiths = {}
  536. local Vehicle = {}
  537.  
  538. Smiths = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  539. return (C.Type == "hqnod" or C.Type == "sulcastle") and C.Owner == who
  540. end)
  541.  
  542. Vehicle = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  543. return (C.Type == "stall" or C.Type == "nodstall" or C.Type == "sulmystic") and C.Owner == who
  544. end)
  545.  
  546.  
  547. hunteres = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  548. return (C.Type == "hunter") and C.Owner == who
  549. end)
  550.  
  551. Facts = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(C)
  552. return C.Type == "factnew" and C.Owner == who
  553. end)
  554.  
  555. if #Facts > 0 then
  556. hut = Utils.Random(Facts)
  557. end
  558.  
  559. if #Smiths > 0 then
  560. Add = Add+1
  561. end
  562. if #Vehicle > 0 then
  563. Add = Add+1
  564. end
  565.  
  566. if (#hunteres < (#Facts+Add)) and hut then
  567.  
  568. if hut and (not hut.IsDead) then
  569. peasent = Actor.Create("hunter",true,{Owner = who,Location = hut.Location+CVec.New(1,1)})
  570. peasent.Move(peasent.Location+CVec.New(0,1),3)
  571. end
  572. end
  573. end
  574.  
  575. Tick = function()
  576.  
  577. CamelTimer = CamelTimer-1
  578. if CamelTimer < 1 then
  579. if CamelShacks and #CamelShacks > 0 then
  580. for i = 1, #CamelShacks do
  581. SpawnACamel(CamelShacks[i])
  582. end
  583. end
  584. CamelTimer = Utils.RandomInteger(325,650)
  585. end
  586.  
  587. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement