Home

Botman install guide by Smegzor (part 1) *no sound
https://www.youtube.com/watch?v=oJOa4WsJUao&t=13s

Botman install guide by Smegzor (part 2) *no sound
https://www.youtube.com/watch?v=WkcCmDjlnZw

Botman install guide by Smegzor (part 3) *no sound
https://www.youtube.com/watch?v=2EdGTVBQ3Uw

Install guide by Oak Raven
https://www.youtube.com/watch?v=C4hHeGCr2Yo&t=763s

Botman showcase with Skippy and Smegz0r (quite old).  Hoping to make a new one soon.
https://www.youtube.com/watch?v=mQcLGuE2rB8

Here is a very detailed install guide thanks to venomfufu.  It uses Ubuntu 16.04 which has had problems with setting up the database root user.  Using this guide you may have more luck but this should be equally relevant used with Ubuntu 14.04 or Debian.  I don't use other Linux distros but you should be able to follow this guide so long as your distro of choice has all the necessary software available in its repos.

Good luck! xD

Smeg

HOWTO install 7d2d Game Server using LGSM On Ubuntu Server with Graphic environment + Botman (Thx To SmegZor) + Irc Server + Lounge Interface

1) Install Ubuntu Server 16.04 "Xenial Xerus" LTS (64bits)


2) Log in SSH with Putty on Server (151.80.47.167)

3) *** System restart required ***
sudo reboot
Log in SSH again

4) Update Server:
sudo apt-get update
sudo apt-get upgrade

5) Create dedicated account (supervisor) with sudo (root) privileges:
adduser supervisor (NewPassword asked)
usermod -aG sudo supervisor

Note:  If you don't have sudo installed follow these steps:
open a terminal and type,
apt-get install sudo

Log out from root and log in with supervisor / NewPassword created

6) Instal the Desktop Environment and VNC Server:
sudo apt-get install nano xfce4 xfce4-goodies tightvncserver

Set up a secure password on vncserver. Make sure to set a vnc number higher than 1 and less than 99.  Don't use 1 or 99 as these are targetted by script kiddies.
vncserver :10
Enter a vncpassword

7) Configuring the VNC Server:
vncserver -kill :10
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
nano ~/.vnc/xstartup
Paste this (remove ""):
"#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &"

Save and close the file.

sudo chmod +x ~/.vnc/xstartup

8) Creating a VNC Service File:
sudo nano /etc/systemd/system/vncserver@.service
Paste this (remove ""):
"[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=forking
User=supervisor
PAMName=login
PIDFile=/home/supervisor/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target"

Save and close the file.

sudo systemctl daemon-reload
sudo systemctl enable This email address is being protected from spambots. You need JavaScript enabled to view it.
sudo vncserver -kill :1
sudo systemctl start vncserver@1>;

Test your remote connection:
Open Putty, put IP Server on the destination field
On left options, go to Connections/SSH and Click on "Tunnels"
Put these informations:
Source POrt: "5901"
Destination: "localhost:5901"
Click ADD
Now save putty profile and click open
Connect with supervisor / password
Open VNC Viewer (RealVNC) and make a new connection:
VNC Server: "localhost:5901"
Name: What you want
Connect ! When asked, put the vncpassword created earlier
You are now connected on your server with Desktop environment !

Some useful utilities to install:
sudo apt-get install mc htop synaptic geany geany-plugins-lua

9) STEAMCMD

sudo dpkg --add-architecture i386; sudo apt-get update;sudo apt-get install mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates tmux lib32gcc1 libstdc++6 libstdc++6:i386 telnet expect
Postfix configuration: Choose "No configuration", we ll configure it later

Create a folder called "7d2d" in /home/
cd 7d2d/

wget -N --no-check-certificate https://gameservermanagers.com/dl/linuxgsm.sh
sudo chmod +x linuxgsm.sh
bash linuxgsm.sh sdtdserver

Create a folder called "ServerGame" in /home/7d2d/

cp /home/supervisor/7d2d/sdtdserver /home/supervisor/7d2d/ServerGame/sdtdserver

cd /home/supervisor/7d2d/ServerGame/

./sdtdserver install
Answer No at "Continue? [Y/n] Y"

nano /home/supervisor/7d2d/ServerGame/common.cfg
Enter your Steam Credentials like this:
# Steam login
steamuser="username"
steampass='password'

Save and close the file.

./sdtdserver install

Press Enter at "Continue? [Y/n] Y"
Enter Steam Guard pass if asked
Enter YES a the end

Configure /home/supervisor/7d2d/ServerGame/serverfiles/sdtdserver.xml with good values

Start the server:
./sdtdserver start

Try to connect on your server with your client game.
./sdtdserver details to get informations

go to https://github.com/GameServerManagers/LinuxGSM/wiki/Usage fo cmd available

