Files

> > CS2D > Lua Scripts > Construction Bots
Files overviewCS2D overviewLua Scripts overview

English Construction Bots >

17 comments11 kb, 916 Downloads

old Construction Bots

Accurator
User Off Offline

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.

Now >


Later (maybe) >


Problems >


Bugfixes >


Questions >


More important problems (not in current script) >


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 Download

11 kb, 916 Downloads

Comments

17 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

CrazyPenguin
User Off Offline

"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 ?

old

SSGLemon
User Off Offline

What happens to my bot,he cannot move! Help me but i like this!
I like it!

old

Ma7moud YT
BANNED Off Offline

not bad
I like it!
edited 1×, last 08.02.17 07:22:52 pm

old

SSGLemon
User Off Offline

wtf??? bots can't move how to make it move??
I like it!

old

Thug Life
User Off Offline

Awesome script. Keep it this great work.
I like it!

old

Law_
User Off Offline

Shoot with their Wrench LOL, or even Throw It...
I like it!

old

Rainoth
Moderator Off Offline

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.

old :o

fabiss
User Off Offline

nice one
I like it!

old

deadlox995
User Off Offline

nice dude :D,i'm like it!
I like it!

old

Sparty
Reviewer Off Offline

@user 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.
I like it!

old

Junior3534
User Off Offline

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 like it!

old

Lobwver
User Off Offline

:user nikolaXX... the bots can´t build without this script...

Good work :user Accurator. Fix the bugs and i download this!
I like it!

old

Accurator
User Off Offline

I'm not very good at scripting so I don't really understand what to change... Here's my script...

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
--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

old

Rainoth
Moderator Off Offline

@user Accurator: I'll agree with user gUtZ: Either put normal screenshots or I'll remove this file.

// Glad to see you changed them.

For your questions :
• Loop all objects
• cs2d lua cmd object
• Check team
----
• Select the player
• cs2d lua cmd playerweapons
• Check item
edited 1×, last 11.04.14 03:24:09 pm

old

gUtZ
User Off Offline

I like how there's "How to take screenshots?" right under the window. Oh, the irony.

old

Accurator
User Off Offline

Actually, they don't. You can give them the command to do so, sure, but that's just what this script does.

old

nikolaXX
User Off Offline

you know,bots already can construct but they just construct random stuff so this is like making a script thats already in the game
To the start Previous 1 Next To the start