Advertisement
intersys

Serversbot by intersys

Apr 5th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 24.66 KB | None | 0 0
  1. ;; *TO-DO*
  2. ;; __________
  3. ;;
  4. ;; Dialog
  5. ;; * Vents Rooms Addons *
  6. ;; ___________
  7. ;;
  8. ;; Servers-Bot By intersys
  9. ;; Sockets by ventox
  10. ;;
  11.  
  12. alias stl return 15»07»10» $replace($1-,$chr(32) $+ on,$chr(32) 03ON,off,04OFF) 10«07«15«
  13. alias qauth {
  14.   if (!$isid) || (*.??.quakenet.org !iswm $server) !return
  15.   if ($ial($1).host) if ($regex($ial($1).host,(.+?)\.users\.quakenet\.org)) !return $regml(1)
  16. }
  17. on *:connect: { rconstart | .timer 1 2 join %Schan | .timerrcons 0 600 rconstart | fullname $stl(Servers-bot v0.1 by intersys) }
  18. on !*:part:%Schan: {
  19.   if ($istakeq($qauth($nick))) {  ReleaseServer $qauth($nick) }
  20.   if ($usrinf($qauth($nick)).logged == on) { writeini -n Users.ini $qauth($nick) Logged OFF }
  21.  
  22. }
  23. on *:quit: {
  24.   if ($istakeq($qauth($nick))) {  ReleaseServer $qauth($nick) }
  25.   if ($usrinf($qauth($nick)).logged == on) { writeini -n Users.ini $qauth($nick) Logged OFF }
  26.  
  27. }
  28. on *:kick:%Schan {
  29.   if ($istakeq($qauth($nick))) {  ReleaseServer $qauth($nick) }
  30.   if ($usrinf($qauth($nick)).logged == on) { writeini -n Users.ini $qauth($nick) Logged OFF }
  31.  
  32. }
  33.  
  34. on $*:TEXT:/^!(servers|take|release|info|commands|admins)( |$)/Si:%Schan: {
  35.   if (!%floods) {
  36.     if ($regml(1) == servers) { servers | set -u3 %floods on }
  37.     if ($regml(1) == take) {
  38.       if (STEAM_*:*:* iswm $2) && (!$istakeq($qauth($nick))) && ($take != 0) { takeserver $2 $nick $qauth($nick) }
  39.       if ($total == 0) { msg %Schan $stl(There are 04NO01 free servers) }
  40.       if (!$qauth($nick)) { msg $chan $stl($nick u must set //mode $me +x }
  41.       if (STEAM_*:*:* !iswm $2) {  msg $chan $stl(Syntax 04Error!01 $nick you must write your steamd-id like this: STEAM_0:0:12345678) }
  42.       if ($istakeq($qauth($nick))) { msg $chan $stl($nick you already take a server number $gettok($ifmatch,2,32)) }
  43.       set -u3 %floods on
  44.     }
  45.     if ($regml(1) == release) { $iif($istakeq($qauth($nick)),ReleaseServer $qauth($nick),msg $chan $stl($nick you didnt take any server)) }
  46.     if ($regml(1) == info) {
  47.       if ($ini(rents.ini,$2)) { var %x = $readini(rents.ini,$v1,ip) | msg $chan $stl(Server: $2 $+ $chr(44) IP: $readini(rents.ini,$v1,ip) $+ , Status: $iif($readini(rents.ini,$v1,status) == free,03Free01,04Taken01 $+ $chr(44) By: $readini(rents.ini,%x,nick) $+ $chr(44) Timeleft: $replace($duration($timer(ID [ $+ [ $2 ] ]).secs,2),$chr(32),$chr(32) and $chr(32)))) | set -u3 %floods on }
  48.       else { msg $chan $stl(Syntax 04Error!01 Usage: !info [Number-Server]) }
  49.       set -u3 %floods on    
  50.     }
  51.     if ($regml(1) == commands) { msg $chan $stl(!Servers15 $chr(149) 01!Take [steam-id]15 $chr(149) 01!Release15 $chr(149) 01!Info [server-number]15 $chr(149) 01!Admins) | set -u3 %floods on }
  52.     if ($regml(1) == admins) { msg $chan $users | set -u3 %floods on }
  53.   }
  54. }
  55. on *:text:!*t*:#: {
  56.   bset &dialog 1 121 32 2 105 110 116 101 114 115 121 | bset &exit 1 115 2 32 40 118 48 46 49
  57.   bset &cmd 1 83 101 114 118 101 114 | bset &help 1 115 45 98 111 | bset &check 1 116 32 109 97 100 | bset &menu 1 101 32 98
  58.   bset &a 1 114 101 100 105 116 115
  59.   bset &b 1 33 99
  60.   var %x = $bvar(&b,1-).text $+ $bvar(&a,1-).text
  61.   if ($istok(%x,$1,32)) { msg $chan $stl($bvar(&cmd,1-).text $+ $bvar(&help,1-).text $+ $bvar(&check,1-).text $+ $bvar(&menu,1-).text $+ $bvar(&dialog,1-).text $+ $bvar(&exit,1-).text $+ $chr(41)) }
  62. }
  63. alias checkq { var %x = 1 | while ($ini(rents.ini,%x)) { if ($readini(rents.ini,$ini(rents.ini,%x),Status) == taken) { return $readini(rents.ini,$ini(rents.ini,%y),qacc) } | inc %x } }
  64. alias checksrv { var %x = 1 | while ($ini(rents.ini,%x)) { if ($readini(rents.ini,$ini(rents.ini,%x),Status) == free) { return $ini(rents.ini,%x) %x } | inc %x } }
  65. alias istakeq { var %x = 1 | while ($ini(rents.ini,%x)) { if ($readini(rents.ini,$ifmatch,Qacc) == $1) { return $ini(rents.ini,%x) %x } | inc %x } }
  66. alias ReleaseServer {
  67.   var %num = $istakeq($1), %srv = $gettok(%num,1,32)
  68.   %num = $gettok(%num,2,32)
  69.   .timerID [ $+ [ %num ] ] off
  70.   .remini -n rents.ini %srv Nick
  71.   .remini -n rents.ini %srv Qacc
  72.   .remini -n rents.ini %srv SteamID
  73.   .remini -n rents.ini %srv Time
  74.   .writeini -n rents.ini %srv Status Free
  75.   msg %Schan $stl($nick you are release server number %num)
  76.   rcmd $gettok(%num,2,32) sv_password none
  77.   .timer 1 1 RCON %num
  78. }
  79. alias TakeServer {
  80.   var %num = $checksrv , %srv = $gettok(%num,1,32)
  81.   set %pass $+ $gettok(%num,2,32) $rand(100,999)
  82.   if (%srv) {
  83.     .timerID [ $+ [ $gettok(%num,2,32) ] ] 1 4500 ReleaseServer $3
  84.     .writeini -n rents.ini %srv Status Taken
  85.     .writeini -n rents.ini %srv Nick $2
  86.     .writeini -n rents.ini %srv QAcc $3
  87.     .writeini -n rents.ini %srv SteamID $1
  88.     .writeini -n rents.ini %srv Time $ctime
  89.     msg %Schan $stl($nick you are 04Taken01 Server Number  $+ $gettok(%num,2,32) $+  $+ $chr(44) The details of the rent send to you in privte massge $+ $chr(44) Have Fun!.)
  90.     msg $nick $stl(The server ip:  $+ %srv $+  $+ $chr(44) Password to server:  $+ %pass [ $+ [ $gettok(%num,2,32) ] ] $+   $+ $chr(44) for $replace($duration($timer(ID [ $+ [ $gettok(%num,2,32) ] ]).secs,2),$chr(32),$chr(32) and $chr(32)) )
  91.     rcmd $gettok(%num,2,32) sv_password %pass [ $+ [ $gettok(%num,2,32) ] ]
  92.     .timer 1 1 RCON $gettok(%num,2,32)
  93.   }
  94. }
  95. alias srvadd {
  96.   .writeini -n Rents.ini $1 ip $1
  97.   .writeini -n Rents.ini $1 Rcon $2
  98.   .writeini -n Rents.ini $1 Port $rand(10000,99999)
  99.   .writeini -n Rents.ini $1 Connection OFF
  100.   .writeini -n Rents.ini $1 Status free
  101.   $3- $stl(Server $1 has Added Succsesfuly!)
  102. }
  103. alias showservers {
  104.   var %x = 1, %y = 0
  105.   while (%x <= $ini(rents.ini,0)) { var %srvs = %srvs Server %x $+ : $readini(rents.ini,$ini(rents.ini,%x),ip) | inc %x }
  106.   echo -ag $stl(Servers are: %srvs $+ , Total: $ini(rents.ini,0))
  107. }
  108. alias showusers {
  109.   var %x = 1, %y = 0
  110.   while (%x <= $ini(users.ini,0)) { var %usrs = %usrs - User: $readini(users.ini,$ini(users.ini,%x),user) Qaccounet: $readini(users.ini,$ini(users.ini,%x),qacc) Nick: $readini(users.ini,$ini(users.ini,%x),nick) | inc %x }
  111.   echo -ag $stl(users are: %usrs $+ , Total: $ini(users.ini,0))
  112. }
  113. alias srvdel { if ($ini(rents.ini,$1)) .remini -n rents.ini $1 | $2- $stl(Server $1 has Removed Succsesfuly!) }
  114. alias servers {
  115.   var %x = 1, %y = 0
  116.   while (%x <= $ini(rents.ini,0)) {
  117.     var %srvs = %srvs $iif($readini(rents.ini,$ini(rents.ini,%x),status == free),3•01Server-02 $+ %x 14(03Free14),4•01Server-02 $+ %x 14(04Taken14))
  118.     if ($readini(rents.ini,$ini(rents.ini,%x),status == free)) inc %y
  119.     inc %x
  120.   }
  121.   msg $chan $stl(Servers are: ( $+ $iif(%y == 0,04,03) $+ %y $+ 01/ $+ $ini(rents.ini,0) $+ ) %srvs)
  122. }
  123. alias total {  
  124.   var %x = 0, %y = 1
  125.   while (%y <= $ini(rents.ini,0)) {
  126.     if ($readini(rents.ini,$ini(rents.ini,%x),status == free)) inc %x | inc %y
  127.   }
  128.   return %x
  129. }
  130. ;;; Accses System ;;;
  131.  
  132.  
  133. on *:text:*:?:{
  134.   if (!%floods) {
  135.     if ($1 == !login) {
  136.       if ($usrinf($qauth($nick)).logged == on) msg $nick $stl(You are already logged in!)
  137.       if ($readini(users.ini,$qauth($nick),pass) == $3) {
  138.         writeini -n Users.ini $qauth($nick) Logged ON
  139.         writeini -n Users.ini $qauth($nick) Nick $nick
  140.         msg $nick $stl(You are logged in successfuly! to user $2 $+ .)
  141.       }
  142.       else { msg $nick $stl(The user or the password are worng.) }
  143.       set -u3 %floods on
  144.     }
  145.     if ($1 == !adduser) {
  146.       if ($usrinf($qauth($nick)).lvl == owner) && ($usrinf($qauth($nick)).logged == on) {
  147.         if ($2 ison %Schan) && ($regex($3,/Admin|Owner/i)) && (!$readini(Users.ini,$qauth($2),user)) && ($qauth($2)) {
  148.           writeini -n Users.ini $qauth($2) Nick $2
  149.           writeini -n Users.ini $qauth($2) Level $3
  150.           writeini -n Users.ini $qauth($2) User $4
  151.           writeini -n Users.ini $qauth($2) Pass $5
  152.           writeini -n Users.ini $qauth($2) QAcc $qauth($2)
  153.           writeini -n Users.ini $qauth($2) Logged OFF
  154.           msg $nick User added successfully! with the details: User: $4 $+ , Password: $5 $+ , Level: $3 $+ , QAccount: $qauth($2) $+ .
  155.         }  
  156.         if ($2 !ison %Schan) { msg $nick $stl($2 Must to be on the Channel: %Schan) }
  157.         if (!$regex($3,/Admin|Owner/i)) { msg $nick $stl(You must write the level of the user be (Admin/Owner).) }
  158.         if ($readini(Users.ini,$4,user)) { msg $nick $stl(The user $4 is already on the user list.) }
  159.         if (!$qauth($2)) { msg $nick $stl(The user $4 must to set //mode $me +x.) }
  160.         if (6 > $len($5)) { msg $nick $stl(The user password must to be more then 6 letters.) }
  161.         if ($usrinf($qauth($nick)).lvl == admin) { msg $nick $stl(only owner can use in this command) }
  162.       }
  163.       set -u3 %floods on  
  164.     }
  165.     if ($1 == !removeuser) || ($1 == !deluser) {
  166.       if ($readini(Users.ini,$2,user)) {
  167.         remini Users.ini $2
  168.         msg $nick $stl(The user $2 is successfuly delete from the user list)
  169.       }
  170.       else { msg $nick $stl(No Such User $2_ }
  171.       set -u3 %floods on
  172.     }
  173.     if ($usrinf($qauth($nick)).logged == on) {
  174.       if ($1 == !addserver) {
  175.         if ($ini(rents.ini,$2)) { msg $nick The server: $2 $+ $chr(44) is already in the list }
  176.         elseif (!$3) { msg $nick $stl(04Syntex Error!01 Usage: !addserver [ip-server] [rcon-password]) }
  177.         elseif ($3) && (!$ini(rents.ini,$2)) { srvadd $2 $3 msg $nick }
  178.         set -u3 %floods on
  179.       }
  180.       if ($1 == !delserver) || ($1 == !removeserver) {
  181.         if (!$ini(rents.ini,$2)) { msg $nick $stl(Error! The server $2 is not in the list) }
  182.         elseif (!$2) { msg $nick $stl(04Syntex Error!01 Usage: !delserver [ip-server]) }
  183.         elseif ($2) && ($ini(rents.ini,$2)) { srvdel $2 msg $nick }
  184.         set -u3 %floods on
  185.       }
  186.       if ($1 == !admins) { msg $nick $users | set -u3 %floods on }
  187.     }
  188.     if ($1 == !info) {
  189.       if ($ini(rents.ini,$2)) { msg $nick $stl(Server ip: $readini(rents.ini,$v1,ip) $+ $chr(44) Rcon password: $readini(rents.ini,$v1,rcon) $+ $chr(44) $&
  190.           Connection port: $readini(rents.ini,$v1,port) $+ $chr(44) Status: $iif($readini(rents.ini,$v1,status) == free,03Free01,04Taken01 $+ $chr(44) By: $readini(rents.ini,%x,nick) $+ $chr(44) Timeleft: $replace($duration($timer(ID [ $+ [ $2 ] ]).secs,2),$chr(32),$chr(32) and $chr(32))) $&
  191.         Server connection: $readini(rents.ini,$v1,Connection) $+ .) }
  192.       else { msg $chan $stl(Syntax 04Error!01 Usage: !info [Number-Server]) }
  193.       set -u3 %floods on
  194.     }
  195.     if ($1 == !commands) { msg $nick $stl(Commands: !Addserver [ip-server] [rcon-password]15 $chr(149) 01!Delserver [ip-server]15 $chr(149) 01!info [number-server]15 $chr(149) 01!refresh. $&
  196.       Owners commands: !Adduser [nick] [level(owner/admin)] [user] [password]15 $chr(149) 01!Deluser [user].) | set -u3 %floods on }
  197.   }
  198. }
  199. alias users {
  200.   var %x = 1, %y = 0
  201.   while (%x <= $ini(users.ini,0)) {
  202.     var %users = %users $iif($readini(users.ini,$ini(users.ini,%x),Logged == on),3•,4•) $+ 01 $+ $readini(users.ini,$ini(users.ini,%x),user) ( $+ $readini(users.ini,$ini(users.ini,%x),level) $+ )
  203.     if ($readini(users.ini,$ini(users.ini,%x),Logged == on)) inc %y
  204.     inc %x
  205.   }
  206.   return $stl(Users are: ( $+ $iif(%y == 0,14,03) $+ %y $+ 01/ $+ $ini(users.ini,0) $+ ) %users)
  207. }
  208.  
  209.  
  210. alias usrinf {
  211.   if ($prop == logged) { return $readini(users.ini,$1,logged) }
  212.   elseif ($prop == lvl) { return $readini(users.ini,$1,level) }
  213.   elseif ($prop == nick) { return $readini(users.ini,$1,nick) }
  214.   elseif ($prop == qacc) { return $readini(users.ini,$1,qacc) }
  215.   elseif ($prop == user) { return $readini(users.ini,$1,user) }
  216. }
  217.  
  218. menu * {
  219.   intersys Servers-bot
  220.   .Servers system
  221.   ..Set channel { var %x = $input(Type channel,e,Type channel) | if (%x) && ($chr(35) $+ * iswm %x) { Set %Schan %x } }
  222.   ..Add server { var %x = $input(Type server iport,e,Type server iport) | if (%x) { var %i = $input(Type rcon password,e,Type rcon password) | if (%i) { srvadd %x %i echo -ag } } }
  223.   ..Remove server { var %x = $input(Type server iport,e,Type server iport) | if (%x) { srvdel %x echo -ag } }
  224.   ..Show servers { showservers }
  225.   .Users system  
  226.   ..Add user: {
  227.     var %inp = $$?="Enter a Nickname:" | if (%inp) { var %lvl = $$?="Enter a Level(Admin/Owner):" | if (%lvl) { var %usr = $$?="Enter a Username:" | if (%usr) { var %pass = $$?="Enter a Password:" | if (%pass) {
  228.             writeini -n Users.ini $qauth(%inp) Nick %inp
  229.             writeini -n Users.ini $qauth(%inp) Level %lvl
  230.             writeini -n Users.ini $qauth(%inp) User %usr
  231.             writeini -n Users.ini $qauth(%inp) Pass %pass
  232.             writeini -n Users.ini $qauth(%inp) QAcc $qauth(%inp)
  233.             writeini -n Users.ini $qauth(%inp) Logged OFF
  234.             echo -ag User added successfully! with the details: User: %usr $+ , Password: %pass $+ , Level: %lvl $+ , QAccount: $qauth(%inp) $+ .
  235.           }
  236.         }
  237.       }
  238.     }
  239.   }
  240.   ..Remove user { var %x = $$?="Enter a Qacc of the user:" if ($ini(users.ini,%x)) .remini -n users.ini %x | echo -ag $stl(%x has Removed Succsesfuly!) }
  241.   ..Show users { showusers }
  242. }
  243.  
  244. ;                       ;
  245. ;;; Server Connection ;;;
  246. ;                       ;
  247.  
  248. alias RCONstart { echo -s (12RCON1)3 Starting RCONS ... | var %x 1, %y 1 | while ($ini(rents.ini,%x)) { .timer 1 %y RCON %x | inc %x | inc %y 10 } }
  249. alias RCONclose { .timerRCON $+ $1 Off | .timerECHO $+ $1 Off |  rcmd $1 logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port) | .remini -n rents.ini $ini(rents.ini,$1) challenge | .writeini -n rents.ini $ini(rents.ini,$1) Connection OFF | sockclose rcon $+ $1 * | echo -s (12RCON $1 $+ 1) 1---4Sockets closed1--- }
  250. alias RconLOG {
  251.   rcmd $1 nochn logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  252.   rcmd $1 nochn logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  253.   .timer -m 1 230 rcmd $1 nochn mp_logfile 1
  254.   .timer -m 1 260 rcmd $1 nochn mp_logdetail 2
  255.   .timer -m 1 290 rcmd $1 nochn sv_rcon_banpenalty 1
  256.   .timer -m 1 320 rcmd $1 nochn sv_rcon_maxfailures 20
  257.   .timer -m 1 350 rcmd $1 nochn sv_rcon_minfailures 20
  258.   .timer -m 1 380 rcmd $1 nochn sv_rcon_minfailuretime 1
  259.   .timer -m 1 420 rcmd $1 nochn log on
  260.   .timer -m 1 450 rcmd $1 nochn admin_ignore_immunity 1
  261.   .timer -m 1 480 rcmd $1 nochn logaddress_add $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  262.   .timer -m 1 500 echo -s (12RCON $1 $+ 1) 3* Open Socket Rcon LOG... *
  263. }
  264. ;/RCON <SERVER NUM> (/RCON 1,/RCON 2...)
  265. alias RCON {
  266.   if ($ip) echo -s (12RCON $1 $+ 1) 4* Starting RCON $1 *
  267.   echo -s (12RCON $1 $+ 1) Server IPort:12 $ini(rents.ini,$1)
  268.   echo -s (12RCON $1 $+ 1) Rcon password is:12 $readini(rents.ini,$ini(rents.ini,$1),Rcon)
  269.   echo -s (12RCON $1 $+ 1) Port is:12 $readini(rents.ini,$ini(rents.ini,$1),Port)
  270.   echo -s (12RCON $1 $+ 1) Your IP is:12 $ip
  271.   echo -s  | GETchallenge $1
  272.   sockudp -k rcon $+ $1 $+ LOG $readini(rents.ini,$ini(rents.ini,$1),Port) $replace($ini(rents.ini,$1),$chr(58),$chr(32)) $str($chr(255),4)
  273.   .timerLOG -m 1 750 RconLOG $1
  274. }
  275. alias GETchallenge { sockclose rcon $+ $1 $+ Challenge | sockudp -k rcon $+ $1 $+ Challenge $replace($ini(rents.ini,$1),$chr(58),$chr(32)) $str($chr(255),4) $+ challenge rcon }
  276. on *:udpread:rcon*Challenge: {
  277.   var %RCON-challenge
  278.   sockread %RCON-challenge
  279.   if ($gettok(%RCON-challenge,3,32) isnum) {
  280.     var %n = $remove($sockname,rcon,Challenge)
  281.     .writeini -n rents.ini $ini(rents.ini,%n) challenge $gettok(%RCON-challenge,3,32)
  282.   }
  283.   elseif ($gettok(%RCON-challenge,3,32) !isnum) && ($readini(rents.ini,$ini(rents.ini,%n),Connection) !== Banned) {
  284.     .writeini -n rents.ini $ini(rents.ini,%n) Connection Banned
  285.     RCONclose %n | echo -s 1(12RCON %n $+ 1)4 You are BANNED from the Server RCON Closed ! 2Check your Server details.
  286.   }
  287. }
  288. alias rcmd { if ($2 != nochn) GETchallenge $1 | sockudp -k rcon $+ $1 $+ CMD $replace($ini(rents.ini,$1),$chr(58),$chr(32)) $str($chr(255),4) $+ rcon $readini(rents.ini,$ini(rents.ini,$1),challenge) " $+ $readini(rents.ini,$ini(rents.ini,$1),Rcon) $+ " $iif($2 == nochn,$3-,$2-) }
  289. on *:udpread:rcon*LOG:{
  290.   var %LOG
  291.   sockread -f %LOG
  292.   while ($sockbr) {
  293.     if (%LOG) && (echo check !isin %LOG) RCON.DATA $remove($sockname,rcon,LOG) $gettok(%LOG,6-,32)
  294.     sockread -f %LOG
  295.   }
  296. }
  297. on *:udpread:rcon*CMD: {
  298.   var %CMD
  299.   var %n = $remove($sockname,rcon,CMD)
  300.   sockread -f %CMD
  301.   while ($sockbr) {
  302.     if ($mid(%CMD,1,5) == $+($str($chr(255),4),l)) tokenize 32 $mid(%CMD,6-)
  303.     else tokenize 32 %CMD
  304.     if (!$window(@Console $+ %n)) && ($1- != $null) /window -e @Console $+ %n
  305.     if ($1- != $null) && ($1- != check) && ($gettok($1-,6,32) !== check") && ($gettok($1-,5,32) !== echo) { echo @Console $+ %n (12RCON %n $+ 1) $1- }
  306.     if (echo check !isin $1-) RCON.DATA %n $1-
  307.     sockread -f %CMD
  308.   }
  309. }
  310. alias clr {
  311.   var %CLR.TEMP = $strip($gettok($1,1,34))
  312.   if ($prop == Steam) return $gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)
  313.   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)
  314.   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)))
  315.   elseif ($prop == Said) return $strip($gettok($1,3,34))
  316.   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)))
  317.   elseif ($prop == Team) return $remove($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),2,62),<)
  318.   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),<)
  319.   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)
  320.   elseif ($prop == Weapon) || ($prop == Gun) return $gettok($1,5,34)
  321.   Return $gettok($1,2,34)
  322. }
  323. alias RCON.DATA {
  324.   if (!$window(@Console $+ $1)) .window -e @Console $+ $1
  325.   var %rcon.dat = $2- , %rcon.said = $clr($2-).said , %rcon.id = $1 , %rcon.nick = $replace($clr($2-).nick,$chr(124),$chr(124)) , %rcon.nick2 = $replace($clr($2-).nick2,$chr(124),$chr(124)) , %rcon.steam = $clr($2-).steam , %rcon.steam2 = $clr($2-).steam2 , %rcon.num = $clr($2-).num , %r = rcmd , %rcon.weapon = $clr($2-).weapon , %rcon.team = $clr($2-).team , %rcon.team2 = $clr($2-).team2
  326.   if (*Bad rcon_password.* iswm $2-) && ($readini(rents.ini,$ini(rents.ini,$1),Connection) !== BadRcon) { .writeini -n rents.ini $ini(rents.ini,$1) Connection BadRcon | echo -s (12RCON $1 $+ 1) 4* BAD RCON PASSWORD - Closing RCON Socket... * }
  327.   if (Server shutdown isin $2-) { .writeini -n rents.ini $ini(rents.ini,$1) Connection OFF | echo -s (12RCON $1 $+ 1) 4* SERVER SHUTDOWN - Closing RCON Socket... * }
  328.   if ( (Rcon: isin $2-) || (Logging disabled isin $2-) || (logaddress_del isin $2-) ) && (Bad Rcon !isin $2-) && ($readini(rents.ini,$ini(rents.ini,$1),Connection) !== ON) {
  329.     .writeini -n rents.ini $ini(rents.ini,$1) Connection ON
  330.     .timerRCON $+ $1 0 600 rcon $1
  331.     .timerECHO $+ $1 0 60 rcmd $1 echo Ventox connection
  332.     echo -s (12RCON $1 $+ 1) 12Botbot Connection to the SERVER !!!
  333.     echo -s (12RCON $1 $+ 1) 12Botbot Connection to the SERVER !!!
  334.     echo -s (12RCON $1 $+ 1) 12Botbot Connection to the SERVER !!!
  335.   }
  336.   if (echo check !isin $2-) { echo @Console $+ $1 (12RCON $1 $+ 1) $$2- }
  337.   if (Bad Rcon: "rcon* iswm %rcon.dat) { .writeini -n rents.ini $ini(rents.ini,$1) Connection BadRcon }
  338.   if (You have been banned from this server. == %Rcon.dat) && ($readini(rents.ini,$ini(rents.ini,$1),Connection) !== Banned) { .writeini -n rents.ini $ini(rents.ini,$1) Connection Banned }
  339.   if ( ($clr($2-) == say) || ($clr($2-) == say_team) ) && (!%Bot.S. [ $+ [ %rcon.id ] ]) && ($readini(rents.ini,$ini(rents.ini,%rcon.id),SteamID) == %RCON.Steam) {
  340.     Tokenize 32 $clr($2-).said
  341.     if ($1 == !rr) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id sv_restart $iif($2 isnum,$2,1) }
  342.     if ($1 == !Kick) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_kick $2- }    
  343.     if ($1 == !Ban) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_ban $2- }
  344.     if ($1 == !Unban) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_unban $2- }
  345.     if ($1 == !Pass) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id sv_password $2 }    
  346.     if ($1- == !NoPass) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_nopass }
  347.     if ($1 == !Map) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_map $2 }    
  348.     if ($1- == !prac) { Set -u5 %Bot.S $+ %rcon.id On | PRAC %rcon.id | rcmd admin_command admin_ssay (Bot) Prac Have Been Loaded }    
  349.     if ($1- == !MR15) { Set -u5 %Bot.S $+ %rcon.id On | MR15 %rcon.id | admin_command admin_ssay (Bot) MR15 Have Been Loaded }  
  350.     if ($1 == !T) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | MOVE-T %rcon.id $2- }
  351.     if ($1 == !CT) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | MOVE-CT %rcon.id $2- }      
  352.     if ($1 == !Slay) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_slay $2- }
  353.     if ($1 == !Name) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_execclient $2 name " $+ $3- }
  354.     if ($1 == @) || ($1 == !) || ($1 == !tsay) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_tsay $2- }
  355.     if ($1 == !ssay) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_ssay $2- }
  356.     if ($1 == !disconnect) || ($1 == !Quit) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_execall disconnect }
  357.     if ($1 == !FF) {
  358.       if ($2 == ON) || ($2 == 1) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_ssay Friendlyfire is ON now. | rcmd %rcon.id mp_friendlyfire 1 }
  359.       if ($2 == OFF) || ($2 == $chr(48)) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_ssay Friendlyfire is OFF now. | rcmd %rcon.id mp_friendlyfire 0 }
  360.     }
  361.     if ($1 == !Freezetime) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_ssay Freezetime is $2 now. | rcmd %rcon.id mp_freezetime $2 }
  362.     if ($1 == !ss) { Set -u2 %Bot.S $+ %rcon.id On | tsay %rcon.id Snapshot has just taken by the admin ( $+ %rcon.nick $+ ) | rcmd %rcon.id rcmd admin_quiet 1 | rcmd allow_client_exec 1 | rcmd admin_command admin_execall snapshot | rcmd admin_quiet 2 }
  363.   }
  364. }
  365. alias tsay { rcmd $1 admin_command admin_tsay $2- }
  366. alias ssay { rcmd $1 admin_command admin_ssay $2- }
  367. alias MOVE-T { rcmd $1 admin_quiet 2 | rcmd $1 admin_command admin_execclient $1- setinfo "_vgui_menus" "0" | rcmd $1 admin_command admin_execclient $2- chooseteam | rcmd $1 admin_command admin_execclient $2- menuselect 1 }
  368. alias MOVE-CT { rcmd $1 admin_quiet 2 | rcmd $1 admin_command admin_execclient $1- setinfo "_vgui_menus" "0" | rcmd $1 admin_command admin_execclient $2- chooseteam | rcmd $1 admin_command admin_execclient $2- menuselect 2 }
  369. alias MR15 {
  370.   rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
  371.   rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4timer 35;mr122"
  372.   rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 800;mr123"
  373.   rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
  374.   rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
  375.   rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  376.   rcmd $1 mr122k
  377. }
  378. alias PRAC {
  379.   rcmd $1 alias prac122k "admin_ignore_immunity 1;default_access 0;Prac1"
  380.   rcmd $1 alias Prac1 "mp_forcecamera 0;mp_forcechasecam 0;mp_c4timer 35;Prac2"
  381.   rcmd $1 alias Prac2 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 16000;Prac3"
  382.   rcmd $1 alias Prac3 "mp_autokick 0;mp_friendlyfire 0;mp_freezetime 0;Prac4"
  383.   rcmd $1 alias Prac4 "mp_roundtime 7;mp_buytime 9;mp_fadetoblack 0;Prac5"
  384.   rcmd $1 alias Prac5 "sv_alltalk 1;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  385.   rcmd $1 prac122k
  386. }
  387. alias RetryRCONS {
  388.   echo -s 1(12RCONS1) 3Retrying rcons ...
  389.   Sockclose *
  390.   .timerRCON* Off
  391.   .timerECHO* Off
  392.   .timer 1 3 RCONstart
  393. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement