Construction Bots 
17 comments Not enough players in your construction server, but you feel like bots make it boring? Well, I made a bot script where bots actually build some buildings every now and then, so problem solved. Note however, they don't have a building pattern. They also won't build barricades, walls and barbed wires.
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.
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

Comments
17 comments



Log in!
You need to log in to be able to write comments!Log in
"Problems >
• The bots "shoot" with their wrench."
Would you be surprised if I told you majority of new players in zombie mod use wrenches as their weapon lol
Also does this work on zombie mode ?
• The bots "shoot" with their wrench."
Would you be surprised if I told you majority of new players in zombie mod use wrenches as their weapon lol
Also does this work on zombie mode ?
Dude, stop pushing. It's against the rules. Make one huge update and then mark it as new. Everytime you add another letter to your script, you shouldn't mark it as new.

@
Accurator: When your Done with the "Problem" then you should update it, because I think its great how you done it. maybe let one of the Pro Lua scripters look at it To see if there any problem or do it yourself
Great Work.



Awesome script, 10/10... There are much bot scripts but no one did made one for building... Now i can leave a server with players and bots... Everyone build and its okay :D!
I'm not very good at scripting so I don't really understand what to change... Here's my script...
Code:
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
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
--BUILD
function fai_build(id)
local money=player(id,"money")
--weapon should be checked here
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
--Here the tile should be checked to see if there's a building on it, and if so, what team it belongs to.
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
function fai_build(id)
local money=player(id,"money")
--weapon should be checked here
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
--Here the tile should be checked to see if there's a building on it, and if so, what team it belongs to.
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
@
Accurator: I'll agree with
gUtZ: Either put normal screenshots or I'll remove this file.
// Glad to see you changed them.
For your questions :
Loop all objects
object
Check team
----
Select the player
playerweapons
Check item


// Glad to see you changed them.
For your questions :




----




edited 1×, last 11.04.14 03:24:09 pm
Actually, they don't. You can give them the command to do so, sure, but that's just what this script does.