10) Botman (YOU WILL NEED MODS FOLDER, coppi, alloc, ....)

Open terminal in Desktop Environment

sudo apt-get install software-properties-common python-software-properties
sudo wget https://raw.githubusercontent.com/itsTheFae/FaesMudlet2/master/setup-debian.sh
sudo chmod +x ./setup-debian.sh && ./setup-debian.sh
sudo wget https://raw.githubusercontent.com/itsTheFae/FaesMudlet2/master/build-mudlet.sh

sudo chmod +x ./build-mudlet.sh && ./build-mudlet.sh
Choose 1 then nothing (press enter)

Open Files Manager ang go to Home/build/mudlet/b-master/
Click "Edit" "Preferences" "Behavior" and check "Run Executable text files when they are opened" + "show hidden items"

Open mudlet with run-mudlet.sh
Click Connect, +New and create a botman profile with IP and Telnet port
Click Connect and if you see "Enter password", clode mudlet and save profile

sudo synaptic
Look for "geany lua" and mark "geany-plugin-lua" for installation
Look for "Mariadb" and mark "mariadb-server" for installation
Apply for install
Enter mariadb-server root password *
Look for "phpmyadmin" and mark "phpmyadmin" for installation
Apply for install
Choose "apache2" and finish install
Put Mysql Application password

* Note:  Sometimes you are not asked to set a password for the database root user.  You can fix that with the lines below.

sudo mysql (or su -, login and type mysql)

CREATE USER 'supervisor'@'%' IDENTIFIED BY 'PassWord';
GRANT ALL PRIVILEGES ON *.* TO 'supervisor'@'%' WITH GRANT OPTION;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('PassWord');
FLUSH PRIVILEGES;
exit

sudo mysql_secure_installation

cd /home/supervisor/
mkdir tmp
cd tmp/
wget http://botman.nz/latest_bot.zip

Go on Desktop /home/supervisor/tmp/ and unzip latest_bot.zip
Copy bots_profile.xml
Open new file manager
Go to /home/.config/mudlet/profiles/BotmanProfile/current/
Delete all files and paste bots_profile.xml
Open edit it with Geany
Replace <name></name>, <url></url> and <port></port> with good values
Save and exit Geany

Copy "scripts" folder from extracted latest_bot.zip and paste it to "/home/.config/mudlet/profiles/supervisor/"
Copy "edit_me.lua" file from extracted latest_bot.zip and paste it to "/home/.config/mudlet/profiles/supervisor/scripts/"
Open edit it with Geany and replace telnetPassword = "yourtelnetpassword" + webdavFolder = "/home/supervisor/7d2d/Botman_Chatlogs"
Create a folder on /home/supervisor/7d2d/ named "Botman_Chatlogs"

Go to http://@IP/phpmyadmin<br<; a="">>supervisor / PassWord
Select Databases and create "bots" and "testbot" databases
Select Users and create "bots" and "testbot" users on localhost
Grant all permissions for "bots" user on "bots" base and same for "testbot" user...
Go on bots base and import "bots.sql"
Go on testbot base and import "botdb_schema.sql"
Go on testbot base and import "botdb_data.sql"

Go to "/home/.config/mudlet/profiles/botman/scripts/"
Open edit edit_me.lua and replace this:
-- EDIT ME!    
    botDB = "testbot"
    botDBUser = "testbot"
    botDBPass = "yourtestbotpassword"    
-- EDIT ME!        
    botsDB = "bots"
    botsDBUser = "bots"    
    botsDBPass = "yourbotspassword"    

Save and exit

Go to /home/build/mudlet/b-master and lauch "run-mudlet.sh"
Click connect and choose YourBotmanProfile and connect

Enjoy!

11) IRC + Lounge part

Open Terminal

sudo apt-get install ngircd gnome-nettool openssh-server
Note:  A nice alternative to ngircd is inspircd

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm -g install thelounge


sudo service ngircd stop
sudo nano /etc/ngircd/ngircd.conf

scroll down until you see

[Server]
# More [Server] sections, if you like ...``

Copy and past the following into ngircd.conf right below the above (not the ---)
---------------------------------------------------------------------------------------
[Channel]
    Name = #bot1

    # Topic for this channel
    Topic = Bot alerts channel

    # Initial channel modes
    ;Modes = tnk

    # initial channel password (mode k)
    ;Key = Secret

    # Key file, syntax for each line: “<user>:<nick>:<key>”.
    # Default: none.
    ;KeyFile = /etc/ngircd/#chan.key

    # maximum users per channel (mode l)
    ;MaxUsers = 23

[Channel]
    # Name of the channel
    Name = #bot2

    # Topic for this channel
    Topic = Bot alerts channel

    # Initial channel modes
    ;Modes = tnk

    # initial channel password (mode k)
    ;Key = Secret

    # Key file, syntax for each line: “<user>:<nick>:<key>”.
    # Default: none.
    ;KeyFile = /etc/ngircd/#chan.key

    # maximum users per channel (mode l)
    ;MaxUsers = 23

