Bot Possession Script (Update 2) 
19 comments Hello community,
This is the release of a new script which allows you to control a bot whenever you are dead (pretty much the same as in CS:GO).
Thank you,
sayori, for this idea.
Feel free to upload a better version or edit this.
Known bugs:
- when you control an opponent´s bot you will stay on the enemy team (reported by
WexDex)
- you do not get the visual skin of the bot when you control him (reported by
Seekay)
- you do not get special items if you control the bot (like the nightvision) because these are unequipable (console will say that it can lead to problems) - except the bomb (reported by
Seekay)
New updates includes
v2
added: if you control a bot then every award (like a kill) goes to the bot. (reported by
VADemon )
v2
a better weapon change system
v3
optimization stuff
v3
fixed bomb/flag bug (reported by
Seekay )
v3
fixed bug where you can´t control bot even when the chat says you do (reported by
Seekay )
How does it work:
Just press [F2] (or serveraction key 1) to get control.
Of course this only works if there is a living bot and you are dead!
You will respawn with the bot´s values (health, weapons, etc).
Note: Everything you do doesn´t affect your stats and you only can control one bot per round!
Can I edit it?
Yes, you can do whatever you want. It makes me happy if you use it
. I tried to explain my script (--comments) as best as I can.
Alternative you can delete the whole botctrl_serveraction function and use your own event. Just include my script and call botctrl_controlbot(id) (id = player id). This function returns false if there is no bot and true if player is a bot now.
Do it on a similiar way I did.
Note: if you save the player score in a .txt file (or similiar) and the player leaves while he is a bot his stats might get corrupted!
Easy edit: open the file and go to 'team_sens' (CTRL+F -> "team_sens"). Edit this variable to choose if the player is able to control bots of the other team.
Set it to 'true' if the players are only able to control bots of their own team (e.g.: competitive) and set it to 'false' if the players are able to control all bots (e.g.: casual).
I found a bug or I want to contact you:
You can write a comment below or send me a message.
This is the 2nd updated version.
I like all kinds of feedback!
How to install?
You have three options:
Autorun - fast easy and most recommend:
.1 go to \Counter Strike 2D\sys\lua\autorun\ and extract botcontrol.lua.
Manual - slow but you have a better overview of your script:
.1 go to \Counter Strike 2D\sys\lua\ and extract botcontrol.lua
.2 open CS2D -> New Game -> More Settings -> mp_luaserver = botcontrol.lua -> Apply
Server.lua - slow but you have a better overview of your multiple scripts:
.1 go to \Counter Strike 2D\sys\lua\ and extract botcontrol.lua
.2 open server.lua and add a new line dofile(sys/lua/botcontrol.lua)
Thanks for reading.
This is the release of a new script which allows you to control a bot whenever you are dead (pretty much the same as in CS:GO).
Thank you,

Feel free to upload a better version or edit this.
Known bugs:
- when you control an opponent´s bot you will stay on the enemy team (reported by

- you do not get the visual skin of the bot when you control him (reported by

- you do not get special items if you control the bot (like the nightvision) because these are unequipable (console will say that it can lead to problems) - except the bomb (reported by



v2


v2

v3

v3


v3



Just press [F2] (or serveraction key 1) to get control.
Of course this only works if there is a living bot and you are dead!
You will respawn with the bot´s values (health, weapons, etc).
Note: Everything you do doesn´t affect your stats and you only can control one bot per round!

Yes, you can do whatever you want. It makes me happy if you use it

Alternative you can delete the whole botctrl_serveraction function and use your own event. Just include my script and call botctrl_controlbot(id) (id = player id). This function returns false if there is no bot and true if player is a bot now.
Do it on a similiar way I did.
Note: if you save the player score in a .txt file (or similiar) and the player leaves while he is a bot his stats might get corrupted!
Easy edit: open the file and go to 'team_sens' (CTRL+F -> "team_sens"). Edit this variable to choose if the player is able to control bots of the other team.
Set it to 'true' if the players are only able to control bots of their own team (e.g.: competitive) and set it to 'false' if the players are able to control all bots (e.g.: casual).

You can write a comment below or send me a message.
This is the 2nd updated version.
I like all kinds of feedback!

You have three options:

.1 go to \Counter Strike 2D\sys\lua\autorun\ and extract botcontrol.lua.

.1 go to \Counter Strike 2D\sys\lua\ and extract botcontrol.lua
.2 open CS2D -> New Game -> More Settings -> mp_luaserver = botcontrol.lua -> Apply

.1 go to \Counter Strike 2D\sys\lua\ and extract botcontrol.lua
.2 open server.lua and add a new line dofile(sys/lua/botcontrol.lua)
Thanks for reading.
edited 12×, last 02.08.16 01:58:24 pm

Comments
19 comments



Log in!
You need to log in to be able to write comments!Log in
Oh no...Sorry but I stabbed them to death,ILL BUY NEW ONES I promise,don't hurt me!
This script is good. (again)
This script is good. (again)
Pro gaming network i see u everywhere saying OH I dont liek dis oh no i see something cool i will just hate on it because i cant make anything better wuaa
If u dont have anything nice to say then dont say anything.
Other than that this script is good!
dont like sorry this rubbish
If u dont have anything nice to say then dont say anything.
Other than that this script is good!
dont like sorry this rubbish


you do not get special items if you control the bot (like the nightvision) because these are unequipable (console will say that it can lead to problems)
How about spawning the items at the last position of the bot. When the player spawns on it he will get them anyways.

There are still a lot of problems, one of which
Seekay stated.
Still, I like the effort and thought you have put into this, and it nearly mimics CS:GO's bot control feature.

Still, I like the effort and thought you have put into this, and it nearly mimics CS:GO's bot control feature.

Taking control over a T bot who plants a bomb will make the bomb disappear. I suppose that's because "you do not get special items". That's a problem which needs to be fixed, though. Maybe place a bomb at the same spot? You just gotta pick it up, then.
Also, sometimes it just doesn't work. I could spam F2 and it would say I already gained control over a bot, but I didn't, I was dead. No idea how I did that, though.
Not the best implementation, but I like the idea, wish DC could implement his own, better version of it as a feature in a future update, right after he gives the burning turtle from Stranded II its well deserved comeback.
Also, sometimes it just doesn't work. I could spam F2 and it would say I already gained control over a bot, but I didn't, I was dead. No idea how I did that, though.
Not the best implementation, but I like the idea, wish DC could implement his own, better version of it as a feature in a future update, right after he gives the burning turtle from Stranded II its well deserved comeback.
This just spawns you at the position of the bot, and kills the bot. And woow! You took control of it. LMAO. Hell no
For a moment I've really thought you have made a bot control script... You scared me for a second.
This is easy, unoriginal, but not useless. Still the name is confusing as it was for me, I would be more for... Bots Possession Script.
This is easy, unoriginal, but not useless. Still the name is confusing as it was for me, I would be more for... Bots Possession Script.
30.04.15 10:46:18 pm
I don't wanna know how many bugs it has. First, what comes into my mind is the round restart and gained money/points.



