<?php
# ____ __ _
# / ___|___ _ __ / _(_) __ _
# | | / _ \| '_ \| |_| |/ _` |
# | |__| (_) | | | | _| | (_| |
# \____\___/|_| |_|_| |_|\__, |
# |___/
// Info
$YATQA_username = '';
$YATQA_password = '';
$YATQA_queryport = '';
$server_ip = '';
$server_port = '';
$botname = '[R4P3]Automatic-System%20Bot%20['. mt_rand(0, 99).']';
#Settings
$firstGroup = '6';
//Here type the ids For group's you want to add them it
$firstGroup1 = '9';
$firstGroup2 = '10';
$firstGroup3 = '11';
//To Group
$toGroup = '12';
//Here type the ids For group's you want to add them it
$toGroup1 = '13';
$toGroup2 = '14';
$toGroup3 = '15';
//Three Group
$threeGroup = '16';
//Here type the ids For group's you want to add them it
$threeGroup1 = '17';
$threeGroup2 = '18';
$threeGroup3 = '109';
// If you want to make more groups just do same i do
?>
<?php
# ____ _ _
# / ___| _ __ ___ ___(_) __ _| |
# \___ \| '_ \ / _ \/ __| |/ _` | |
# ___) | |_) | __/ (__| | (_| | |___
# |____/| .__/ \___|\___|_|\__,_|_____|
# |_|
# __ __ _____ ____
# | \/ | __ |___ | __ ___ ___ _ _| _ \
# | |\/| |/ _` | / / '_ ` _ \ / _ \| | | | | | |
# | | | | (_| |/ /| | | | | | (_) | |_| | |_| |
# |_| |_|\__,_/_/ |_| |_| |_|\___/ \__,_|____/
# Information
# Youtube Channel : SpeciaL Programmer
# Forum : R4P3.NET
# Author : SpeciaL @Special , Ma7mouD @DDosBoy
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
include_once("config.php");
$ts3_VirutalServer = TeamSpeak3::factory("serverquery://".$YATQA_username.":".$YATQA_password."@".$server_ip.":".$YATQA_queryport."/?server_port=".$server_port."&nickname=".$botname."");
$ClientList = $ts3_VirutalServer->clientlist();
foreach($ClientList as $Client)
{
$_SESSION ['ggids'] = explode(",", $Client["client_servergroups"]);
if(in_array($firstGroup,$_SESSION['ggids']))
{
if(!in_array($firstGroup1,$_SESSION['ggids']))
if(!in_array($firstGroup2,$_SESSION['ggids']))
if(!in_array($firstGroup3,$_SESSION['ggids']))
{
$Client->addservergroup($firstGroup1);
$Client->addservergroup($firstGroup2);
$Client->addservergroup($firstGroup3);
}
}
$_SESSION ['ggids'] = explode(",", $Client["client_servergroups"]);
if(in_array($toGroup,$_SESSION['ggids']))
{
if(!in_array($toGroup1,$_SESSION['ggids']))
if(!in_array($toGroup2,$_SESSION['ggids']))
if(!in_array($toGroup3,$_SESSION['ggids']))
{
$Client->addservergroup($toGroup1);
$Client->addservergroup($toGroup2);
$Client->addservergroup($toGroup3);
}
}
$_SESSION ['ggids'] = explode(",", $Client["client_servergroups"]);
if(in_array($threeGroup,$_SESSION['ggids']))
{
if(!in_array($threeGroup1,$_SESSION['ggids']))
if(!in_array($threeGroup2,$_SESSION['ggids']))
if(!in_array($threeGroup3,$_SESSION['ggids']))
{
$Client->addservergroup($threeGroup1);
$Client->addservergroup($threeGroup2);
$Client->addservergroup($threeGroup3);
}
}
}
# ____ _ _
# / ___| |__ ___ ___| | _____ _ __
# | | | '_ \ / _ \/ __| |/ / _ \ '__|
# | |___| | | | __/ (__| < __/ |
# \____|_| |_|\___|\___|_|\_\___|_|
// Thats checker For remove server groups
$ClientList = $ts3_VirutalServer->clientlist();
foreach($ClientList as $Client)
{
$_SESSION ['ggids'] = explode(",", $Client["client_servergroups"]);
if(!in_array($firstGroup,$_SESSION['ggids']))
{
if(in_array($firstGroup1,$_SESSION['ggids']))
if(in_array($firstGroup2,$_SESSION['ggids']))
if(in_array($firstGroup3,$_SESSION['ggids']))
{
$Client->remservergroup($firstGroup1);
$Client->remservergroup($firstGroup2);
$Client->remservergroup($firstGroup3);
}
}
$_SESSION ['ggids'] = explode(",", $Client["client_servergroups"]);
if(!in_array($toGroup,$_SESSION['ggids']))
{
if(in_array($toGroup1,$_SESSION['ggids']))
if(in_array($toGroup2,$_SESSION['ggids']))
if(in_array($toGroup3,$_SESSION['ggids']))
{
$Client->remservergroup($toGroup1);
$Client->remservergroup($toGroup2);
$Client->remservergroup($toGroup3);
}
}
$_SESSION ['ggids'] = explode(",", $Client["client_servergroups"]);
if(!in_array($threeGroup,$_SESSION['ggids']))
{
if(in_array($threeGroup1,$_SESSION['ggids']))
if(in_array($threeGroup2,$_SESSION['ggids']))
if(in_array($threeGroup3,$_SESSION['ggids']))
{
$Client->remservergroup($threeGroup1);
$Client->remservergroup($threeGroup2);
$Client->remservergroup($threeGroup3);
}
}
}
?>
You can do that with JTS3ServerModfor the next update u can add if i give the server group move it to special room
i'll but JTS3ServerMod need the client connet to move i need the user on my room if i give them server group will move itYou can do that with JTS3ServerMod
i'll try it thx@AAaaLLi1 Just add this after the addservergroup code:
PHP:// Note 44 Is the room ID $Client->move(44);
@AAaaLLi1 Just add this after the addservergroup code:
PHP:// Note 44 Is the room ID $Client->move(44);
<?php
# ____ __ _
# / ___|___ _ __ / _(_) __ _
# | | / _ \| '_ \| |_| |/ _` |
# | |__| (_) | | | | _| | (_| |
# \____\___/|_| |_|_| |_|\__, |
# |___/
// Info
$YATQA_username = 'serveradmin';
$YATQA_password = '';
$YATQA_queryport = '10011';
$server_ip = '127.0.0.1';
$server_port = '9987';
$botname = '[R4P3]Automatic-Bot%20['. mt_rand(0, 99).']';
#Settings
$firstGroup = '9';
$Client->move(44);
//Here type the ids For group's you want to add them it
$firstGroup1 = '10';
$firstGroup2 = '11';
$firstGroup3 = '12';
//To Group
$toGroup = '13';
$Client->move(44);
//Here type the ids For group's you want to add them it
$toGroup1 = '14';
$toGroup2 = '15';
$toGroup3 = '16';
//Three Group
$threeGroup = '17';
$Client->move(44);
//Here type the ids For group's you want to add them it
$threeGroup1 = '18';
$threeGroup2 = '19';
$threeGroup3 = '20';
// If you want to make more groups just do same i do
?>
How Can i Fix it
You can use SINUSBOT OR JTS3ServerMod....who can help me modify thist script and give the group after a certain connection time or after a number of connections