[Channel]
    # Name of the channel
    Name = #new_alerts

    # Topic for this channel
    Topic = Bot tracker channel

    # Initial channel modes
    ;Modes = tnk

    # initial channel password (mode k)
    ;Key = Secret

    # Key file, syntax for each line: “<user>:<nick>:<key>”.
    # Default: none.
    ;KeyFile = /etc/ngircd/#chan.key

    # maximum users per channel (mode l)
    ;MaxUsers = 23

[Channel]
    # Name of the channel
    Name = #new_watch

    # Topic for this channel
    Topic = Bot watch channel

    # Initial channel modes
    ;Modes = tnk

    # initial channel password (mode k)
    ;Key = Secret

    # Key file, syntax for each line: “<user>:<nick>:<key>”.
    # Default: none.
    ;KeyFile = /etc/ngircd/#chan.key

    # maximum users per channel (mode l)
    ;MaxUsers = 23

[Channel]
    # Name of the channel
    Name = #new_watch_wat

    # Topic for this channel
    Topic = Bot watch channel

    # Initial channel modes
    ;Modes = tnk

    # initial channel password (mode k)
    ;Key = Secret

    # Key file, syntax for each line: “<user>:<nick>:<key>”.
    # Default: none.
    ;KeyFile = /etc/ngircd/#chan.key

    # maximum users per channel (mode l)
    ;MaxUsers = 23

[Channel]
    # Name of the channel
    Name = #new_tracker

    # Topic for this channel
    Topic = Bot tracker channel

    # Initial channel modes
    ;Modes = tnk

    # initial channel password (mode k)
    ;Key = Secret

    # Key file, syntax for each line: “<user>:<nick>:<key>”.
    # Default: none.
    ;KeyFile = /etc/ngircd/#chan.key

    # maximum users per channel (mode l)
    ;MaxUsers = 23
    
---------------------------------------------------------------------------------------

On mudlet, connected to Server, go to Preferences and change Bot name and main #channel according to what you want.
Here Zeus and #zeus
Restart mudlet

To start lounge, open terminal
longe start --port 9000 --public

Open browser and go to http://ServerIP:9000
Name: What you want
Server: localhost
Port:6667
Names...
Channel: #zeus #zeus_alerts #zeus_watch

Go on main #zeus and type:
hi bot
In private Bot #Thor:
i am xxx
new login xxx pass xxx
login xxx pass xxx

You are now logged as admin.


12) Postfix configuration

** In construction **


SOURCES:

https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04
https://gameservermanagers.com/lgsm/sdtdserver/
https://github.com/GameServerManagers/LinuxGSM/wiki/Usage
http://botman.nz/download
http://botman-smegzor.readthedocs.io/en/latest/introduction.html
https://thelounge.github.io/

Botman is on Reddit!  Who needs forums? :P  Post bugs, see what I'm working on, post ideas or just discuss the bot.

I'm now on Patreon.  Coding the bot is a lot of work and I'm finding it hard to spend as much time as I would like doing it as I also have to eat.

The bot would not be possible without Allocs mod and lacking without Coppi's Additions.  Get them =D

Here are some hacker detections that I felt were worth remembering either for lolz or because they showcase some of the bot's defenses.

New player joined
2017-04-09T10:52:50 22909.089 INF Player connected entityid=880101 name=Amyn steamid=76561198099878201 steamOwner=76561198099878201 ip=::ffff:147.30.36.178
Player 76561198099878201 Amyn detected noclipping -305 49 4152
base protection triggered for base1 of Fronti 76561197965416927 against Amyn 76561198099878201
Player 76561198099878201 Amyn detected noclipping -321 50 4172
Player 76561198099878201 Amyn detected noclipping -357 25 4184
Amyn has been sent to exile, detected near Fronti with a non-zero hacker score.
2017-04-09T11:05:05 Player 880101 76561198099878201 name: Amyn detected teleporting to -409 180 6201 distance 7447
[BANNED] Player 76561198099878201 Amyn has been banned for 1 day We detected unusual teleporting from you and are investigating the circumstances


Day 719, 16:56 76561198191946651 Mr. Bean connected
### New player joined Mr. Bean steam: 76561198191946651 owner: 76561198191946651 id: 153655 ###
Day 719, 16:56 Smegz0r: hi there! I'm editing our server manager atm so commands aren't working temporarily
2016-06-29T01:09:04 Player 153655 name: Mr. Bean detected teleporting to -124 180 339 distance 844.9906626703
Player Mr. Bean banned. Detected proxy DCSMANAGE.COM
[BANNED] Player 76561198191946651 Mr. Bean has been banned for 10 years Banned proxy
Day 719, 17:20 76561198191946651 Mr. Bean disconnected
[TIMEOUT] Player 76561198191946651 Mr. Bean has been sent to timeout for excessive inventory for a new player 762mmBullet(500)
Day 719, 17:44 Server: Sending player Mr. Bean to timeout for excessive inventory for a new player 762mmBullet(500)
Day 719, 17:44 76561198191946651 Mr. Bean disconnected
Day 719, 17:44 Smegz0r: heh hacker


