MIRCX IRC Network
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Web Applications
install Joomla Wordpress Phpbb Drupal FluxBB PunBB osCommerce simple-machines MYBB moodle vBulletin Dolphin-v.7.1.1 PHPNUKE XOOPS
Services
install BorkNet Services X3 Services Anope Atheme Services Srvx IRC Srervices
IRCD
install Snircd IRCU INSPIRCD UNREAL Nefarious Bircd Bahamut Asuka Charybdis
TCL SCRIPT
TCL SCRIPT FOR EGGDROP Allprotection4.7 Antiproxy
Bots
Bots install FishBot bobot++ Eggdrop janus Omega Security Services Botnix Bopm SupyBot PyLink Hopm
Latest topics
» מדריך גירסה INSPIRCD V4
Arthas Servers bot 2.2 EmptySat Aug 05, 2023 2:09 am by Chief

» mIRCx IRC Network Config
Arthas Servers bot 2.2 EmptySat Jul 15, 2023 9:51 pm by Chief

» ircu2.10.12-pk with dnsbl
Arthas Servers bot 2.2 EmptyFri Mar 10, 2023 2:22 pm by Admin

» Guide install PyLink on New version FreeBSD
Arthas Servers bot 2.2 EmptyThu Dec 15, 2022 9:39 pm by Chief

» מדריך התקנה PBot על מערכת הפעלה FreeBsd-12
Arthas Servers bot 2.2 EmptyMon Dec 05, 2022 5:44 am by Chief

» install Nefarious2 && X3 IRC Services in FreeBsd
Arthas Servers bot 2.2 EmptySat Nov 12, 2022 3:12 pm by Chief

» help problem with adduser in Freebsd 12
Arthas Servers bot 2.2 EmptyFri Nov 11, 2022 9:06 pm by Chief

» מדריך פקודות והתקנה בסרביס X3
Arthas Servers bot 2.2 EmptyFri Oct 28, 2022 1:43 pm by Chief

» מדריך הגדרות WebIRC in Nefarious2
Arthas Servers bot 2.2 EmptyThu Apr 07, 2022 4:45 am by Chief

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar Calendar

Affiliates
free forum

Affiliates
free forum


Arthas Servers bot 2.2

Go down

Arthas Servers bot 2.2 Empty Arthas Servers bot 2.2

Post  Chief Tue Aug 21, 2012 12:40 pm

mIRCx
project mIRC Script
Arthas Servers bot 2.2
credit to Arthas
picture
Arthas Servers bot 2.2 A5z9t7v30n42gd7nwcv4
Arthas Servers bot 2.2 Sy1qpeuxq9d0p0rvp502
commands
Code:

!Total
!Servers
!Rent <STEAMID> או !Take <STEAMID>
!Help
!Release
!info
the code
Code:

; ——————————————————————————————————————————————————————————————————————————————————————————————— ;

; Arthas Servers Bot - v2.2

; ——————————————————————————————————————————————————————————————————————————————————————————————— ;


