Now
Bots will build turrets, dispensers, supplies, gate fields, teleporter entrances and teleporter exits.
Later (maybe)
Bots will repair and upgrade buildings.
Bots will change the item a supply gives.
Bots will build barricades, walls and barbed wire.
Bots will avoid enemy gate fields and barbed wire, if possible.
Bots will place mines and laser mines.
Bots will use portal guns.
Bots will change the item a supply gives.
Bots will build barricades, walls and barbed wire.
Bots will avoid enemy gate fields and barbed wire, if possible.
Bots will place mines and laser mines.
Bots will use portal guns.
More important problems (not in current script)
LUA ERROR: bots/includes/build.lua:16: 'then' expected near 'exists'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
--BUILD function fai_build(id) 	local money=player(id,"money") 	if playerweapons(id,74) then 		ai_selectweapon(id, 74) 		px=player(id,"tilex") 		py=player(id,"tilex") 		-- 20 Search Attempts 		for i=1,20 do 			-- Random Adjacend 			x=px+math.random(-1,1) 			y=py+math.random(-1,1) 			-- Not the player tile itself 			if (x~=px or y~=py) then 				if player(id,1) then 					if object(x,y) exists==true then 						if object(x,y) team==1 then 							if object(x,y) health<10 then 								local repair=math.random(0,4) 								if repair==4 then ai_attack(id) end 							elseif object(x,y) health<25 then 								ai_attack(id) 								end 							elseif object(x,y) health<50 then 								local repair=math.random(0,1) 								if repair==1 then ai_attack(id) end 							elseif object(x,y) health<75 then 								local repair=math.random(0,2) 								if repair==2 then ai_attack(id) end 							elseif object(x,y) health<100 then 								local repair=math.random(0,3) 								if repair==3 then ai_attack(id) end 							else 							end 						end 					else 						fai_buildstart(id) 					end 				elseif player(id,2) then 					if object(x,y) exists==true then 						if object(x,y) team==1 then 							if object(x,y) health<10 then 								local repair=math.random(0,4) 								if repair==4 then ai_attack(id) end 							elseif object(x,y) health<25 then 								ai_attack(id) 								end 							elseif object(x,y) health<50 then 								local repair=math.random(0,1) 								if repair==1 then ai_attack(id) end 							elseif object(x,y) health<75 then 								local repair=math.random(0,2) 								if repair==2 then ai_attack(id) end 							elseif object(x,y) health<100 then 								local repair=math.random(0,3) 								if repair==3 then ai_attack(id) end 							else 							end 						end 					else 						fai_buildstart(id) 					end 				end 			end 		end 	end end --BUILD function fai_buildstart(id) 	if money==16000 then 		local build=math.random(0,5) 			if build==0 then ai_build(id,6,x,y) -- gate field 				elseif build==1 then ai_build(id,7,x,y) -- dispenser 				elseif build==2 then ai_build(id,8,x,y) -- turret 				elseif build==3 then ai_build(id,9,x,y) -- supply 				elseif build==4 then ai_build(id,13,x,y) -- teleporter entrance 				elseif build==5 then ai_build(id,14,x,y) end -- teleporter exit 			elseif money>=10000 then 				local build=math.random(0,3) 				if build==1 then ai_build(id,7,x,y) -- dispenser 				elseif build==2 then ai_build(id,8,x,y) -- turret 				elseif build==3 then ai_build(id,9,x,y) end -- supply 			elseif money>=5000 then 				local build=math.random(0,3) 				if build==1 then ai_build(id,14,x,y) -- teleporter exit 				elseif build==2 then ai_build(id,7,x,y) -- dispenser 				elseif build==3 then ai_build(id,7,x,y) end -- dispenser 			end 		end 	end end
You can: Use it in your server.
You can NOT: Steal it, say it's yours, edit without permission. I may change that last rule.
edited 15×, last 13.04.14 04:51:31 pm
Approved by Infinite Rain
Download
11 kb, 931 Downloads