New player joined
2016-08-07T17:56:50 237987.722 INF Player connected entityid=207337 name=zlul steamid=76561198159583989 steamOwner=76561198159583989 ip=166.175.57.21
2016-08-07T17:59:49 Player 207337 name: zlul detected teleporting to -2305 180 6381 distance 4433.5008841772
2016-08-07T18:06:12 Player 207337 name: zlul detected teleporting to -1592 106 1980 distance 4515.0417163078
[BANNED] Player 76561198159583989 zlul has been banned for 1 day We detected unusual teleporting from you and are investigating the circumstances.
***** DarthmanZan at position -2197 62 6441 said: possible hacker destroyed all our chests and forges
***** Silentwolfe at position -2198 63 6437 said: i just witnessed a possible hacker destory all of mine and my firend's chests. person had to have been invisable aswell
[BANNED] Player 76561198159583989 zlul has been banned for 10 years blacklisted


New player joined
2016-08-04T18:54:02 754171.162 INF Player connected entityid=198206 name=King Inioch steamid=76561198149242780 steamOwner=76561198149242780 ip=208.96.112.54
[TIMEOUT] Player 76561198149242780 King Inioch has been sent to timeout for excessive inventory for a new player 762mmBullet(500)
Moving player 76561198149242780 King Inioch to exile for excessive inventory for a new player rocket(100).
Player 76561198149242780 King Inioch detected flying (1) -6682 180 6641
2016-08-04T23:33:56 Player 198206 name: King Inioch detected teleporting to -2209 60 6444 distance 4883.2662030653
[BANNED] Player 76561198149242780 King Inioch has been banned for 1 day We detected unusual teleporting from you and are investigating the circumstance

 

Here is a more unusual one taken from 2 of the bot's IRC channels.  In this instance the bot was new to an established server with a bad hacker problem.  This player isn't necessarily one of the hackers but he is a Chinese player using a proxy to appear as another country.

The main IRC channel:
Day 168, 22:29 76561198368104599 Babcock connected
Player Babcock's new player status has been removed because their level is 25
Chinese IP detected. Babcock 80.239.207.21
Chinese player Babcock banned.
[BANNED] Player 76561198368104599 Babcock has been banned for 10 years blacklisted
Added new Chinese IP range  80.239.207.0 - 80.239.207.31 to blacklist
Day 168, 22:55 76561198368104599 Babcock disconnected

The alerts IRC channel:
Possible proxy detected! Country changed! 76561198368104599 Babcock 80.239.207.21 old country EU new CN
Chinese IP detected. Babcock 80.239.207.21
Chinese player Babcock banned.
[BANNED] Player 76561198368104599 Babcock has been banned for 10 years blacklisted

 

The bot's new global ban list has banned its first hacker..
[BANNED] Player 76561198026088898 JMK9718 has been banned for 10 years On global ban list

 

Here is an example of a companion ban.  If several players share the same IP and one of them hacks, all in-game players with that IP are banned.  Also if a player is using a family key and gets banned, the master key is banned too.

Player connected entityid=131362 name=langlang steamid=76561198193701694 steamOwner=76561198193701694 ip=::ffff:107.6.38.67
Player 131362 76561198193701694 name: langlang detected teleporting to 1579 0 495 distance 1046
[BANNED] Player 76561198193701694 langlang has been banned for 1 week We detected unusual teleporting from you and are investigating the circumstances.
[BANNED] Player 76561198225068096 Friget has been banned for 1 week same IP as banned player

 

Updated 17 August, 2017

All commands are typed in in-game chat and begin with a  /   Commands have access levels and won't work for you if your level is too low.
Note:  There are actually commands missing from this list and a few commands are deliberately undocumented.  Those commands don't do anything profound.  They are there for you to discover in the code as a reward for reading it.


/bounty
See the player kills and current bounty on a player's head.

/gimme peace
All gimme messages will be private messages.

/fix gimme
Force the bot to rescan the list of zombies and animals.

/reset gimmehell
Cancel a gimmehell game in progress.

/gimme reset
Reset gimme counters for everyone so they can play gimme again. The bot does this every 2 hours automatically.

/gimme gimme
All gimme messages will be in public chat.

/gimme off
Disable the gimme game.

/gimme on
Enable the gimme game.

/gimme zombies
Players can win zombies.

/gimme no zombies
Gimme prizes will not include zombies.