alias RCONstart { if ($ini(Serversbot.ini,2)) { .remove rconfilter.txt | echo -s (12RCON1)3 Starting RCONS ... | var %x 1,%y 1 | .timerwrcon* off | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) { write rconfilter.txt $ini(Serversbot.ini,%x) } | .timerrconstart 1 200 rconstart | inc %x } | filter -ctu 1 32 rconfilter.txt rconfilter.txt | Nextrconstart } | else echo -st 4* There are no servers ! }
alias Nextrconstart { var %x 0,%y 1 | while ($read(rconfilter.txt,%x)) { .timerwrcon1 $+ $v1 1 %y rcon $v1 |  inc %y 3 | inc %x } | .remove rconfilter.txt }
alias RCONclose { .window -c @Console $+ $1 | .timer $+ $1 $+ log* off | .timerECHO $+ $1 $+ * Off | rcmd $1 logaddress_del $ip $readini(Serversbot.ini,$1,Port) | sockclose $(rcon* $+ $1,2) | .writeini -n Serversbot.ini $1 Connected OFF |  inc -u1 % $+ $1 $+ .sock | .remini Serversbot.ini $1 challenge | echo -s (12RCON $1 $+ 1) 1---4Sockets closed1--- }
alias RconLOG {
rcmd $1 nochn logaddress_del $ip $readini(Serversbot.ini,$1,Port)
.timer $+ $1 $+ rlog -m 7 30 rcmd $1 nochn logaddress_del $ip $readini(Serversbot.ini,$1,Port)
.timer $+ $1 $+ rlog1 -m 1 230 rcmd $1 nochn mp_logfile 1
.timer $+ $1 $+ rlog2 -m 1 260 rcmd $1 nochn mp_logdetail 2
.timer $+ $1 $+ rlog3 -m 1 290 rcmd $1 nochn sv_rcon_banpenalty 1
.timer $+ $1 $+ rlog4 -m 1 320 rcmd $1 nochn sv_rcon_maxfailures 20
.timer $+ $1 $+ rlog5 -m 1 350 rcmd $1 nochn sv_rcon_minfailures 20
.timer $+ $1 $+ rlog6 -m 1 380 rcmd $1 nochn sv_rcon_minfailuretime 1
.timer $+ $1 $+ rlog7 -m 1 420 rcmd $1 nochn log on
.timer $+ $1 $+ rlog8 -m 1 450 rcmd $1 nochn admin_ignore_immunity 1
.timer $+ $1 $+ rlog10 -m 1 450 rcmd $1 ConnectedConnectedConnected
.timer $+ $1 $+ rlog9 -m 1 480 rcmd $1 nochn logaddress_add $ip $readini(Serversbot.ini,$1,Port)
}
alias RCON { unset % $+ $1 $+ .sockc | sockclose Rcon* $+ $1 | .writeini -n Serversbot.ini $1 Connected OFF | if (%Connectt) { Servers unset $1 } | .timerECHO $+ $1 1 4 Servers Connected $1 | GETChallenge $1 | sockudp -k rconLOG- $+ $1 $readini(Serversbot.ini,$1,Port) $replace($readini(Serversbot.ini,$1,Server),$chr(58),$chr(32)) $str($chr(255),4) | .timerLOG $+ $1 -m 1 750 RconLOG $1 }
alias GETChallenge { sockclose RCONCHALLENGE- $+ $1 | sockudp -k RCONCHALLENGE- $+ $1 $replace($readini(Serversbot.ini,$1,Server),$chr(58),$chr(32)) $str($chr(255),4) $+ challenge rcon }
on *:udpread:rconChallenge-*: { var %RCON-challenge | sockread %RCON-challenge | if ($gettok(%RCON-challenge,3,32) isnum) { .writeini -n Serversbot.ini $remove($sockname,rconChallenge-) challenge $gettok(%RCON-challenge,3,32) } | elseif ($gettok(%RCON-challenge,3,32) !isnum) && ($readini(Serversbot.ini,$remove($sockname,rconChallenge-),Connected) != Banned) { .writeini -n Serversbot.ini $ini(Serversbot.ini,$remove($sockname,rconChallenge-)) Connected Banned | RCONclose $remove($sockname,rconChallenge-) | echo -st 1(12RCON1)4 You are BANNED from Server $remove($sockname,rconChallenge-) ! RCON Closed ! 2Check your Server details. } }
alias rcmd { if ($2 != nochn) GETChallenge $1 | sockudp -k RCONCMD- $+ $1 $replace($readini(Serversbot.ini,$1,Server),$chr(58),$chr(32)) $str($chr(255),4) $+ rcon $readini(Serversbot.ini,$1,challenge) " $+ $readini(Serversbot.ini,$1,RCON) $+ " $iif($2 == nochn,$3-,$2-) }
on *:udpread:RCON*:{
if (RCONLOG-* iswm $sockname) {
var %a
sockread -f %a
while ($sockbr) {
if (%a) RCON.DATA $remove($sockname,RCONLOG-) $gettok(%a,6-,32)
sockread -f %a
}
}
if (RCONCMD-* iswm $sockname) {
var %a
sockread -f %a
while ($sockbr) {
if ($mid(%a,1,5) == $+($str($chr(255),4),l)) tokenize 32 $mid(%a,6-)
else tokenize 32 %a
if (!$window(@Console $+ %n)) && ($1- != $null) window -e @Console $+ $remove($sockname,RCONCMD-)
if ($1-) RCON.DATA $remove($sockname,RCONCMD-) $1-
sockread -f %a
}
}
if (RCONHL* iswm $sockname) {
sockread &RCONHL | breplace &RCONHL 0 254 | var %Players $iif($asc($mid($gettok($HLB,6,254),2,1)),$asc($mid($gettok($HLB,6,254),1,1)) $+ / $+ $asc($mid($gettok($HLB,6,254),2,1)),0/ $+ $asc($mid($gettok($HLB,6,254),1,1))) | var %Name = $right($gettok($HLB,1,254),$calc($len($gettok($HLB,1,254)) -6)) | var %Map = $gettok($HLB,2,254)
$iif(check isin $sockname,$iif($gettok(%Players,1,47) == 0,Servers unset $remove($Sockname,RCONHL,check,all)),stylemsg $readini(ServersBOT.ini,Settings,Channel) %RegularColor $+ $iif(have been banned isin %Name,The bot is banned on the server !,Server num: $special($remove($Sockname,RCONHL,ALL)) - Status: $iif($readini(ServersBOT.ini,$remove($Sockname,RCONHL,ALL),Status),4 $+ $v1 $+  $+ %RegularColor - By: $special($readini(ServersBOT.ini,$remove($Sockname,RCONHL,ALL),Nick)) - Timeleft: $special($replace($fix($timer(Release $+ $remove($Sockname,RCONHL,ALL)).secs),hr,hour)),3Free) %RegularColor $+ - IP: $special($readini(ServersBOT.ini,$remove($Sockname,RCONHL,ALL),Server)) $iif(ALL !isin $sockname,- Players: $iif($gettok(%Players,1,47) == $gettok(%Players,2,47),04,$iif($gettok(%Players,1,47) == 0,14)) $+ %Players $+ %RegularColor - Map: $Special(%Map))))
}
}
alias fix {
var %fix = $replace($replace($duration($1,2),$chr(32),$+($chr(44),$chr(32))),min,$chr(32) $+ minute,sec,$chr(32) $+ second,hr,$chr(32) $+ hour,wk,$chr(32) $+ week,day,$chr(32) $+ day)
$iif($numtok(%fix,32) > 2,%fix = $remove(%fix,$chr(44) $gettok(%fix,$calc($numtok(%fix,32) -1) $+ -,32)) and $gettok(%fix,$calc($numtok(%fix,32) -1) $+ -,32))
return %fix
}
alias HL { if ($1) { bset -t &rconhl 1 $str($chr(255),4) $+ TSource Engine Query | bset &rconhl $calc($bvar(&rconhl,0) + 1) 0 | sockudp -k RCONHL $+ $iif($2 == check,check,$iif($2 == ALL,ALL)) $+ $1 $replace($readini(ServersBOT.ini,$1,Server),$chr(58),$chr(32)) &rconhl } }
alias HLB { return $bvar(&RCONHL,1,$bvar(&RCONHL,0)).text }
alias clr {
var %CLR.TEMP = $strip($gettok($1,1,34))
if ($prop == Steam) return $gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)
elseif ($prop == Steam2) return $gettok($gettok($gettok($gettok($1,3,34),1,34),$calc($numtok($gettok($gettok($1,3,34),1,34),60) -1) $+ - $+ $numtok($gettok($gettok($1,3,34),1,34),60),60),1,62)
elseif ($prop == Nick) return $remove(%CLR.TEMP,$right(%CLR.TEMP,$calc($len($remove($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),2,62),<)) + $len($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)) + $len($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -2) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)) + 6)))
elseif ($prop == Said) return $strip($gettok($1,3,34))
elseif ($Prop == Nick2) Return $remove($gettok($1,3,34),$right($gettok($1,3,34),$calc($len($remove($gettok($gettok($gettok($1,3,34),$calc($numtok($gettok($1,3,34),60) -1) $+ - $+ $numtok($gettok($1,3,34),60),60),2,62),<)) + $len($gettok($gettok($gettok($1,3,34),$calc($numtok($gettok($1,3,34),60) -1) $+ - $+ $numtok($gettok($1,3,34),60),60),1,62)) + $len($gettok($gettok($gettok($1,3,34),$calc($numtok($gettok($1,3,34),60) -2) $+ - $+ $numtok($gettok($1,3,34),60),60),1,62)) + 6)))
elseif ($prop == Team) return $remove($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),2,62),<)
elseif ($prop == Team2) return $remove($gettok($gettok($gettok($1,3,34),$calc($numtok($gettok($1,3,34),60) -1) $+ - $+ $numtok($gettok($1,3,34),60),60),2,62),<)
elseif ($prop == num) || ($prop == vote) || ($prop == votenum) return $gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -2) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)
elseif ($prop == Weapon) || ($prop == Gun) return $replace($gettok($1,5,34),hegrenade,Grenade,Glock18,Glock)
Return $gettok($1,2,34)
}
alias LiveStatus {
var %st = $readini(Serversbot.ini,$1,LiveStatus)
var %stts = $iif(%st == NotLive,Not Live,$iif(%st == DeathMatchLive,Live,$iif(%st == Locked,Locked,$iif(%st == EndFirst,Second half,$iif(%st == First,First half,$iif(%st == MR3-1,MR3 - First half,$iif(%st == End2-MR3,MR3,$iif(%st == EndMR3-1,MR3 - Second half,$iif(%st == MR3-2,MR3 - Second half,$iif(%st == Second,Second half,$iif(%st == Adding,Adding,$iif(%st == OFF,OFF))))))))))))
return %stts
}
alias SWAPscore {
var %CT = $readini(Serversbot.ini,$1,CTScore)
var %TS = $readini(Serversbot.ini,$1,TSScore)
.writeini -n Serversbot.ini $1 CTScore %TS
.writeini -n Serversbot.ini $1 TSScore %CT
.writeini -n Serversbot.ini $1 CTLastScore %TS
.writeini -n Serversbot.ini $1 TSLastScore %CT
}
alias rd { return $readini(Serversbot.ini,$gettok($1-,1,32),$gettok($1-,2,32)) }
alias RCON.DATA {
var %rcon.say = $iif(say isin $2-,$gettok($2-,3,34)),%rcon.nick = $clr($2-).nick,%rcon.nick2 = $clr($2-).nick2,%rcon.steam = $clr($2-).steam,%rcon.steam2 = $clr($2-).steam2, %rcon.team = $clr($2-).team, %rcon.team2 = $clr($2-).team2, %rcon.weapon = $clr($2-).weapon, %rc = rcmd $1, %ad = rcmd $1 admin_command
if (!$window(@Console $+ $1)) .window -e @Console $+ $1
if (say !isin $2-) {
if (*Bad rcon_password.* iswm $2-) && ($readini(Serversbot.ini,$1,Connected) != BadRcon) { .writeini -n Serversbot.ini $1 Connected BadRcon | echo -st (12RCON $1 $+ 1) 4* BAD RCON PASSWORD - Server Num $1 - Closing RCON Socket... * | rconclose $1 }
if (Server shutdown isin $2-) { .writeini -n Serversbot.ini $1 Connected OFF | echo -st (12RCON $1 $+ 1) 4* SERVER $1 SHUTDOWN - Closing RCON Socket... * | rconclose $1 }
if ((logaddress_del isin $2-) || (Rcon: isin $2-) || (ConnectedConnectedConnected == $2-)) && (Bad Rcon !isin $2-) && ($rd($1 Connected) != ON) && (!$(% $+ $1 $+ .sock,2)) { inc -u1 % $+ $1 $+ .sock | .timer $+ $1 $+ rlog off | if ($rd($1 Game) != CSS) .timer $+ $1 0 30 %rc Retry Connection | .writeini -n Serversbot.ini $1 Connected ON | echo -s  | echo -st 3* Refreshing server $1 connection done succesfully 3* }
if (Bad Rcon: "rcon* iswm $2-) { .writeini -n Serversbot.ini $1 Connected BadRcon | rconclose $1 }
if (%rcon.steam == $readini(ServersBOT.ini,$1,STEAMID)) && (><>" connected, address isin $2-) { inc -u600 % $+ $1 $+ .AdminConnected }
elseif ($istok(First Second MR3-1 MR3-2,$readini(Serversbot.ini,$1,LiveStatus),32)) {
if ( (*Team "TERRORIST" triggered "Terrorists_Win"* iswm $2-) || (*Team "TERRORIST" triggered "Target_Bombed"* iswm $2-) ) { var %rcon.teamwin = TS }
if ( (*Team "CT" triggered "CTs_Win"* iswm $2-) || (*Team "CT" triggered "Target_Saved"* iswm $2-) || (*Team "CT" triggered "Bomb_Defused"* iswm $2-) ) { var %rcon.teamwin = CT }
if (%rcon.teamwin) {
.writeini -n Serversbot.ini $1 %rcon.teamwin $+ Score $calc($rd($1 %rcon.teamwin $+ Score) +1)
%ad admin_ssay Score is: CT: $iif($readini(Serversbot.ini,$1,CTScore),$v1,0) $+ , Terrorists: $iif($readini(Serversbot.ini,$1,TSScore),$v1,0)
if ($calc($readini(Serversbot.ini,$1,CTScore) + $readini(Serversbot.ini,$1,TSScore)) == 14) && ($readini(Serversbot.ini,$1,LiveStatus) == First) { %ad admin_tsay This is the last round for this half ! Score is: CT: $iif($readini(Serversbot.ini,$1,CTScore),$v1,0) $+ , Terrorists: $iif($readini(Serversbot.ini,$1,TSScore),$v1,0) }
elseif ($calc($readini(Serversbot.ini,$1,CTScore) + $readini(Serversbot.ini,$1,TSScore)) == 15) && ($readini(Serversbot.ini,$1,LiveStatus) == First) { %ad admin_ssay First half ended, Moving teams ! | swapscore $1 | ServerCMD $1 MoveTeams | .writeini -n Serversbot.ini $1 CTLastScore $readini(Serversbot.ini,$1,CTScore) | .writeini -n Serversbot.ini $1 TSLastScore $readini(Serversbot.ini,$1,TSScore) | .writeini -n Serversbot.ini $1 LiveStatus EndFirst }
elseif (($readini(Serversbot.ini,$1,CTScore) == 15) && ($readini(Serversbot.ini,$1,TSScore) == 15)) && ($readini(Serversbot.ini,$1,LiveStatus) == Second) { %ad admin_ssay Its a tie, MR3 game. |  swapscore $1 | ServerCMD $1 MoveTeams | ServerCMD $1 Prac | .writeini -n Serversbot.ini $1 CTLastScore $readini(Serversbot.ini,$1,CTScore) | .writeini -n Serversbot.ini $1 TSBLastScore $readini(Serversbot.ini,$1,TSScore) | .writeini -n Serversbot.ini $1 LiveStatus End2-MR3 }
elseif (($readini(Serversbot.ini,$1,CTScore) == 15) || ($readini(Serversbot.ini,$1,TSScore) == 15)) && ($readini(Serversbot.ini,$1,LiveStatus) == Second) { %ad admin_ssay This is the last round for the $iif($readini(Serversbot.ini,$1,TSScore) == 15,Terrorists,CT) ! }
elseif (($readini(Serversbot.ini,$1,CTScore) == 16) || ($readini(Serversbot.ini,$1,TSScore) == 16)) && ($readini(Serversbot.ini,$1,LiveStatus) == Second) { LiveEnd $1 over }
elseif ($calc($readini(Serversbot.ini,$1,CTScore) + $readini(Serversbot.ini,$1,TSScore) -30) == 2) && ($readini(Serversbot.ini,$1,LiveStatus) == MR3-1) { %ad admin_ssay This is the last round for this half ! }
elseif ($calc($readini(Serversbot.ini,$1,CTScore) + $readini(Serversbot.ini,$1,TSScore) -30) == 3) && ($readini(Serversbot.ini,$1,LiveStatus) == MR3-1) { %ad admin_ssay First half ended | swapscore $1 | ServerCMD $1 MoveTeams | .writeini -n Serversbot.ini $1 CTLastScore $readini(Serversbot.ini,$1,CTScore) | .writeini -n Serversbot.ini $1 TSLastScore $readini(Serversbot.ini,$1,TSScore) | .writeini -n Serversbot.ini $1 LiveStatus EndMR3-1 }
elseif ($calc($readini(Serversbot.ini,$1,CTScore) + $readini(Serversbot.ini,$1,TSScore) -30) == 5) && ($readini(Serversbot.ini,$1,LiveStatus) == MR3-2) { %ad admin_ssay This is the last round for the $iif($readini(Serversbot.ini,$1,CTScore) > $readini(Serversbot.ini,$1,TSScore),CT,Terrorists) ! }
elseif ($calc($readini(Serversbot.ini,$1,CTScore) + $readini(Serversbot.ini,$1,TSScore) -30) == 6) && ($readini(Serversbot.ini,$1,LiveStatus) == MR3-2) { LiveEnd $1 over }
}
}
}
if ($2) { echo @Console $+ $1 (12RCON1) $2- }
if (say isin $2-) {
var %say = $gettok($2-,3,34)
if (%rcon.say == !Score) && ($readini(Serversbot.ini,$1,LiveStatus)) { %ad admin_ssay Score is: CT: $iif($readini(Serversbot.ini,$1,CTScore),$v1,0) $+ , Terrorists: $iif($readini(Serversbot.ini,$1,TSScore),$v1,0) ( $+ $LiveStatus($1) $+ ) }
elseif (%rcon.steam == $readini(ServersBOT.ini,$1,STEAMID)) {
if (%rcon.say == !Live) && ($istok(NotLive EndFirst End2-MR3 EndMR3-1,$readini(Serversbot.ini,$1,LiveStatus),32)) {
ServerCMD $1 $iif(MR3 isin $readini(Serversbot.ini,$1,LiveStatus),MR3,MR15)
.timer 1 4 %ad admin_tsay $replace($readini(Serversbot.ini,$1,LiveStatus),NotLive,1st,EndFirst,2nd,End2-MR3,MR3 1st,EndMR3-1,MR3 2nd) Half has been started, good luck teams & have fun in $readini(Serversbot.ini,Settings,Channel) $+ 's free servers !
if ($readini(Serversbot.ini,$1,LiveStatus) == NotLive) { .writeini -n Serversbot.ini $1 TSScore 0 | .writeini -n Serversbot.ini $1 CTScore 0 | remini Serversbot.ini $1 TSLastScore | remini Serversbot.ini $1 CTLastScore }
.writeini -n Serversbot.ini $1 LiveStatus $replace($readini(Serversbot.ini,$1,LiveStatus),NotLive,First,EndFirst,Second,End2-MR3,MR3-1,EndMR3-1,MR3-2)
}
elseif (%rcon.say == !NotLive) && ($istok(First Second MR3-1 MR3-2,$readini(Serversbot.ini,$1,LiveStatus),32)) {
.writeini -n Serversbot.ini $1 LiveStatus $replace($readini(Serversbot.ini,$1,LiveStatus),First,NotLive,Second,EndFirst,MR3-1,End2-MR3,MR3-2,EndMR3-1)
if ($readini(Serversbot.ini,$1,LiveStatus) == NotLive) { .writeini -n Serversbot.ini $1 CTScore 0 | .writeini -n Serversbot.ini $1 TSScore 0 }
else { .writeini -n Serversbot.ini $1 TSScore $readini(Serversbot.ini,$1,TSLastScore) | .writeini -n Serversbot.ini $1 CTScore $readini(Serversbot.ini,$1,CTLastScore) }
ServerCMD $1 Prac
%ad admin_ssay Game is not live.
}
elseif ((%rcon.say == !Stop) || (%rcon.say == !End)) && ($readini(Serversbot.ini,$1,LiveStatus) != NotLive) {
LiveEnd $1
}
elseif ($istok(!rr !knife !pass !slay !ff !kick !mr15 !prac !rates !map !tsay ! @ !rt,$gettok(%rcon.say,1,32),32)) { ServerCMD $1 $iif($gettok(%rcon.say,1,32) == !,%rcon.say,$iif($gettok(%rcon.say,1,32) == @,%rcon.say,$right(%rcon.say,-1))) }
}
}
}
alias LiveEnd {
.writeini -n Serversbot.ini $1 LiveStatus NotLive
.writeini -n Serversbot.ini $1 TSScore 0 | .writeini -n Serversbot.ini $1 CTScore 0 | remini Serversbot.ini $1 TSLastScore | remini Serversbot.ini $1 CTLastScore
ServerCMD $1 Prac
.timer 1 2 rcmd $1 admin_command admin_ssay Game has been $iif($2,overed.,stopped.)
}
alias Servers {
if ($prop) {
if ($prop == num) { var %x 1 | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) && (!$readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Status)) && ($readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Connected) == ON) { return $ini(ServersBOT.ini,%x) | break } | inc %x } }
else { var %x 1 | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) && ($readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Taken) == $1) { return $ini(ServersBOT.ini,%x) | break } | inc %x } }
}
else {
goto $1
:Ports | var %x 1,%ports | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) { %ports = %ports $readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Port) } | inc %x } | return %ports | halt
:checkadmin | if ($(% $+ $2 $+ .AdminConnected,2)) { halt }
:total | var %x 1,%y 0 | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) && ($readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Connected) == ON) {  inc %y } | inc %x } | return %y | halt
:free | var %x 1,%y 0 | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) && (!$readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Status)) && ($readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Connected) == ON) { inc %y } | inc %x } |  return %y | halt
:Connected | if ($readini(ServersBOT.ini,$2,Connected) != ON) { goto unset } | halt
:Checkplayers | hl $2 check | halt
:AllHL | .remove filter.txt | var %x 1 | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) && ($readini(ServersBOT.ini,$ini(Serversbot.ini,%x),Connected) == ON) { write filter.txt $ini(ServersBOT.ini,%x) } | inc %x } | filter -ctu 1 32 filter.txt filter.txt | .timer 1 1 ALLHL | halt
:NextCheck | if ($(% $+ $2 $+ .check,2)) { goto unset } | else { .timerHL $+ $2 $+ next 1 60 hl $2 check | inc -u65 % $+ $2 $+ .check } | halt
:unset | echo -s  | $iif($readini(ServersBOT.ini,$2,Connected) == ON,$iif($readini(ServersBOT.ini,$2,Status) == Taken,$iif($me ison $readini(ServersBOT.ini,Settings,Channel),stylemsg $readini(ServersBOT.ini,Settings,Channel) %RegularColor $+ Server num $special($2) is now 3FREE))) | LiveEnd $2 | remini ServersBOT.ini $2 Status | remini ServersBOT.ini $2 LiveStatus | remini ServersBOT.ini $2 Taken | remini ServersBOT.ini $2 Nick | remini ServersBOT.ini $2 STEAMID | $iif($readini(ServersBOT.ini,$2,Connected) == ON,ServerCMD $2 taken) | .timerRelease $+ $2 off | .timerHL $+ $2 $+ * off | .timerCHECK $+ $2 off | .timerstylemsg $+ $2 off | .timerstyle2msg $+ $2 off
}
}
alias ALLHL { var %x 0 | while ($read(filter.txt,%x)) { .timer 1 %x HL $read(filter.txt,%x) ALL | inc %x } | .remove filter.txt }
alias ServerCMD {
var %c = rcmd $1 admin_command,%say %c admin_ssay
if ($2 == MoveTeams) { rcmd $1 admin_quiet 2 | %c admin_execall setinfo "_vgui_menus" "0" | %c admin_execteam 1 chooseteam | %c admin_execteam 1 menuselect 2 | %c admin_execteam 2 chooseteam | %c admin_execteam 2 menuselect 1 }
elseif (($2 == tsay) || ($2 == !) || ($2 == @)) && ($3) { %c admin_tsay $3- }
elseif ($2 == slay) && ($3) { %c admin_slay $3 }
elseif ($2 == ff) && (($3 == ON) || ($3 == OFF)) { %c admin_rcon mp_friendlyfire $3 | %say Friendlyfire is now $upper($3) }
elseif ($2 == rr) { %c admin_rcon sv_restart $iif($3 isnum,$3,1) | %say Round has been restarted. $iif($3,$chr(40) $+ $3 Sec $+ $chr(41)) }
elseif ($2 == map) && ($3) { %say Changing map to $3 in 5 seconds. | var %x 5,%y 0 | while (%x > 0) { .timer 1 %y %say %x seconds. | inc %y | dec %x } | .timer 1 6 %c admin_map $3 }
elseif ($2 == kick) && ($3) { %c admin_kick $3 | %say $3 was kicked from the server. }
elseif ($2 == rt) && ($3) { %c admin_rcon mp_roundtime $3- | %say Roundtime has been changed to: $3- }
elseif ($2 == pass) && ($3) { %c admin_rcon sv_password $3 | %say Server password has been changed to $3 $+ . }
elseif ($2 == rates) {
%say Setting server RATES, restarting the server in 5 seconds.
var %x 5,%y 0 | while (%x > 0) { .timer 1 %y %say %x seconds. | inc %y | dec %x }
.timer 1 1 %c admin_rcon sv_maxrate "25000"
.timer 1 1 %c admin_rcon sv_maxupdaterate "101"
.timer 1 1 %c admin_rcon sv_minrate "2500"
.timer 1 1 %c admin_rcon sys_ticrate "10000.0"
.timer 1 1 %c admin_rcon sv_maxspeed "320"
.timer 1 1 %c admin_rcon sv_stats "0"
.timer 1 1 %c admin_rcon sv_region "3"
.timer 1 6 %c admin_rcon restart
}
elseif ($2 == mr15) {
rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4.timer 35;mr122"
rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 800;mr123"
rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
rcmd $1 mr122k
%c admin_ssay MR15 settings have been loaded.
%c admin_tsay MR15 settings have been loaded.
}
elseif ($2 == knife) {
rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4.timer 35;mr122"
rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 800;mr123"
rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
rcmd $1 mr122k
%c admin_ssay Knife round !!!
%c admin_tsay Knife round !!!
%c admin_ssay Warning ! do not shoot !
}
elseif ($2 == mr3) {
rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4.timer 35;mr122"
rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 4000;mr123"
rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
rcmd $1 mr122k
%c admin_ssay MR3 settings have been loaded.
%c admin_tsay MR3 settings have been loaded.
}
elseif ($2 == prac) {
rcmd $1 alias prac122k "admin_ignore_immunity 1;default_access 0;Prac1"
rcmd $1 alias Prac1 "mp_forcecamera 0;mp_forcechasecam 0;mp_c4.timer 35;Prac2"
rcmd $1 alias Prac2 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 16000;Prac3"
rcmd $1 alias Prac3 "mp_autokick 0;mp_friendlyfire 0;mp_freezetime 0;Prac4"
rcmd $1 alias Prac4 "mp_roundtime 7;mp_buytime 9;mp_fadetoblack 0;Prac5"
rcmd $1 alias Prac5 "sv_alltalk 1;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
rcmd $1 prac122k
%c admin_ssay PRAC settings have been loaded.
%c admin_tsay PRAC settings have been loaded.
}
elseif ($2 == taken) {  rcmd $1 admin_command admin_execall disconnect | rcmd $1 admin_command admin_nopass | if ($3) rcmd $1 admin_command admin_unban $3 }
}
alias Admins {
if ($1) {
if ($prop == user) { var %x = 1 | while (%x <= $ini(ServersAdmins.ini,0)) { if ($1 == $readini(ServersAdmins.ini,$ini(ServersAdmins.ini,%x),Logged)) return $ini(ServersAdmins.ini,%x) | inc %x } }
elseif ($prop == isin) { var %x = 1 | while (%x <= $ini(ServersAdmins.ini,0)) { if ($1 == $ini(ServersAdmins.ini,%x)) { return $true | break } | inc %x } }
elseif ($prop == logged) { var %x = 1 | while (%x <= $ini(ServersAdmins.ini,0)) { if ($1 == $readini(ServersAdmins.ini,$ini(ServersAdmins.ini,%x),Logged)) { return $true | break } | inc %x } }
}
elseif (!$prop) { var %x = 1, %y = 0 | while (%x <= $ini(ServersAdmins.ini,0)) { var %admins = %admins $iif($readini(ServersAdmins.ini,$ini(ServersAdmins.ini,%x),Logged),3,4) $+ $ini(ServersAdmins.ini,%x) | if ($readini(ServersAdmins.ini,$ini(ServersAdmins.ini,%x),Logged)) inc %y | inc %x } | return Admins are ( $+ $iif(%y == 0,14,03) $+ %y $+ 0/ $+ $ini(ServersAdmins.ini,0) $+ ) $replacE(%admins,$chr(32),$+(%Color1,$chr(44),$chr(32))) }
}
alias special { return %RegularColor $+ %SpecialColor $+ $1- $+ %SpecialColor $+ %RegularColor }
alias stylemsg { msg $1 %Style1 $2- $+ %RegularColor %Style2 }
on *:text:*:*:{
if (!%ServersFlood) { var %n = stylemsg $nick ,%c = stylemsg $readini(ServersBOT.ini,Settings,Channel)
if (# == $readini(ServersBOT.ini,Settings,Channel)) {
if (($1 == !info) || ($1 == !Server)) && ($readini(ServersBOT.ini,$2,Status)) { inc -u4 %ServersFlood | hl $2 }
elseif ($1 == !total) { %c %RegularColor $+ $iif($Servers(Total) == 0,There are no servers.,There $iif($Servers(free) == 1,is,are) $iif($Servers(free) == 0,4NO $+ %RegularColor,$+(03,,$iif($Servers(free),$v1,0),$remove(%RegularColor,,),,/,$Servers(Total))) $remove(%RegularColor,) $+ free server $+ $iif($Servers(free) != 1,s) $+ . $iif($Servers(free) != 0,Use: ! $+ $special(Take) < $+ $special(STEAMID) $+ > - for take the server.) $iif($Servers(free) == 0,$+($chr(40),,04,$iif($Servers(free),$v1,0),,$remove(%RegularColor,,),/,$Servers(Total),$chr(41)))) | inc -u4 %ServersFlood }
elseif ($1 == !servers) { $iif($Servers(Total) > 0,mode # +m) | $iif($Servers(Total) == 0,%c %RegularColor $+ There are no servers.,.timer 1 1 %c %RegularColor $+ There $iif($Servers(free) == 1,is,are) $iif($Servers(free) == 0,4NO,$+(03,,$iif($Servers(free),$v1,0),$remove(%RegularColor,,),,/,$Servers(Total))) $remove(%RegularColor,) $+ free server $+ $iif($Servers(free) != 1,s) $+ . $iif($Servers(free) == 0,$+($chr(40),,04,$iif($Servers(free),$v1,0),,$remove(%RegularColor,,),/,$Servers(Total),$chr(41)))) | $iif($ini(ServersBOT.ini,2),.timer 1 2 Servers ALLHL) | $iif($Servers(Total) > 0,.timer 1 $calc($Servers(Total) +5) mode # -m) | inc $(-u $+ $calc($Servers(Total) +6)) %ServersFlood }
elseif (($1 == !take) || ($1 == !rent)) && ($regex($iif($3,$3,$2),/^STEAM_(0|1):(0|1):\d+$/i)) {
inc -u4 %ServersFlood | var %ServTAKE = $iif($3,$iif(!$readini(ServersBOT.ini,$2,Status),$iif($readini(ServersBOT.ini,$2,Connected) == ON,$2)),$Servers(free).num)
if ($Servers($wildsite).istake) { %c %RegularColor $+ You already taken a server ! }
elseif (%ServTAKE) {
ServerCMD %ServTAKE taken $iif($3,$3,$2)
writeini -n Serversbot.ini %ServTAKE LiveStatus NotLive
.timerHL $+ %ServTAKE 0 550 Servers CheckPlayers %ServTAKE
.timerRelease $+ %ServTAKE 1 $readini(ServersBOT.ini,Settings,ReleaseTime) Servers unset $(%ServTAKE,2)
.timerCHECK $+ %ServTAKE 1 600 Servers checkadmin %ServTAKE
.timerstyle2msg $+ %ServTAKE -m 1 100 %n %RegularColor $+ You have the server for $special($fix($readini(ServersBOT.ini,Settings,ReleaseTime))) $+ , Join in the next $special(10) minutes or the server will be released. IP: $special($readini(ServersBOT.ini,%ServTAKE,Server))
.timerstylemsg $+ %ServTAKE -m 1 100 %c %RegularColor $+ Server $special(%ServTAKE) has been taken by $special($nick) $+ .
writeini -n ServersBOT.ini %ServTAKE Taken $wildsite
writeini -n ServersBOT.ini %ServTAKE STEAMID $iif($3,$3,$2)
writeini -n ServersBOT.ini %ServTAKE Nick $nick
writeini -n ServersBOT.ini %ServTAKE Status Taken
}
elseif ($3) && ($readini(ServersBOT.ini,$2,Status)) { %c %RegularColor $+ Server $2 is already 4TAKEN }
elseif ($3) && (!$readini(ServersBOT.ini,$2,Server)) { %c %RegularColor $+ Server num $special($2) is not exist. }
elseif ($3) && ($readini(ServersBOT.ini,$2,Connected) != ON) { %c %RegularColor $+ Server num $special($2) is not connected to the server. }
elseif ($servers(free) == 0) { %c %RegularColor $+ There are 4NO $+ %RegularColor free servers }
else { %c %RegularColor $+ There are no servers. } 
}
elseif ($1 == !credits) || ($1 == !credit) { %c %RegularColor $+ This Serversbot has been created by $special(Arthas) $+ . v2.2 | inc -u4 %ServersFlood }
elseif ($1 == !help) || ($1 == !commands) { %c $special(Use) $+ : ! $+ $special(Take) STEAM:ID to take a server for $special($fix($readini(ServersBOT.ini,Settings,ReleaseTime))) | inc -u3 %ServersFlood }
elseif ($1 == !release) && (!$2) {
inc -u4 %ServersFlood
if ($Servers($wildsite).istake) { Servers unset $Servers($wildsite).istake }
else { %c %RegularColor $+ You did'nt take any server ! }
}
}
elseif ($target !ischan) {
if ($Admins($right($wildsite,-4)).logged) {
if ($1 == !Logout) { %c %RegularColor $+ $nick has been disconnected from admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) Reason: Logout ( $+ $wildsite $+ ) | %n %RegularColor $+ You have been disconnected from admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) Reason: Logout ( $+ $wildsite $+ ) | remini ServersAdmins.ini $Admins($right($wildsite,-4)).user Logged | inc -u5 %ServersFlood }
elseif ($1 == !Commands) { %n %RegularColor $+ Admin private commands are: ! $+ $special(Add) Server <ServNum> <IP> <RconPass> <Port> - ! $+ $special(Del) $+ /! $+ $special(Remove) Server <ServNum> - ! $+ $special(Refresh) - ! $+ $special(Release) <ServNum> | inc -u5 %ServersFlood }
elseif ($1 == !Add) && ($2 == Server) && ($3 isnum) && ($6 isnum) && ($len($6) == 4) && (!$7) {
if ($readini(ServersBOT.ini,$3,Server)) { %n %RegularColor $+ There is a server with this number ! change one of the servers number. }
elseif ($istok($Servers(ports),$6,32)) { %n %RegularColor $+ This connection port already in use, try another one. }
else { writeini -n ServersBOT.ini $3 Server $4 | writeini -n ServersBOT.ini $3 Rcon $5 | writeini -n ServersBOT.ini $3 Port $6 | %n %RegularColor $+ Server has been added - Number: $3 - IP: $4 - RCON: $5 - Port: $6 }
inc -u5 %ServersFlood
}
elseif (($1 == !Del || $1 == !Remove)) && ($2 == Server) && ($readini(ServersBOT.ini,$3,Server)) { rconclose $3 | remini ServersBOT.ini $3 | %n %RegularColor $+ Server number $3 has been deleted. | inc -u5 %ServersFlood }
elseif ($1 == !Refresh) { rconstart | %n %RegularColor $+ Refreshing Servers ! | inc -u5 %ServersFlood }
elseif ($1 == !Release) && ($readini(ServersBOT.ini,$2,Server)) {
if ($readini(ServersBOT.ini,$2,Status)) { Servers unset $2 }
else { %n %RegularColor $+ Server $2 is already free. }
inc -u5 %ServersFlood
}
}
elseif ($1 == !Login) && ($readini(ServersAdmins.ini,$2,Pass) == $3) && (!$Admins($right($wildsite,-4)).logged) { writeini -n ServersAdmins.ini $2 Logged $right($wildsite,-4) | %c %RegularColor $+ $nick has been connected to admin account. User: $Admins($right($wildsite,-4)).user ( $+ $wildsite $+ ) | %n %RegularColor $+ You have been connected to admin account. User: $Admins($right($wildsite,-4)).user ( $+ $wildsite $+ ) | inc -u5 %ServersFlood }
}
}
}
on *:nick: if ($Servers($wildsite).istake) && ($nick == $readini(ServersBOT.ini,$Servers($wildsite).istake,Nick)) writeini -n ServersBOT.ini $Servers($wildsite).istake Nick $newnick
on *:kick:$($readini(ServersBOT.ini,Settings,Channel)):{
if ($Admins($right($address($knick,2),-4)).logged) { stylemsg # %RegularColor $+ $knick has been disconnected from admin account. User: $Admins($right($address($knick,2),-4)).user $+ $Chr(44) Reason: Kick ( $+ $address($knick,2) $+ ) | stylemsg $knick %RegularColor $+ You have been disconnected from admin account. User: $Admins($right($address($knick,2),-4)).user $+ $Chr(44) Reason: Kick ( $+ $address($knick,2) $+ ) | remini ServersAdmins.ini $Admins($right($address($knick,2),-4)).user Logged }
elseif ($Servers($address($knick,2)).istake) && ($knick == $readini(ServersBOT.ini,$Servers($address($knick,2)).istake,Nick)) Servers unset $Servers($address($knick,2)).istake
}
on *:quit:{
if ($Servers($wildsite).istake) && ($nick == $readini(ServersBOT.ini,$Servers($wildsite).istake,Nick)) Servers unset $Servers($wildsite).istake
elseif ($Admins($right($wildsite,-4)).logged) { remini ServersAdmins.ini $Admins($right($wildsite,-4)).user Logged }
}
on *:part:$($readini(ServersBOT.ini,Settings,Channel)):{
if ($Admins($right($wildsite,-4)).logged) { stylemsg # %RegularColor $+ $nick has been disconnected from admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) Reason: Part ( $+ $wildsite $+ ) | remini ServersAdmins.ini $Admins($right($wildsite,-4)).user Logged }
elseif ($Servers($wildsite).istake) && ($nick == $readini(ServersBOT.ini,$Servers($wildsite).istake,Nick)) Servers unset $Servers($wildsite).istake
}
on *:connect: inc -u30 %Connectt | $iif($readini(ServersBOT.ini,Settings,Channel),.timer 1 1 join $v1) | .timer 1 1 rconstart
dialog serversbot {
title "Arthas Serversbot"
size -1 -1 57 5
option dbu
tab "Settings", 1, 0 3 238 179
text "Channel:", 4, 9 24 24 8, tab 1
edit "", 5, 40 23 70 9, tab 1 autohs
text "Styles:", 6, 9 54 21 8, tab 1
button "OK", 8, 8 84 37 12, tab 1
button "Close", 9, 47 84 37 12, tab 1
box "", 10, 39 19 72 14, tab 1
text "Release:", 31, 9 39 27 8, tab 1
combo 7, 39 53 79 45, tab 1 size drop
text "", 35, 40 38 34 9, tab 1
edit "", 32, 40 38 15 8, tab 1
text "minutes", 34, 55 39 20 7, tab 1
box "", 33, 39 34 36 14, tab 1
tab "Admins", 2
button "OK", 19, 8 116 37 12, tab 2
edit "", 12, 40 23 70 9, tab 2 autohs
text "Username:", 11, 9 24 27 8, tab 2
text "Password:", 13, 9 39 27 8, tab 2
edit "", 14, 40 38 70 9, tab 2 autohs
button "Close", 20, 47 116 37 12, tab 2
button "Add", 16, 114 37 37 11, tab 2
list 15, 8 51 103 61, tab 2 size
button "Remove", 17, 114 51 37 11, tab 2
button "Clear", 18, 114 65 37 11, tab 2
box "", 21, 39 19 72 14, tab 2
box "", 22, 39 34 72 14, tab 2
tab "Servers", 3
button "OK", 29, 8 116 37 12, tab 3
button "Close", 30, 47 116 37 12, tab 3
list 24, 8 38 160 74, tab 3 size
text "Servers:", 23, 9 24 27 8, tab 3
button "Add", 25, 171 37 37 11, tab 3
button "Remove", 26, 171 51 37 11, tab 3
button "Clear", 28, 171 79 37 11, tab 3
button "Edit", 27, 171 65 37 11, tab 3
}
dialog servadd {
title "Server add"
size -1 -1 109 81
option dbu
text "Server number:", 1, 5 9 39 8
text "IP Address:", 2, 5 23 30 8
text "Rcon pass:", 3, 5 37 28 8
text "Connection port:", 4, 5 51 42 8
edit "", 5, 52 8 50 10
edit "", 6, 52 22 50 10, autohs
edit "", 7, 52 36 50 10, autohs
edit "", 8, 52 50 50 10, autohs
edit "", 11, 52 100 50 10, autohs
button "Cancel", 9, 56 64 29 12,ok
button "OK", 10, 20 64 29 12
}
dialog style {
title "Style"
size -1 -1 120 47
option dbu
edit "", 1, 7 19 44 10, autohs
edit "", 2, 7 33 107 10
text "", 3, 40 6 44 8, center
button "OK", 4, 59 18 26 12
button "Cancel", 5, 88 18 26 12, Ok
}
alias redid {
if ($1 == admins) {
did -r serversbot 15 | var %x 1 | while ($ini(ServersAdmins.ini,%x)) { did -a serversbot 15 $v1 $chr(9) $readini(ServersAdmins.ini,$v1,Pass) | inc %x }
}
elseif ($ini(ServersBOT.ini,2)) {
did -r serversbot 24 | .remove filter.txt | var %x 1 | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) { write filter.txt $ini(ServersBOT.ini,%x) } | inc %x } | filter -ctu 1 32 filter.txt filter.txt
var %z 0 | while ($read(filter.txt,%z)) { did -a serversbot 24 - $+ $v1 $+ - $chr(9) $readini(ServersBOT.ini,$v1,Server) $chr(9) $readini(ServersBOT.ini,$v1,Rcon) | inc %z }
}
}
on *:dialog:*:*:*: {
if ($dname == style) {
if ($devent == init) {
dll mdx.dll MarkDialog $dname
dll mdx.dll SetControlMDX $dname 2 ComboBoxEx drop > views.mdx
dll mdx.dll SetControlMDX $dname 2 richedit return read multi autohs center > ctl_gen.mdx
dll mdx.dll SetDialog $dname bgcolor $rgb(255,255,255)
dll mdx.dll SetColor $dname 3 textbg $rgb(255,255,255)
dll mdx.dll SetColor $dname 3 background $rgb(255,255,255)
did -o $dname 2 1 text +m %Style1 %RegularColor $+ $special(Arthas&Aero) ServersBOT %Style2
}
if ($devent == edit) { did -ro $dname 2 1 text +m $iif($did(3) == Style 1,$did(1),%Style1) $iif($did(3) == Special Color,$did(1),%SpecialColor) $+ Arthas&Aero $iif($did(3) == Regular Color,%SpecialColor $+ $did(1),$iif($did(3) == Special Color,$did(1),%SpecialColor) $+ %RegularColor) $+ ServersBOT $+ $iif($did(3) == Regular Color,%SpecialColor $+ $did(1),%RegularColor) $iif($did(3) == Style 2,$did(1),%Style2) }
elseif ($devent == sclick) && ($did == 4) { if ($did(1)) set % $+ $remove($did(3),$chr(32)) $did(1) | dialog -x style style }
}
elseif ($dname == servadd) {
if ($devent == init) {
dll mdx.dll SetMircVersion $version
dll mdx.dll MarkDialog $dname
dll mdx.dll SetColor $dname 1,2,3,4 textbg $rgb(255,255,255)
dll mdx.dll SetColor $dname 1,2,3,4 background $rgb(255,255,255)
dll mdx.dll SetDialog $dname bgcolor $rgb(255,255,255)
}
elseif ($devent == edit) && ($did == 5) && ($readini(ServersBOT.ini,$did(5),Server)) && ($did(5) != $did(11)) { noop $input(There is a server with this number ! $+ $crlf $+ change one of the servers number.,o,Error) }
elseif ($devent == sclick) && ($did == 10) {
if ($did(5) !isnum) || (($readini(ServersBOT.ini,$did(5),Server)) && ($did(5) != $did(11))) { noop $input($iif($did(5) !isnum,Server number must be a number,There is a server with this number ! $+ $crlf $+ change one of the servers number.),o,Error) }
elseif (!$did(6)) { noop $input(Write the server IP,o,Error) }
elseif (!$did(7)) { noop $input(Write the server rcon password,o,Error) }
elseif ($did(8) !isnum) { noop $input(Connection port must be a number,o,Error) }
elseif ($istok($Servers(ports),$did(8),32)) && ($readini(ServersBOT.ini,$did(11),Port) != $did(8)) { noop $input(This connection port already in use $+ $crlf $+ try another one.,o,Error) }
else { if ($did(11)) && ($did(11) != $did(5)) { remini ServersBOT.ini $did(11) } | writeini -n ServersBOT.ini $did(5) Server $did(6) | writeini -n ServersBOT.ini $did(5) Rcon $did(7) | writeini -n ServersBOT.ini $did(5) Port $did(8) | dialog -x servadd servadd | redid }
}
}
elseif ($dname == serversbot) {
if ($devent == init) {
dialog -s $dname -1 -1 260 200
dll mdx.dll SetMircVersion $version
dll mdx.dll MarkDialog $dname
dll mdx.dll SetBorderStyle $dname 5,12,14,32
dll mdx.dll SetDialog $dname bgcolor $rgb(255,255,255)
dll mdx.dll SetColor $dname 34,6,31,11,13,23,35,4 textbg $rgb(255,255,255)
dll mdx.dll SetColor $dname 34,35,6,31,11,13,23,4 background $rgb(255,255,255)
dll mdx.dll SetControlMDX 15,24  listview report grid nosortheader rowselect flatsb > views.mdx
did -i $dname 15 1 headerdims 100 100
did -i $dname 15 1 headertext Username $chr(9) Password
did -i $dname 24 1 headerdims 40 130 127
did -i $dname 24 1 headertext Num $chr(9) Server IP $chr(9) Rcon
did -a $dname 7 Style 1 | did -a $dname 7 Style 2 | did -a $dname 7 Special Color | did -a $dname 7 Regular Color | did -a $dname 7 Choose
did -c $dname 7 5
did -a $dname 5 $iif($readini(ServersBOT.ini,Settings,Channel),$v1,Empty)
did -a $dname 32 $iif($readini(ServersBOT.ini,Settings,ReleaseTime),$calc($v1 /60),Empty)
redid | redid admins
}
elseif ($devent == edit) && ($did == 12) && ($readini(ServersAdmins.ini,$did(12),Pass)) { noop $input(There is already a user with this name. $+ $crlf $+ Try another username.,o,Error) }
elseif ($devent == sclick) {
if ($did(24).sel) { var %24text = $did(24).seltext }
if ($did == 1) { dialog -s $dname -1 -1 260 200 }
elseif ($did == 2) { dialog -s $dname -1 -1 315 264 }
elseif ($did == 3) { dialog -s $dname -1 -1 429 264 }
elseif ($did == 8) {
if (#* iswm $did(5)) writeini -n ServersBOT.ini Settings Channel $did(5)
if ($did(32) isnum) writeini -n ServersBOT.ini Settings ReleaseTime $calc($did(32) *60)
if ($did(7) != Empty) writeini -n ServersBOT.ini Settings Style $remove($did(7),Style)
}
elseif ($did == 16) {
if ($readini(ServersAdmins.ini,$did(12),Pass)) { noop $input(There is already a user with this name. $+ $crlf $+ Try another username.,o,Error) }
elseif (!$did(12)) { noop $input(Write username.,o,Error) }
elseif (!$did(14)) { noop $input(Write password,o,Error) }
else { writeini -n ServersAdmins.ini $did(12) Pass $did(14) | redid admins }
}
elseif ($did == 17) && ($did(15).sel) && ($input(Are you sure to remove user - $right($gettok($did(15).seltext,1,9),-11) ?,y,Removing user)) { remini ServersAdmins.ini $right($gettok($did(15).seltext,1,9),-11) | if ($ini(ServersBOT.ini,1)) redid admins | else did -r $dname 15) }
elseif ($did == 18) && ($input(Are you sure to clear all the users ?,y,Clear users)) { .remove ServersAdmins.ini | did -r $dname 15 }
elseif ($did == 7) && ($did(7) != Choose) { dialog -m style style | did -a style 3 $did(7) | did -a style 1 $(% $+ $remove($did(7),$chr(32)),2) }
elseif ($did == 30) || ($did == 20) || ($did == 9) { dialog -x $dname }
elseif ($did == 25) { dialog -m servadd servadd }
elseif ($did == 27) && ($did(24).sel) { dialog -m servadd servadd | did -a servadd 5,11 $remove($right($gettok(%24text,1,9),-11),-) | did -a servadd 6 $right($gettok(%24text,2,9),-11) | did -a servadd 7 $right($gettok(%24text,3,9),-11) | did -a servadd 8 $readini(ServersBOT.ini,$remove($right($gettok(%24text,1,9),-11),-),Port) }
elseif ($did == 26) && ($did(24).sel) && ($input(Are you sure to remove server $remove($right($gettok(%24text,1,9),-11),-) ?,y,Removing server)) { remini ServersBOT.ini $remove($right($gettok(%24text,1,9),-11),-) | if ($ini(ServersBOT.ini,2)) redid | else did -r $dname 24 | rconclose $remove($right($gettok(%24text,1,9),-11),-) }
elseif ($did == 28) && ($input(Are you sure to clear all the servers ?,y,Clear servers)) { did -r $dname 24 | var %x 0 | while ($ini(Serversbot.ini,%x)) { if ($ini(Serversbot.ini,%x) != Settings) { .timer -m 1 %x remini ServersBOT.ini $ini(ServersBOT.ini,%x) | rconclose $ini(ServersBOT.ini,%x) } | inc %x } }
}
}
}
menu * {
Servers bot
.Refresh: rconstart
.Dialog: dialog -m serversbot serversbot
}
Server Bot build By Arthas Credit to Arthas for this
www.mIRCx.co.il
Chief
Chief
Admin

מספר הודעות : 268
Join date : 2011-12-09
מיקום : mIRCx IRC Network

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum