Instructions for the patch
Download the 2.0.6 tarball and unpack it
Copy the patch file to the base bzflag-2.0.6 directory
Run
Code: Select all
patch -p1 < tep-bot.patch
./configure
make
su [enter password]
cp src/bzflag/bzflag $(which bzflag|sed 's/bzflag/bzrobot/')
exit
Code: Select all
cp ~/.bzf/2.0/config.cfg ~/.bzf/2.0/robot.cfg
Code: Select all
bzrobot -window botname@server:port
Code: Select all
chmod 440 ~/.bzf/2.0/robot.cfg
Code: Select all
bzrobot -window botname@server:port
Rotation script
It's pretty simple, put a seperate config file (filename ending in .conf) for each map you want to rotate into an empty directory, edit the script so that '/home/andy/.bzf/confs/' points to this directory, also edit '/usr/games/bin/bzfs' so it points to your bzfs binary.
Put the script in your path (either /usr/local/bin or ~/bin) and run it with
Code: Select all
bzrotate mypassword
Code: Select all
#!/bin/bash
while true
do
for conf in /home/andy/.bzf/confs/*.conf
do
#echo $conf
/usr/games/bin/bzfs -conf $conf -passwd $1 -d >/tmp/bzfs.log
done
done
This is a bit more complicated so here is the output of the --help switch
-a -p -P -e -c -m -s -d -E and -h are pretty self explanitory.-a or --serveraddress <server ip>: Listen ip of server, default <127.0.0.1>
-p or --port <port>: Listen port of server, default <5154>
-P or --password <password>: servers main admin password, for bzadmin /ban access, default <password> *** SET THIS OPTION***
-c or --confsdir <path>: Path to bzfs log file, default </tmp/bzfs.log>
-l or --logfile <path>: File to log server output to, default <none>
-e or --exepath <path>: Path to bz executables folder, default </usr/bin>
-m or --maxbots <int>: Maximum number of bots to spawn on a server, default <6> max <19> (0=option off)
-s or --startbots <int>: Number of bots to spawn on server startup, default <3>
-b or --bantime <int(minutes)>: Length of time to ban admin/cop askers, default <0> (0=option off)
-d or --display <X display>: Set the DISPLAY environment variable, so script can run in tty with robots i n X
-h or --help : Show this helpfile
-E or --echo : Echo server output to stdout
-A or --abusefile <path>:File containg callsigns of players known to abuse the autobot scripts.
-c is a little non-intuitive, but it's an old switch I converted to do something new, point it to the logfile specified in the rotate script.
-l is if you want a permanent server log from all the maps.
I run mine with
Code: Select all
bzwrap-1.3 -P myserverpassword -c /tmp/bzfs.log -e /usr/games/bin -E -A /home/andy/.bzf/abusers.txt &
Code: Select all
self.botnames=('',blah blah blah)
Job done....