Raised This Month: $198 Target: $400
 49% 

Kill Bots - kills bots when all humans are dead


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   twistedeuphoria (82)
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 02-28-2005 , 12:59   Kill Bots - kills bots when all humans are dead
Reply With Quote #1

Hi, I've again made a plugin I'm about to present here.

This is a plugin that kills bots by executing the given command when all humans are dead. You have to specify the command in a cvar and the script will execute this command SERVERSIDE when the last alive human dies or disconnects.
After the Bomb has been planted, the script automatically switches itself inactive (unless you set the cvar to override this) and the bots will be able to finish the round if the last human dies, so they get the chance to defuse.

To make life easier for server admins, I decided to implement a command that will kill all bots immediately when an Admin executed the command. This is helpful cuz Admins will only have to know a single command that will work for every bot, and the Admins won't have to be told a new command if the server owner changes the bot engine.
Example: An server owner is running Z-Bot but comes to the conclusion that he likes ePODbot much better, so he throws ZBot out and installs ePODbot. Now the other admins (if there are any) have to be told a new cmd to kill the bots. With my plugin, the others are still able to use the old command and won't need to change binds etc.
Default admin rights needed to exec the command is ADMIN_SLAY.


UPDATE

I've updated the old .sma to support a complete bot management. It can still kill the bots when the last human player dies and the cvars for this feature haven't changed, so you won't have to change anything in order to use the new version, but now this script is also able to add / remove bots in order to have a certain number of players on each team. I added this feature because many bots simply don't support it and some bots support it quite poorly, removing a CT bot if there are too many terrs and so on...

The following CVars and commands exist:
Code:
amx_killbots_cmd              <-- command used to kill the bots. It is executed when the last human player dies.
amx_killbots_cmd_addt         <-- command used to add a Terrorist bot. Executed to establish teams.
amx_killbots_cmd_addct        <-- command used to add a CT bot. Executed to establish teams.
amx_killbots_cmd_remt         <-- command used to remove a Terrorist bot. Executed to establish teams.
amx_killbots_cmd_remct        <-- command used to remove a CT bot. Executed to establish teams.
amx_rembots_bykick            <-- if set to 1, the cmd set in amx_killbots_cmd_rem(c)t is ignored and the bots are simply kicked.

amx_killbots_teamsize         <-- number of players per team - e.g. if set to 5, the script will try to establish a 5on5 game.

amx_killbots_enable           <-- enables / disables killing of the bots.
amx_killbots_enableadd        <-- enables / disables adding & removing of bots.

amx_killbots_ignorebomb       <-- if set to 0 (off), bots will not be killed after the bomb was planted, so they will be able to defend / defuse it.

amx_killbots_now              <-- exec this to kill the bots immediately no matter if bomb was planted or not.
amx_addbott_now               <-- adds a T bot to the game. Warning: if team management is on, this bot maybe removed next round start!
amx_addbotct_now              <-- adds a CT bot to the game.
amx_rembott_now               <-- removes a T bot from the game.
amx_rembotct_now              <-- removes a CT bot from the game.
CONFIG:
the commands to kill, add and remove the bots immediately just execute the commands you specified in the CVars. If you enabled remove by kick, the remove commands will kick your bots and not try to exec the cmds.


TEAM MANAGEMENT:
On every round start, the script checks how many players there are in each team. If the player count differs from the value given in the CVar "amx_killbots_teamsize", the script tries to compensate these differences by adding / removing bots. If the team has "too many" players with no bots, the script can't help it so nothing will happen.
The removing methods depend on what you set in the cvars. Usually, the script will execute the specified command and hope that this solved the problem. If you enabled "remove by kick", the script asks the server to kick a few players known as bots. If this works mainly depends on you to set the right cvar settings.


TESTED:
This whole script was tested with JoeBot (that is why the default CVars are JoeBot commands), but I think it should work with any other bot as well if the right commands are specified. You can change all the CVars' names and defaults without having to edit the whole script, just edit the #defines on the top few lines and recompile. You can even edit the format of the HUD messages by only editing a #define.


LANGUAGES:
I used a dictionary for the HUD messages. If anyone translated parts of it into their native language, please send me. I will update this thread so everyone can use it. The languages currently supported are English and German.



Idea, Coding & Testing by MistaGee (=/me :p )

Update:
Angelina sent me a romanian translation of the plugin's texts today, so I added it to the dictionary file. Thanks
Attached Files
File Type: sma Get Plugin or Get Source (killbots.sma - 4204 views - 8.3 KB)
File Type: sma Get Plugin or Get Source (killbots.sma - 5171 views - 17.2 KB)
File Type: txt killbots.txt (1.5 KB, 2553 views)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble

Last edited by MistaGee; 04-03-2007 at 18:03.
MistaGee is offline
Send a message via ICQ to MistaGee
robbob4
Senior Member
Join Date: Jan 2005
Old 03-01-2005 , 08:42  
Reply With Quote #2

I'll test this later but until then what if there are no humans in the server?
robbob4 is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 03-01-2005 , 09:28  
Reply With Quote #3

then nothing happenzzz
(hopefully cuz i didn't test this yet :p )
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
robbob4
Senior Member
Join Date: Jan 2005
Old 03-01-2005 , 18:27  
Reply With Quote #4

tested it and it does nothing when there are 0 humans because theres no event, works great GJ!
robbob4 is offline
Curryking
AMX Mod X German Moderator
Join Date: Jun 2004
Location: 51.22N / 6.77E
Old 03-01-2005 , 19:18  
Reply With Quote #5

I'm using "POD-Bot mm" and it works perfect. Great job! THX!

Greetz,
CK
Curryking is offline
robbob4
Senior Member
Join Date: Jan 2005
Old 03-02-2005 , 08:26  
Reply With Quote #6

It should work on EVERY bot if you set the correct kill all command.

PS, Also using podbot mm along with 7 other modules and 42 plugins...
robbob4 is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 03-02-2005 , 13:32  
Reply With Quote #7

thx for testing ^^

where do I get podbot_mm? i didn't yet find a link that wasn't broken :p

@robbob4: of course there is an event cuz the CS engine doesn't make a difference if a bot or a human was killed, I just counted the human players and if there are 0 humans the event is ignored.
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
LizardKing
Member
Join Date: Sep 2004
Old 03-02-2005 , 13:58  
Reply With Quote #8

man, nice job. This is a MUST HAVE for all Condition Zero servers.
__________________
LizardKing is offline
Send a message via MSN to LizardKing
robbob4
Senior Member
Join Date: Jan 2005
Old 03-02-2005 , 18:08  
Reply With Quote #9

Podbot_mm

Bots United Filebase: http://filebase.bots-united.com/inde...category&id=11

Bots United Forums: http://forums.bots-united.com
robbob4 is offline
BFG
Member
Join Date: Jun 2004
Old 05-10-2005 , 10:50  
Reply With Quote #10

OK... this is JUST what I was looking for
BUT

I got the plugin in and running, it says it is running,
but nothing happens when the last human is killed.... "SHRUG"

CZ Server using CS Bots - btw

OK I changed the kill command to bot_kill
STILL nothing...!Ahhhh!

what did I do wrong?

Thanks,
BFG
BFG is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:53.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode