Teamspeak Smart Banner, ClockBot, Onlinebot and more

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
If you have changed the images, make sure to edit the file with the correct images names!
 
Dec 19, 2015
114
15
53
How can i make better one like this one

p_131yxzf1.png
 

MaBo2016

Active Member
Feb 7, 2016
8
1
78
OnlineBot not woirking:
alltime Error Parse error: syntax error, unexpected ';' in config.php, Line 9

Problem fixed, it works ...
 
Last edited:

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
my clockbot doesn't work , help
1) Open the file with an editor (Prefered Notepad ++) and edit the first lines with your server's information.
2) Upload it to your VPS server in a desired folder with an FTP Client (px: Filezilla)
3) Open a SSH Client (px: Putty) and connect to your vps as root.
4) Install cron (If you don't have it) by using this command: sudo apt-get install cron
5) As root run this command: sudo crontab -e
6) At the end of the file type this command: * * * * * php /path/to/your/file/time.php

This command will run the clock for ever on your server! YOu should be good with that :)
Enjoy!!!
 

JoaoVieira

Member
May 9, 2016
3
0
33
1) Open the file with an editor (Prefered Notepad ++) and edit the first lines with your server's information.
2) Upload it to your VPS server in a desired folder with an FTP Client (px: Filezilla)
3) Open a SSH Client (px: Putty) and connect to your vps as root.
4) Install cron (If you don't have it) by using this command: sudo apt-get install cron
5) As root run this command: sudo crontab -e
6) At the end of the file type this command: * * * * * php /path/to/your/file/time.php

This command will run the clock for ever on your server! YOu should be good with that :)
Enjoy!!!
this spam the php and then my server got alot of query loged in... and then they use my ts ID and i cant enter on teamspeak
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
my clockbot doesn't work , help
this spam the php and then my server got alot of query loged in... and then they use my ts ID and i cant enter on teamspeak
This script, that you asked help the previous time, works with query.
If you want to have this clock on your server you need to run it every minute. To do that you need the query else it won't work. About the spam the only thing you can do is to change the clock to work px: every 5 minutes. (That means the clock will change time every 5 minutes: 5:10, 5:15 etc.)
IF you want to do it with this way just change the cronjob command from this: * * * * * php /path/to/your/file/time.php to this: */5 * * * * php /path/to/your/file/time.php
Your server will still use the query of course, the only thing that this change will do is to reduse the spam and nothing else.

As Server Admin on your server you shouldn't have problem with the max connections (on your UID) as it is set by default to 10. You can change the value on the server group permissions if you want to have more.
 

MaBo2016

Active Member
Feb 7, 2016
8
1
78
Nice to hear that!
... yes but next problem :) i run it as cronjob, and after some time the online bot it crashed or stoped ! how can i run it and after it logged out automatically and cronjob start ist again, log out, start again, ect.
 
Last edited:

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
... yes but next problem :) i run it as cronjob, and after some time the online bot it crashed or stoped ! how can i run it and after it logged out automatically and cronjob start ist again, log out, start again, ect.
If you have the time.php file on cronjob, this will work automatically, even if you are on the SSH Console or not. The reason that your bot crashes and stops happens because of flood. You can changed you server setting settings about the flood ban and the flood ban duration to solve this problem!
 

MaBo2016

Active Member
Feb 7, 2016
8
1
78
... i think we talk about 2 differents bots :( there is no Time.php, the cronsjop is starting a onlinebot.php ... and it come every start a new query, so in 10 min i have 10 querys on my teamspeak without logged out ...
i talked about the script "Onlinebot" in the Package :) it shows in a channel, how many user on my teamspeak-server

######################################################
config.php

<?php

/* Server IP */ $ts3_ip = 'xxx';
/* Queryport */ $ts3_queryport = 10011;
/* Port */ $ts3_port = 9987;
/* Login Query */ $ts3_user = 'xxx';
/* Password Query */ $ts3_pass = 'xxx;
/* Name Bot */ $bot_nickname = 'OnlineBot';
/* Channel to move */ $bot_move = 9;
/* #Sleep "sec" */ $sleep = 60;

/* Server Name "1=On" "0=Off" */ $Server = 0;
/* ServerName */ $server_name = "Online:";

/* Channel Name "1=On" "0=Off" */ $Channel = 1;
/* Channel name*/ $channel_name = "[cspacer4477]User currently online: ";
/* Channel ID */ $channel_id = 9;

?>

onlinebot.php

<?PHP
/**
*
*
*
**/

require("lib/ts3admin.class.php");
include 'config.php';

$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);

if($tsAdmin->getElement('success', $tsAdmin->connect())) {

$tsAdmin->login($ts3_user, $ts3_pass);
$tsAdmin->selectServer($ts3_port);
$tsAdmin->setName($bot_nickname);

$whoami = $tsAdmin->getElement('data', $tsAdmin->whoAmI());
$tsAdmin->clientMove($whoami['client_id'],$bot_move);



while(1) {

$serverInfo = $tsAdmin->getElement('data', $tsAdmin->serverInfo());
$clientsOnline = ($serverInfo['virtualserver_clientsonline'] - $serverInfo['virtualserver_queryclientsonline']);


if($Channel == 1)
{
$tsAdmin->channelEdit($channel_id, array('channel_name' => $channel_name.' '.$clientsOnline));
}

if($Server == 1)
{
$tsAdmin->serverEdit(array('virtualserver_name' => $server_name.' '.$clientsOnline));
}

sleep($sleep);
}
}else{
echo "Connetcion Problem";
}
?>

again, it work but it needs to logged out after worked, because about a cronjob it comes everytime a new query in addition in in 1 hour you have 1000 same query on your teamspeak :D flodding is not the problem, the bot is query-whitelisted
 
Last edited:

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
... i think we talk about 2 differents bots :( there is no Time.php, the cronsjop is starting a onlinebot.php ... and it come every start a new query, so in 10 min i have 10 querys on my teamspeak without logged out ...
i talked about the script "Onlinebot" in the Package :) it shows in a channel, how many user on my teamspeak-server

######################################################
config.php

<?php

/* Server IP */ $ts3_ip = 'xxx';
/* Queryport */ $ts3_queryport = 10011;
/* Port */ $ts3_port = 9987;
/* Login Query */ $ts3_user = 'xxx';
/* Password Query */ $ts3_pass = 'xxx;
/* Name Bot */ $bot_nickname = 'OnlineBot';
/* Channel to move */ $bot_move = 9;
/* #Sleep "sec" */ $sleep = 60;

/* Server Name "1=On" "0=Off" */ $Server = 0;
/* ServerName */ $server_name = "Online:";

/* Channel Name "1=On" "0=Off" */ $Channel = 1;
/* Channel name*/ $channel_name = "[cspacer4477]User currently online: ";
/* Channel ID */ $channel_id = 9;

?>

onlinebot.php

<?PHP
/**
*
*
*
**/

require("lib/ts3admin.class.php");
include 'config.php';

$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);

if($tsAdmin->getElement('success', $tsAdmin->connect())) {

$tsAdmin->login($ts3_user, $ts3_pass);
$tsAdmin->selectServer($ts3_port);
$tsAdmin->setName($bot_nickname);

$whoami = $tsAdmin->getElement('data', $tsAdmin->whoAmI());
$tsAdmin->clientMove($whoami['client_id'],$bot_move);



while(1) {

$serverInfo = $tsAdmin->getElement('data', $tsAdmin->serverInfo());
$clientsOnline = ($serverInfo['virtualserver_clientsonline'] - $serverInfo['virtualserver_queryclientsonline']);


if($Channel == 1)
{
$tsAdmin->channelEdit($channel_id, array('channel_name' => $channel_name.' '.$clientsOnline));
}

if($Server == 1)
{
$tsAdmin->serverEdit(array('virtualserver_name' => $server_name.' '.$clientsOnline));
}

sleep($sleep);
}
}else{
echo "Connetcion Problem";
}
?>

again, it work but it needs to logged out after worked, because about a cronjob it comes everytime a new query in addition in in 1 hour you have 1000 same query on your teamspeak :D flodding is not the problem, the bot is query-whitelisted
I thought you were talking asbout the time bot, but you talk about the online bot. It works the same way though. It connects to your server, watches the online clients, changes the channel and leaves the server!
The only difference is the file name in the cronjob, nothing else!
 

MaBo2016

Active Member
Feb 7, 2016
8
1
78
ok, but i must start it with a cronjob by my hoster, because i havent php on my server and the only problem is, that the bot is not do the right steps with logged out after usercheck, so it come with every next cronjob new querys on my server without logged out and in 5 min i have server full with 500 and more same querys :(
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
ok, but i must start it with a cronjob by my hoster, because i havent php on my server and the only problem is, that the bot is not do the right steps with logged out after usercheck, so it come with every next cronjob new querys on my server without logged out and in 5 min i have server full with 500 and more same querys :(
Everyone of the scripts you want to use requires to have your own vps to upload them an run them - on your own server or a server you rent.
Else you need to have your computer open 24/7 to have the scripts working all the time.
Your hoster will not do these things as it ONLY teamspeak hoster.
 

MaBo2016

Active Member
Feb 7, 2016
8
1
78
understand, but why no a script: logged in, set how many user and after logged out.
so i cant run it on my hoster as cronjob ... it more easy like installed php to my dedi-server
 
Last edited:
Top