CS Server Bot
Posted by bunkahumpa
Saturday, March 05, 2005
Description: In-Game bot for mIRC and CS 1.6 (not source)

Current Version: 1.7 - April 13th, 2006
Get it here [bunkahumpa.lookitsbobby.com]

Contents:
1. What is it?
2. Instructions
3. Additional Comments
4. Updates
5. Command List


1. What is it?
The CS Server Bot is an mIRC script that receives a Half-Life: Counter-Strike (v1.6) server's logs and displays them in a visually-pleasing way rather than raw logs. It allows authorized users (by SteamID) access to RCON commands and bot features in-game by using commands in either messagemode (1 or 2; say or say_team). It is mostly meant to be used in private servers for competitive play.

2. Instructions

Step 1: Download the script
Your browser will probably show the code for the file (like as a text file) instead of downloading it as a regular file. If this is the case, either:

go to file -> save as and save it in your mIRC directory (the easy way). Then go into mIRC and hit alt + r. Click on the remote tab and go to file->load and browse into your mIRC directory for csbot.mrc.

OR

Hit control + a on your keyboard and copy the highlighted text. Go into your mIRC and hit alt + r. Make sure you are in the remote tab and that it is a new script file (file -> new). Paste the code there.

If the "save file as.." dialog of your browser pops up, save it into your mIRC directory. Go into mIRC and hit alt + r. Click on the remote tab and go to file->load and browse into your mIRC directory for csbot.mrc.

If it asks you to perform commands when the script is loaded, press YES!

**IF YOU ARE UPDATING FROM AN OLDER VERSION**
Do what it says above and if the older version is currently loaded in mIRC type "/reload -rs csbot.mrc" (without the quotes) in mIRC.

Step 2: Setting up the script
Right-click in your mIRC (in a channel or status window for example) and select CS Server Bot. Now right-click in CS Server Bot and select Saved Server Information. Enter in the details for your server there and click the Save button to save it.

Now you'll want to right-click in CS Server Bot and select RCON SteamID Access List. This should launch notepad so you can add the steamids that will have access to the bot in-game. If there is no file, go into your mIRC directory and create a new text file (right click -> new -> text document). Name it rconaccess.txt and open it.

This is where the steamids go that have access to the commands in-game. Each one has its own line and should be in this format: 0:0:1234. Save the file after you are done.

This is an example of a correct rconaccess.txt file:


0:0:213423
0:1:1234245
0:1:012345
0:0:12459


Step 3: Opening Ports
This step is only necessary if you are behind a firewall/router. You need to go into your router's firmware or firewall's software to open up the UDP port 7131 on your IP address (e.g. like on your private LAN IP address if you are behind a router, like 192.168.0.100). If you do not do this and are behind a firewall/router the script will not work because it won't be able to get the logs from the server (meaning you won't see much of anything in the window, which means the bot cannot see commands being issued).

3. Additional Comments
A couple of things. People may say this is an add-on to a server, but in actuality it is just using RCON so it should be FINE to use in leagues. If you aren't seeing logs check to see if your port is opened correctly or try restarting the bot (right-click in csbot window and select Restart CS Server Bot).

This script in NO WAY affects the server's registration as it is NOT a mod on the server.


4. Updates

- After some suggestions.. (April 13, 2006)
I've added some new commands to the bot! Here they are:

-money no longer works. It is changed to -money <amount>. So now you can specify the amount of money the players start with. Example: -money 16000.

I've added a way to kick individual users as opposed to an entire team. -kick <#userID/name> will kick them. Example: -kick #35 or -kick bunkahumpa.

I've also been asked for a way to toggle footsteps on and off. -footsteps 1 will turn them on and -footsteps 0 will turn them off.

I've also taken sv_alltalk 1 out of the "Fun config" (-fun). If you want to turn alltalk on just type -alltalk 1 (and 0 for off).

- Latest, Latest Edit! (April 7th, 2006)
I fixed an error in a regular expression that retrieved the player's name. It wouldn't show the rest of a name that had a < in it since that's what seperates things like the name, player id, and steamid in the raw log. I fixed the regular expression so now it displays the correct name.

I also made it so when players talk it adds *DEAD* to their name if they are dead and nothing if they are alive so you can differentiate between dead and alive say's and say_team's.

Oh and I also made a seperater in the right-click menu of the @cs_bot window in between Get RCON Status and Restart Round (1s). Just in case someone might click wrong and restart the round in the middle of a scrim/match when they intended on checking the rcon status. I've almost done this a few times so I figured it might be a good idea to reduce the chances of it happening. :)

Another thing I added was a new command: -voice. This will issue 2 RCON commands to the server: sv_voicecodec voice_speex and sv_voicequality 5. These two commands boost the quality of in-game voice communication so it sounds much more clearer.

..and I just realized that the latest version number of CS Server Bot is the same as the game version it supports. :)

- Latest Edit! (January 20th, 2006)
Alright after nearly a year of not working on this script I decided to fix a couple small things and clean up some code. Right now the bot has the ability to announce the score of a match/scrim at the end of each round when it is live, but it's disabled. If you want to enable that feature, go to around line 198 (where it says: ;.timersetlive 1 8 csbotlive) and get rid of the semicolon at the beginning of the line to un-comment it. It's in the liveonthree alias. When you do -lo3 in the server it will execute that alias so if that last line is not commented then it will announce the score at the end of each round.

It now asks the server for the challenge number every 5 minutes which should limit server requests. I was hearing complaints of it lagging the server and this is the only thing that I could think of that would have anything to do with it. The server sends logs to your mIRC, but it shouldn't cause any noticeable difference in-game.

Another small fix that I made was making sure that the incoming data was from the current saved server. Before this if you had used the bot on another server recently and it was still somehow set to send you logs it will ignore the data from the old server and only take in the current server's data. This prevents multiple server logs from being displayed.

5. Command List

Here's a list of commands that you can use in-game:

-commands (displays all of the commands in rcon say)
-rs (restarts the round - 1 second)
-cal (executes cal.cfg on the server)
-cevo (executes cevo-scrim.cfg on the server)
-server (executes server.cfg on the server)
-voice (executes these rcon commands for better in-game voice comm. quality: sv_voicecodec voice_speex and sv_voicequality 5)
-fun (executes these rcon commands: mp_maxrounds 0, mp_startmoney 16000, mp_freezetime 0)
-lo3 (goes live on three)
-notlive (makes it so the bot doesn't think it's live, doesn't keep track of score)
-score (displays the score if the game is live and the bot is set to announce scores)
-say <text_to_say> (does a server say command with what you provided)
-map <map_to_change> (attempts to change the map to the specified map)
-time (announces in server say the current time and date according to your mIRC)
-alltalk [1|0] (if 1, sv_alltalk is enabled, if 0 it's disabled)
-footesteps [1|0] (if 1, mp_footsteps is enabled, if 0 it's disabled)
-money <amount> (sets mp_startmoney to amount)
-info (gives me props and shows where to download it)
-steamids (really cool thing, announces a steamid lookup on everyone in the server using steamid.com)
-kick <#userID|name> (kicks the user ID or player name)
-kickt (kicks the whole terrorist team)
-kickct (kicks the whole counter-terrorist team)



Get it here [bunkahumpa.lookitsbobby.com]
Request
Posted by Century0
Wednesday, March 30, 2005 09:19pm PST
Bunka, you think you can make a version of it for Day of Defeat?

~Century0
cs:source
Posted by ximehtni
Wednesday, April 20, 2005 07:24pm PDT
I think you should make one of these for source ;)
Ya
Posted by VirusX
Thursday, November 17, 2005 11:13pm PST
Bunka should really make one for source, it's really hard to find logging tools for Source these days!
steamid
Posted by TrioN
Saturday, January 20, 2007 05:31pm PST
the -steamids command doesn't work?? and you should add a -gravity command
NO LOGS
Posted by TrioN
Sunday, March 18, 2007 02:32pm PDT
aawwww it used to work a while ago.. idk what happened and it cant read the logs.. but i can use rcon from mirc with it
Script
Posted by asianchopstix
Monday, September 03, 2007 04:56am PDT
I've installed the script, its communicating from mirc -> CS fine. But how do i make it so the bot pm's my channel with the statistics etc? Like <person> killed this <person> with awp?  
Subject line
Posted by asianchopstix
Monday, September 03, 2007 05:01am PDT
when i try to do -commands in game, nothing happens?
how come?
Subject line
Posted by kparker33
Wednesday, August 27, 2008 02:09pm PDT
yo i run the cs bot then i can do like 1 command in game and nothing else? i cant do -kickt or kick player etc.
Subject line
Posted by dekon
Saturday, February 07, 2009 12:48pm PST
i cant download it its not working
not live/score
Posted by dekon
Sunday, February 22, 2009 09:31am PST
the -notlive and the -score doesnt work and really i would like to get that fixed if anything or if some one knows how to fix it please tell me thxs.
where?
Posted by Abraham
Friday, March 20, 2009 04:40pm PDT
anyone have any idea where I can get this? I have been searching for quite some time and have been very unsuccessful.
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world