Advertisement
intersys

Serversbot by intersys

Apr 5th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 25.08 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.   .writeini -n rents.ini %srv Status Free
  74.   msg %Schan $stl($nick you are release server number %num)
  75.   rcmd $gettok(%num,2,32) sv_password none
  76.   .timer 1 1 RCON %num
  77. }
  78. alias TakeServer {
  79.   var %num = $checksrv , %srv = $gettok(%num,1,32)
  80.   set %pass $+ $gettok(%num,2,32) $rand(100,999)
  81.   if (%srv) {
  82.     .timerID [ $+ [ $gettok(%num,2,32) ] ] 1 4500 ReleaseServer $3
  83.     .writeini -n rents.ini %srv Status Taken
  84.     .writeini -n rents.ini %srv Nick $2
  85.     .writeini -n rents.ini %srv QAcc $3
  86.     .writeini -n rents.ini %srv SteamID $1
  87.     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!.)
  88.     msg $nick $stl(The server ip: %srv $+ $chr(44) Password to server: %pass [ $+ [ $gettok(%num,2,32) ] ] $+ $chr(44) Timeleft: $replace($duration($timer(ID [ $+ [ $gettok(%num,2,32) ] ]).secs,2),$chr(32),$chr(32) and $chr(32)) )
  89.     rcmd $gettok(%num,2,32) sv_password %pass [ $+ [ $gettok(%num,2,32) ] ]
  90.     .timer 1 1 RCON $gettok(%num,2,32)
  91.   }
  92. }
  93. alias ReleaseALL {
  94.   .timerID* OFF
  95.   var %x = 1
  96.   while ($ini(CServers.ini,%x)) {
  97.     var %ip = $ini(rents.ini,%x) | .remini -n rents.ini $ini(rents.ini,%x) nick | .remini -n rents.ini $ini(rents.ini,%x) QAcc | .remini -n rents.ini $ini(rents.ini,%x) SteamID
  98.   .writeini -n rents.ini $ini(rents.ini,%x) Status Free | inc %x } | msg %Schan $stl(All the servers are 03free01 now)
  99. }
  100.  
  101. alias srvadd {
  102.   .writeini -n Rents.ini $1 ip $1
  103.   .writeini -n Rents.ini $1 Rcon $2
  104.   .writeini -n Rents.ini $1 Port $rand(10000,99999)
  105.   .writeini -n Rents.ini $1 Connection OFF
  106.   .writeini -n Rents.ini $1 Status free
  107.   $3- $stl(Server $1 has Added Succsesfuly!)
  108. }
  109. alias showservers {
  110.   var %x = 1, %y = 0
  111.   while (%x <= $ini(rents.ini,0)) { var %srvs = %srvs Server %x $+ : $readini(rents.ini,$ini(rents.ini,%x),ip) | inc %x }
  112.   echo -ag $stl(Servers are: %srvs $+ , Total: $ini(rents.ini,0))
  113. }
  114. alias showusers {
  115.   var %x = 1, %y = 0
  116.   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 }
  117.   echo -ag $stl(users are: %usrs $+ , Total: $ini(users.ini,0))
  118. }
  119. alias srvdel { if ($ini(rents.ini,$1)) .remini -n rents.ini $1 | $2- $stl(Server $1 has Removed Succsesfuly!) }
  120. alias servers {
  121.   var %x = 1, %y = 0
  122.   while (%x <= $ini(rents.ini,0)) {
  123.     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))
  124.     if ($readini(rents.ini,$ini(rents.ini,%x),status == free)) inc %y
  125.     inc %x
  126.   }
  127.   msg $chan $stl(Servers are: ( $+ $iif(%y == 0,04,03) $+ %y $+ 01/ $+ $ini(rents.ini,0) $+ ) %srvs)
  128. }
  129. alias total {  
  130.   var %x = 0, %y = 1
  131.   while (%y <= $ini(rents.ini,0)) {
  132.     if ($readini(rents.ini,$ini(rents.ini,%x),status == free)) inc %x | inc %y
  133.   }
  134.   return %x
  135. }
  136. ;;; Accses System ;;;
  137.  
  138.  
  139. on *:text:*:?:{
  140.   if (!%floods) {
  141.     if ($1 == !login) {
  142.       if ($usrinf($qauth($nick)).logged == on) msg $nick $stl(You are already logged in!)
  143.       if ($readini(users.ini,$qauth($nick),pass) == $3) {
  144.         writeini -n Users.ini $qauth($nick) Logged ON
  145.         writeini -n Users.ini $qauth($nick) Nick $nick
  146.         msg $nick $stl(You are logged in successfuly! to user $2 $+ .)
  147.       }
  148.       else { msg $nick $stl(The user or the password are worng.) }
  149.       set -u3 %floods on
  150.     }
  151.     if ($1 == !adduser) {
  152.       if ($usrinf($qauth($nick)).lvl == owner) && ($usrinf($qauth($nick)).logged == on) {
  153.         if ($2 ison %Schan) && ($regex($3,/Admin|Owner/i)) && (!$readini(Users.ini,$qauth($2),user)) && ($qauth($2)) {
  154.           writeini -n Users.ini $qauth($2) Nick $2
  155.           writeini -n Users.ini $qauth($2) Level $3
  156.           writeini -n Users.ini $qauth($2) User $4
  157.           writeini -n Users.ini $qauth($2) Pass $5
  158.           writeini -n Users.ini $qauth($2) QAcc $qauth($2)
  159.           writeini -n Users.ini $qauth($2) Logged OFF
  160.           msg $nick User added successfully! with the details: User: $4 $+ , Password: $5 $+ , Level: $3 $+ , QAccount: $qauth($2) $+ .
  161.         }  
  162.         if ($2 !ison %Schan) { msg $nick $stl($2 Must to be on the Channel: %Schan) }
  163.         if (!$regex($3,/Admin|Owner/i)) { msg $nick $stl(You must write the level of the user be (Admin/Owner).) }
  164.         if ($readini(Users.ini,$4,user)) { msg $nick $stl(The user $4 is already on the user list.) }
  165.         if (!$qauth($2)) { msg $nick $stl(The user $4 must to set //mode $me +x.) }
  166.         if (6 > $len($5)) { msg $nick $stl(The user password must to be more then 6 letters.) }
  167.         if ($usrinf($qauth($nick)).lvl == admin) { msg $nick $stl(only owner can use in this command) }
  168.       }
  169.       set -u3 %floods on  
  170.     }
  171.     if ($1 == !removeuser) || ($1 == !deluser) {
  172.       if ($readini(Users.ini,$2,user)) {
  173.         remini Users.ini $2
  174.         msg $nick $stl(The user $2 is successfuly delete from the user list)
  175.       }
  176.       else { msg $nick $stl(No Such User $2_ }
  177.       set -u3 %floods on
  178.     }
  179.     if ($usrinf($qauth($nick)).logged == on) {
  180.       if ($1 == !addserver) {
  181.         if ($ini(rents.ini,$2)) { msg $nick The server: $2 $+ $chr(44) is already in the list }
  182.         elseif (!$3) { msg $nick $stl(04Syntex Error!01 Usage: !addserver [ip-server] [rcon-password]) }
  183.         elseif ($3) && (!$ini(rents.ini,$2)) { srvadd $2 $3 msg $nick }
  184.         set -u3 %floods on
  185.       }
  186.       if ($1 == !delserver) || ($1 == !removeserver) {
  187.         if (!$ini(rents.ini,$2)) { msg $nick $stl(Error! The server $2 is not in the list) }
  188.         elseif (!$2) { msg $nick $stl(04Syntex Error!01 Usage: !delserver [ip-server]) }
  189.         elseif ($2) && ($ini(rents.ini,$2)) { srvdel $2 msg $nick }
  190.         set -u3 %floods on
  191.       }
  192.       if ($1 == !admins) { msg $nick $users | set -u3 %floods on }
  193.       if ($1 == !releaseall) { releaseall | set -u3 %floods on }
  194.     }
  195.     if ($1 == !info) {
  196.       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) $&
  197.           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))) $&
  198.         Server connection: $readini(rents.ini,$v1,Connection) $+ .) }
  199.       else { msg $chan $stl(Syntax 04Error!01 Usage: !info [Number-Server]) }
  200.       set -u3 %floods on
  201.     }
  202.     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. $&
  203.       Owners commands: !Adduser [nick] [level(owner/admin)] [user] [password]15 $chr(149) 01!Deluser [user],15 $chr(149) 01!Releaseall.) | set -u3 %floods on }
  204.   }
  205. }
  206. alias users {
  207.   var %x = 1, %y = 0
  208.   while (%x <= $ini(users.ini,0)) {
  209.     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) $+ )
  210.     if ($readini(users.ini,$ini(users.ini,%x),Logged == on)) inc %y
  211.     inc %x
  212.   }
  213.   return $stl(Users are: ( $+ $iif(%y == 0,14,03) $+ %y $+ 01/ $+ $ini(users.ini,0) $+ ) %users)
  214. }
  215.  
  216.  
  217. alias usrinf {
  218.   if ($prop == logged) { return $readini(users.ini,$1,logged) }
  219.   elseif ($prop == lvl) { return $readini(users.ini,$1,level) }
  220.   elseif ($prop == nick) { return $readini(users.ini,$1,nick) }
  221.   elseif ($prop == qacc) { return $readini(users.ini,$1,qacc) }
  222.   elseif ($prop == user) { return $readini(users.ini,$1,user) }
  223. }
  224.  
  225. menu * {
  226.   intersys Servers-bot
  227.   .Servers system
  228.   ..Set channel { var %x = $input(Type channel,e,Type channel) | if (%x) && ($chr(35) $+ * iswm %x) { Set %Schan %x } }
  229.   ..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 } } }
  230.   ..Remove server { var %x = $input(Type server iport,e,Type server iport) | if (%x) { srvdel %x echo -ag } }
  231.   ..Show servers { showservers }
  232.   ..Release all { ReleaseALL }
  233.   .Users system  
  234.   ..Add user: {
  235.     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) {
  236.             writeini -n Users.ini $qauth(%inp) Nick %inp
  237.             writeini -n Users.ini $qauth(%inp) Level %lvl
  238.             writeini -n Users.ini $qauth(%inp) User %usr
  239.             writeini -n Users.ini $qauth(%inp) Pass %pass
  240.             writeini -n Users.ini $qauth(%inp) QAcc $qauth(%inp)
  241.             writeini -n Users.ini $qauth(%inp) Logged OFF
  242.             echo -ag User added successfully! with the details: User: %usr $+ , Password: %pass $+ , Level: %lvl $+ , QAccount: $qauth(%inp) $+ .
  243.           }
  244.         }
  245.       }
  246.     }
  247.   }
  248.   ..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!) }
  249.   ..Show users { showusers }
  250. }
  251.  
  252. ;                       ;
  253. ;;; Server Connection ;;;
  254. ;                       ;
  255.  
  256. 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 } }
  257. 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--- }
  258. alias RconLOG {
  259.   rcmd $1 nochn logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  260.   rcmd $1 nochn logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  261.   .timer -m 1 230 rcmd $1 nochn mp_logfile 1
  262.   .timer -m 1 260 rcmd $1 nochn mp_logdetail 2
  263.   .timer -m 1 290 rcmd $1 nochn sv_rcon_banpenalty 1
  264.   .timer -m 1 320 rcmd $1 nochn sv_rcon_maxfailures 20
  265.   .timer -m 1 350 rcmd $1 nochn sv_rcon_minfailures 20
  266.   .timer -m 1 380 rcmd $1 nochn sv_rcon_minfailuretime 1
  267.   .timer -m 1 420 rcmd $1 nochn log on
  268.   .timer -m 1 450 rcmd $1 nochn admin_ignore_immunity 1
  269.   .timer -m 1 480 rcmd $1 nochn logaddress_add $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  270.   .timer -m 1 500 echo -s (12RCON $1 $+ 1) 3* Open Socket Rcon LOG... *
  271. }
  272. ;/RCON <SERVER NUM> (/RCON 1,/RCON 2...)
  273. alias RCON {
  274.   if ($ip) echo -s (12RCON $1 $+ 1) 4* Starting RCON $1 *
  275.   echo -s (12RCON $1 $+ 1) Server IPort:12 $ini(rents.ini,$1)
  276.   echo -s (12RCON $1 $+ 1) Rcon password is:12 $readini(rents.ini,$ini(rents.ini,$1),Rcon)
  277.   echo -s (12RCON $1 $+ 1) Port is:12 $readini(rents.ini,$ini(rents.ini,$1),Port)
  278.   echo -s (12RCON $1 $+ 1) Your IP is:12 $ip
  279.   echo -s  | GETchallenge $1
  280.   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)
  281.   .timerLOG -m 1 750 RconLOG $1
  282. }
  283. 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 }
  284. on *:udpread:rcon*Challenge: {
  285.   var %RCON-challenge
  286.   sockread %RCON-challenge
  287.   if ($gettok(%RCON-challenge,3,32) isnum) {
  288.     var %n = $remove($sockname,rcon,Challenge)
  289.     .writeini -n rents.ini $ini(rents.ini,%n) challenge $gettok(%RCON-challenge,3,32)
  290.   }
  291.   elseif ($gettok(%RCON-challenge,3,32) !isnum) && ($readini(rents.ini,$ini(rents.ini,%n),Connection) !== Banned) {
  292.     .writeini -n rents.ini $ini(rents.ini,%n) Connection Banned
  293.     RCONclose %n | echo -s 1(12RCON %n $+ 1)4 You are BANNED from the Server RCON Closed ! 2Check your Server details.
  294.   }
  295. }
  296. 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-) }
  297. on *:udpread:rcon*LOG:{
  298.   var %LOG
  299.   sockread -f %LOG
  300.   while ($sockbr) {
  301.     if (%LOG) && (echo check !isin %LOG) RCON.DATA $remove($sockname,rcon,LOG) $gettok(%LOG,6-,32)
  302.     sockread -f %LOG
  303.   }
  304. }
  305. on *:udpread:rcon*CMD: {
  306.   var %CMD
  307.   var %n = $remove($sockname,rcon,CMD)
  308.   sockread -f %CMD
  309.   while ($sockbr) {
  310.     if ($mid(%CMD,1,5) == $+($str($chr(255),4),l)) tokenize 32 $mid(%CMD,6-)
  311.     else tokenize 32 %CMD
  312.     if (!$window(@Console $+ %n)) && ($1- != $null) /window -e @Console $+ %n
  313.     if ($1- != $null) && ($1- != check) && ($gettok($1-,6,32) !== check") && ($gettok($1-,5,32) !== echo) { echo @Console $+ %n (12RCON %n $+ 1) $1- }
  314.     if (echo check !isin $1-) RCON.DATA %n $1-
  315.     sockread -f %CMD
  316.   }
  317. }
  318. alias clr {
  319.   var %CLR.TEMP = $strip($gettok($1,1,34))
  320.   if ($prop == Steam) return $gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)
  321.   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)
  322.   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)))
  323.   elseif ($prop == Said) return $strip($gettok($1,3,34))
  324.   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)))
  325.   elseif ($prop == Team) return $remove($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),2,62),<)
  326.   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),<)
  327.   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)
  328.   elseif ($prop == Weapon) || ($prop == Gun) return $gettok($1,5,34)
  329.   Return $gettok($1,2,34)
  330. }
  331. alias RCON.DATA {
  332.   if (!$window(@Console $+ $1)) .window -e @Console $+ $1
  333.   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
  334.   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... * }
  335.   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... * }
  336.   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) {
  337.     .writeini -n rents.ini $ini(rents.ini,$1) Connection ON
  338.     .timerRCON $+ $1 0 600 rcon $1
  339.     .timerECHO $+ $1 0 60 rcmd $1 echo Ventox connection
  340.     echo -s (12RCON $1 $+ 1) 12Botbot Connection to the SERVER !!!
  341.     echo -s (12RCON $1 $+ 1) 12Botbot Connection to the SERVER !!!
  342.     echo -s (12RCON $1 $+ 1) 12Botbot Connection to the SERVER !!!
  343.   }
  344.   if (echo check !isin $2-) { echo @Console $+ $1 (12RCON $1 $+ 1) $$2- }
  345.   if (Bad Rcon: "rcon* iswm %rcon.dat) { .writeini -n rents.ini $ini(rents.ini,$1) Connection BadRcon }
  346.   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 }
  347.   if ( ($clr($2-) == say) || ($clr($2-) == say_team) ) && (!%Bot.S. [ $+ [ %rcon.id ] ]) && ($readini(rents.ini,$ini(rents.ini,%rcon.id),SteamID) == %RCON.Steam) {
  348.     Tokenize 32 $clr($2-).said
  349.     if ($1 == !rr) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id sv_restart $iif($2 isnum,$2,1) }
  350.     if ($1 == !Kick) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_kick $2- }    
  351.     if ($1 == !Ban) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_ban $2- }
  352.     if ($1 == !Unban) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_unban $2- }
  353.     if ($1 == !Pass) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id sv_password $2 }    
  354.     if ($1- == !NoPass) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_nopass }
  355.     if ($1 == !Map) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_map $2 }    
  356.     if ($1- == !prac) { Set -u5 %Bot.S $+ %rcon.id On | PRAC %rcon.id | rcmd admin_command admin_ssay (Bot) Prac Have Been Loaded }    
  357.     if ($1- == !MR15) { Set -u5 %Bot.S $+ %rcon.id On | MR15 %rcon.id | admin_command admin_ssay (Bot) MR15 Have Been Loaded }  
  358.     if ($1 == !T) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | MOVE-T %rcon.id $2- }
  359.     if ($1 == !CT) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | MOVE-CT %rcon.id $2- }      
  360.     if ($1 == !Slay) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_slay $2- }
  361.     if ($1 == !Name) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_execclient $2 name " $+ $3- }
  362.     if ($1 == @) || ($1 == !) || ($1 == !tsay) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_tsay $2- }
  363.     if ($1 == !ssay) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_ssay $2- }
  364.     if ($1 == !disconnect) || ($1 == !Quit) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_execall disconnect }
  365.     if ($1 == !FF) {
  366.       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 }
  367.       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 }
  368.     }
  369.     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 }
  370.     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 }
  371.   }
  372. }
  373. alias tsay { rcmd $1 admin_command admin_tsay $2- }
  374. alias ssay { rcmd $1 admin_command admin_ssay $2- }
  375. 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 }
  376. 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 }
  377. alias MR15 {
  378.   rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
  379.   rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4timer 35;mr122"
  380.   rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 800;mr123"
  381.   rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
  382.   rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
  383.   rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  384.   rcmd $1 mr122k
  385. }
  386. alias PRAC {
  387.   rcmd $1 alias prac122k "admin_ignore_immunity 1;default_access 0;Prac1"
  388.   rcmd $1 alias Prac1 "mp_forcecamera 0;mp_forcechasecam 0;mp_c4timer 35;Prac2"
  389.   rcmd $1 alias Prac2 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 16000;Prac3"
  390.   rcmd $1 alias Prac3 "mp_autokick 0;mp_friendlyfire 0;mp_freezetime 0;Prac4"
  391.   rcmd $1 alias Prac4 "mp_roundtime 7;mp_buytime 9;mp_fadetoblack 0;Prac5"
  392.   rcmd $1 alias Prac5 "sv_alltalk 1;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  393.   rcmd $1 prac122k
  394. }
  395. alias RetryRCONS {
  396.   echo -s 1(12RCONS1) 3Retrying rcons ...
  397.   Sockclose *
  398.   .timerRCON* Off
  399.   .timerECHO* Off
  400.   .timer 1 3 RCONstart
  401. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement