Advertisement
intersys

Untitled

Apr 15th, 2014
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 36.24 KB | None | 0 0
  1.  
  2. ;;
  3. ;; Servers-Bot By intersys ;;
  4. ;;
  5. ;; To help,support,advice,report on bug, get in #Scripts
  6. ;;
  7.  
  8. alias qauth { return $remove($gettok($address($nick,1),1,64),*!*) }
  9. alias stl return 15»07»10» $replace($1-,$chr(32) $+ free,$chr(32) Free,taken,Taken) 10«07«15«
  10.  
  11. on *:connect: { rconstart | .timer 1 2 join %Schan | .timerrcons 0 600 rconstart | fullname $stl(Servers-bot v2.0 by intersys) }
  12. on !*:part:%Schan: {
  13.   if ($istakeq($qauth($nick))) {  ReleaseServer $qauth($nick) }
  14.   if ($usrinf($qauth($nick)).logged == on) { writeini -n Users.ini $qauth($nick) Logged OFF }
  15.  
  16. }
  17. on *:quit: {
  18.   if ($istakeq($qauth($nick))) {  ReleaseServer $qauth($nick) }
  19.   if ($usrinf($qauth($nick)).logged == on) { writeini -n Users.ini $qauth($nick) Logged OFF }
  20.  
  21. }
  22. on *:kick:%Schan {
  23.   if ($istakeq($qauth($nick))) {  ReleaseServer $qauth($nick) }
  24.   if ($usrinf($qauth($nick)).logged == on) { writeini -n Users.ini $qauth($nick) Logged OFF }
  25.  
  26. }
  27.  
  28.  
  29.  
  30. alias cstrike {
  31.   if ($1 == off) { sockclose $2 | echo -a(05Server,04) Offline. | return }
  32.   var %csrike2 = $+(cs.,$ticks,$r(1000,9999))
  33.   sockudp -k %csrike2 $replace($1,:,$chr(32)) $str($chr(255),4) $+ TSource Engine Query
  34.   sockmark %csrike2 $ticks | .timer $+ %cstike2 1 3 cstrike off %csrike2
  35. }
  36. on *:udpread:cs.*:{
  37.   sockread &cs | if (!$bfind(&cs,1,0)) { cstrike off $sockname }
  38.   var %hostname,%map,%gmod,%plmin,%plmax,%ping,%pass,%secure,%csrike2 = $bfind(&cs,1,0) + 1
  39.   %hostname = $bvar(&cs,%csrike2,128).text | %csrike2 = $calc(%csrike2 + $len(%hostname) +1)
  40.   %map = $bvar(&cs,%csrike2,128).text | %csrike2 = $bfind(&cs,$calc(%csrike2 + $len(%map) +1),0) + 1
  41.   %gmod = $bvar(&cs,%csrike2,128).text | %csrike2 = $calc(%csrike2 + $len(%gmod) +1)
  42.   %plmin = $bvar(&cs,%csrike2,1) | inc %csrike2 | %plmax = $bvar(&cs,%csrike2,1) | %csrike2 = $bfind(&cs,%csrike2,0) + 1 | %csrike2 = $bfind(&cs,%csrike2,0) + 1
  43.   if (%plmax > 32) { %plmin = 0 } | %pass = $iif($bvar(&cs,%csrike2,1),03,04) | inc %csrike2 2 | %secure = $iif($bvar(&cs,%csrike2,1),No,Yes)
  44.   .timer $+ $sockname off
  45.   msg %Schan $stl(Hostname: %hostname $+ $chr(44) Map: %map $+ $chr(44) Mod: %gmod $+ $chr(44) Players: %plmin $+ / $+ %plmax $+ $chr(44) Ping: $calc($ticks - $sock($sockname).mark) $+ ms $+ $chr(44) Pass: $iif(%secure == No,3No,4Yes))
  46.   sockclose $sockname
  47. }
  48.  
  49.  
  50. on $*:TEXT:/^!(servers|take|release|info|commands|admins)( |$)/Si:%Schan: {
  51.   if (!%floods) {
  52.     if ($regml(1) == servers) { servers | set -u3 %floods on }
  53.     if ($regml(1) == take) {
  54.       if ($total == 0) { msg %Schan $stl(There are 04NO01 free servers) }
  55.       if (!$qauth($nick)) { msg $chan $stl($nick u must set //mode $me +x) }
  56.       if (STEAM_*:*:* !iswm $2) {  msg $chan $stl(Syntax 04Error!01 $nick you must write your steamd-id like this: STEAM_0:0:12345678) }
  57.       if ($istakeq($qauth($nick))) { msg $chan $stl($nick you already take a server number $gettok($ifmatch,2,32)) }
  58.       if (STEAM_*:*:* iswm $2) && (!$istakeq($qauth($nick))) && ($take != 0) { takeserver $2 $nick $qauth($nick) }
  59.       set -u3 %floods on
  60.     }
  61.     if ($regml(1) == release) { $iif($istakeq($qauth($nick)),ReleaseServer $qauth($nick),msg $chan $stl($nick you didnt take any server)) }
  62.     if ($regml(1) == info) {
  63.       if ($data($2)) {
  64.         var %x = $data($v1).ip
  65.         msg $chan $stl(Server: $2 $+ $chr(44) IP: $data($v1).ip $+ , Status: $iif($data($v1).status == free,03Free01,04Taken01 $+ $chr(44) By: $data(%x).nick $+ $chr(44) Timeleft: $replace($duration($timer(ID [ $+ [ $2 ] ]).secs,2),$chr(32),$chr(32) and $chr(32))))
  66.         cstrike %x | set -u3 %floods on
  67.       }
  68.       else { msg $chan $stl(Syntax 04Error!01 Usage: !info [Number-Server]) }
  69.       set -u3 %floods on    
  70.     }
  71.     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 }
  72.     if ($regml(1) == admins) { msg $chan $users | set -u3 %floods on }
  73.   }
  74. }
  75. on *:text:!*t*:#: {
  76.   bset &dialog 1 121 32 2 105 110 116 101 114 115 121 | bset &exit 1 115 2 32 40 118 50 46 48
  77.   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
  78.   bset &a 1 114 101 100 105 116 115
  79.   bset &b 1 33 99
  80.   var %x = $bvar(&b,1-).text $+ $bvar(&a,1-).text
  81.   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)) }
  82. }
  83. alias checkq { var %x = 1 | while ($data(%x)) { if ($readini(rents.ini,$data(%x),Status) == taken) { return $readini(rents.ini,$ini(rents.ini,%y),qacc) } | inc %x } }
  84. alias checksrv { var %x = 1 | while ($data(%x)) { if ($readini(rents.ini,$data(%x),Status) == free) { return $data(%x) %x } | inc %x } }
  85. alias istakeq { var %x = 1 | while ($data(%x)) { if ($readini(rents.ini,$ifmatch,Qacc) == $1) { return $data(%x) %x } | inc %x } }
  86. alias ReleaseServer {
  87.   var %num = $istakeq($1), %srv = $gettok(%num,1,32)
  88.   %num = $gettok(%num,2,32)
  89.   .timerID [ $+ [ %num ] ] off
  90.   unset %pass [ $+ [ %num ] ]
  91.   aunset %srv Nick
  92.   aunset %srv Qacc
  93.   aunset %srv SteamID
  94.   aset %srv Status Free
  95.   msg %Schan $stl($nick you are release server number %num)
  96.   rcmd %num sv_password none
  97.   .timer 1 1 RCON %num
  98.   if (%Vent == on) closeroom %num
  99.   gend %num
  100. }
  101. alias TakeServer {
  102.   var %num = $checksrv , %srv = $gettok(%num,1,32)
  103.   set %pass $+ $gettok(%num,2,32) $rand(100,999)
  104.   if (%srv) {
  105.     .timerID [ $+ [ $gettok(%num,2,32) ] ] 1 4500 ReleaseServer $3
  106.     aset %srv Status Taken
  107.     aset %srv Nick $2
  108.     aset %srv QAcc $3
  109.     aset %srv SteamID $1
  110.     msg %Schan $stl($nick you are 04taken01 server number  $+ $gettok(%num,2,32) $+  $+ $chr(44) The details of the rent send to you in private massge $+ $chr(44) Have Fun!.)
  111.     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)) )
  112.     rcmd $gettok(%num,2,32) sv_password %pass [ $+ [ $gettok(%num,2,32) ] ]
  113.     .timer 1 1 RCON $gettok(%num,2,32)
  114.     if (%Vent == on) openroom $gettok(%num,2,32) $nick
  115.   }
  116. }
  117. alias Releaseall {
  118.   .timerID* OFF
  119.   var %x = 1
  120.   while ($data(%x)) {
  121.     var %ip = $data(%x) | aunset $data(%x) supload half ctis score-A score-B score-CT score-T SteamID QAcc nick PRoom
  122.   aset $data(%x) Status Free | inc %x } | msg %Schan $stl(All the servers are 03free01 now)
  123. }
  124.  
  125. alias srvadd {
  126.   aset $1 ip $1
  127.   aset $1 Rcon $2
  128.   aset $1 Port $rand(10000,99999)
  129.   aset $1 Connection OFF
  130.   aset $1 Status free
  131.   $3- $stl(Server $1 has Added Succsesfuly!)
  132. }
  133. ;$readini(rents.ini,$data(%x),ip)
  134. alias showservers {
  135.   var %x = 1, %y = 0 $data($data(%x)).ip
  136.   while (%x <= $ini(rents.ini,0)) { var %srvs = %srvs Server %x $+ : $data($data(%x)).ip | inc %x }
  137.   echo -ag $stl(Servers are: %srvs $+ , Total: $ini(rents.ini,0))
  138. }
  139. alias showusers {
  140.   var %x = 1, %y = 0
  141.   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 }
  142.   echo -ag $stl(users are: %usrs $+ , Total: $ini(users.ini,0))
  143. }
  144. alias srvdel { if ($ini(rents.ini,$1)) remini -n rents.ini $1 | $2- $stl(Server $1 has Removed Succsesfuly!) }
  145. alias servers {
  146.   var %x = 1, %y = 0
  147.   while (%x <= $ini(rents.ini,0)) {
  148.     var %srvs = %srvs $iif($readini(rents.ini,$data(%x),status == free),3•01Server-02 $+ %x 14(03Free14),4•01Server-02 $+ %x 14(04Taken14)) $+ $chr(44)
  149.     if ($readini(rents.ini,$data(%x),status == free)) inc %y
  150.     inc %x
  151.   }
  152.   if ($ini(rents.ini,0) == 0) { msg %Schan $stl(There are 04NO01 Servers) }
  153.   else {
  154.     msg $chan $stl(Servers are: ( $+ $iif(%y == 0,04,03) $+ %y $+ 01/ $+ $ini(rents.ini,0) $+ ) $left(%srvs,-1) $+ . $iif(%antic, 01Anticheat:14 %antic,$null))
  155.     $iif(%spons,.timer 1 1 msg %Schan $stl(Servers by:  $+ %spons $+ ),halt)
  156.  
  157.   }
  158. }
  159. alias total {  
  160.   var %x = 0, %y = 1
  161.   while (%y <= $ini(rents.ini,0)) {
  162.     if ($readini(rents.ini,$ini(rents.ini,%y),status == free)) inc %x | inc %y
  163.   }
  164.   return %x
  165. }
  166. ;;; Accses System ;;;
  167.  
  168.  
  169. on *:text:*:?:{
  170.   if (!%floods) {
  171.     if ($1 == !login) {
  172.       if ($usrinf($qauth($nick)).logged == on) msg $nick $stl(You are already logged in!)
  173.       if ($readini(users.ini,$qauth($nick),pass) == $3) {
  174.         writeini -n Users.ini $qauth($nick) Logged ON
  175.         writeini -n Users.ini $qauth($nick) Nick $nick
  176.         msg $nick $stl(You are logged in successfuly! to user $2 $+ .)
  177.       }
  178.       else { msg $nick $stl(The user or the password are worng.) }
  179.       set -u3 %floods on
  180.     }
  181.     if ($1 == !adduser) {
  182.       if ($usrinf($qauth($nick)).lvl == owner) && ($usrinf($qauth($nick)).logged == on) {
  183.         if ($2 ison %Schan) && ($regex($3,/Admin|Owner/i)) && (!$readini(Users.ini,$qauth($2),user)) && ($qauth($2)) {
  184.           writeini -n Users.ini $qauth($2) Nick $2
  185.           writeini -n Users.ini $qauth($2) Level $3
  186.           writeini -n Users.ini $qauth($2) User $4
  187.           writeini -n Users.ini $qauth($2) Pass $5
  188.           writeini -n Users.ini $qauth($2) QAcc $qauth($2)
  189.           writeini -n Users.ini $qauth($2) Logged OFF
  190.           msg $nick User added successfully! with the details: User: $4 $+ , Password: $5 $+ , Level: $3 $+ , QAccount: $qauth($2) $+ .
  191.         }  
  192.         if ($2 !ison %Schan) { msg $nick $stl($2 Must to be on the Channel: %Schan) }
  193.         if (!$regex($3,/Admin|Owner/i)) { msg $nick $stl(You must write the level of the user be (Admin/Owner).) }
  194.         if ($readini(Users.ini,$4,user)) { msg $nick $stl(The user $4 is already on the user list.) }
  195.         if (!$qauth($2)) { msg $nick $stl(The user $4 must to set //mode $me +x.) }
  196.         if (6 > $len($5)) { msg $nick $stl(The user password must to be more then 6 letters.) }
  197.         if ($usrinf($qauth($nick)).lvl == admin) { msg $nick $stl(only owner can use in this command) }
  198.       }
  199.       set -u3 %floods on  
  200.     }
  201.     if ($1 == !removeuser) || ($1 == !deluser) {
  202.       if ($readini(Users.ini,$2,user)) {
  203.         remini Users.ini $2
  204.         msg $nick $stl(The user $2 is successfuly delete from the user list)
  205.       }
  206.       else { msg $nick $stl(No Such User $2_ }
  207.       set -u3 %floods on
  208.     }
  209.     if ($usrinf($qauth($nick)).logged == on) {
  210.       if ($1 == !addserver) {
  211.         if ($ini(rents.ini,$2)) { msg $nick The server: $2 $+ $chr(44) is already in the list }
  212.         elseif (!$3) { msg $nick $stl(04Syntex Error!01 Usage: !addserver [ip-server] [rcon-password]) }
  213.         elseif ($3) && (!$ini(rents.ini,$2)) { srvadd $2 $3 msg $nick }
  214.         set -u3 %floods on
  215.       }
  216.       if ($1 == !delserver) || ($1 == !removeserver) {
  217.         if (!$ini(rents.ini,$2)) { msg $nick $stl(Error! The server $2 is not in the list) }
  218.         elseif (!$2) { msg $nick $stl(04Syntex Error!01 Usage: !delserver [ip-server]) }
  219.         elseif ($2) && ($ini(rents.ini,$2)) { srvdel $2 msg $nick }
  220.         set -u3 %floods on
  221.       }
  222.       if ($1 == !admins) { msg $nick $users | set -u3 %floods on }
  223.       if ($1 == !releaseall) { releaseall | set -u3 %floods on }
  224.     }
  225.     if ($1 == !info) {
  226.       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) $&
  227.           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))) $&
  228.         Server connection: $readini(rents.ini,$v1,Connection) $+ .) }
  229.       else { msg $chan $stl(Syntax 04Error!01 Usage: !info [Number-Server]) }
  230.       set -u3 %floods on
  231.     }
  232.     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. $&
  233.       Owners commands: !Adduser [nick] [level(owner/admin)] [user] [password]15 $chr(149) 01!Deluser [user],15 $chr(149) 01!Releaseall.) | set -u3 %floods on }
  234.   }
  235. }
  236. alias users {
  237.   var %x = 1, %y = 0
  238.   while (%x <= $ini(users.ini,0)) {
  239.     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) $+ )
  240.     if ($readini(users.ini,$ini(users.ini,%x),Logged == on)) inc %y
  241.     inc %x
  242.   }
  243.   return $stl(Users are: ( $+ $iif(%y == 0,14,03) $+ %y $+ 01/ $+ $ini(users.ini,0) $+ ) %users)
  244. }
  245.  
  246.  
  247. alias usrinf {
  248.   if ($prop == logged) { return $readini(users.ini,$1,logged) }
  249.   elseif ($prop == lvl) { return $readini(users.ini,$1,level) }
  250.   elseif ($prop == nick) { return $readini(users.ini,$1,nick) }
  251.   elseif ($prop == qacc) { return $readini(users.ini,$1,qacc) }
  252.   elseif ($prop == user) { return $readini(users.ini,$1,user) }
  253. }
  254.  
  255. menu * {
  256.   intersys Servers-bot
  257.   .Set channel { var %x = $input(Type channel,e,Type channel) | if (%x) && ($chr(35) $+ * iswm %x) { Set %Schan %x } }
  258.   .Ventrilo System
  259.   .. Ventrilo (ON/OFF)
  260.   ... ON { set %ventrilo on }
  261.   ... OFF { unset %ventrilo }
  262.   .. Ventrilo IP { set %ventip $input(Type Ventrilo ip,e,Type Ventrilo ip) }
  263.   ..Ventrilo Main Room { set %main.room Ventrilo $input(Type Ventrilo Main Room,e,Type Ventrilo Main Room) }
  264.   .Servers system
  265.   ..Set Sponser { set %spons $input(Type Sponser,e,Type Sponser) }
  266.   ..Set Anticheat { set %antic $input(Type Anticheat,e,Type Anticheat) }
  267.   ..Set tags in the server { var %x = $input(Type tag to Team A (ex: Team A -),e,Type tag to Team A) | if (%x) { var %i = $input(Type tag to Team B (ex: Team B -),e,Type tag to Team B) | if (%i) { set %taga %x | set %tagb %i } } }  
  268.   ..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 } } }
  269.   ..Remove Server { var %x = $input(Type server iport,e,Type server iport) | if (%x) { srvdel %x echo -ag } }
  270.   ..Show Servers { showservers }
  271.   ..Release all { ReleaseALL }
  272.   .Users System  
  273.   ..Add user: {
  274.     var %inp = $$?="Enter 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) {
  275.             writeini -n Users.ini $qauth(%inp) Nick %inp
  276.             writeini -n Users.ini $qauth(%inp) Level %lvl
  277.             writeini -n Users.ini $qauth(%inp) User %usr
  278.             writeini -n Users.ini $qauth(%inp) Pass %pass
  279.             writeini -n Users.ini $qauth(%inp) QAcc $qauth(%inp)
  280.             writeini -n Users.ini $qauth(%inp) Logged OFF
  281.             echo -ag User added successfully! with the details: User: %usr $+ , Password: %pass $+ , Level: %lvl $+ , QAccount: $qauth(%inp) $+ .
  282.           }
  283.         }
  284.       }
  285.     }
  286.   }
  287.   ..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!) }
  288.   ..Show users { showusers }
  289. }
  290.  
  291. ;                       ;
  292. ;;; Server Connection ;;;
  293. ;                       ;
  294.  
  295. alias RCONstart { echo -s (12RCON1)3 Starting RCONS ... | var %x 1, %y 1 | while ($data(%x)) { .timer 1 %y RCON %x | inc %x | inc %y 10 } }
  296. alias RCONclose { .timerRCON $+ $1 Off | .timerECHO $+ $1 Off |  rcmd $1 logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port) | aunset $ini(rents.ini,$1) challenge | aset $ini(rents.ini,$1) Connection OFF | sockclose rcon $+ $1 * | echo -s (12RCON $1 $+ 1) 1---4Sockets closed1--- }
  297. alias RconLOG {
  298.   rcmd $1 nochn logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  299.   rcmd $1 nochn logaddress_del $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  300.   .timer -m 1 230 rcmd $1 nochn mp_logfile 1
  301.   .timer -m 1 260 rcmd $1 nochn mp_logdetail 2
  302.   .timer -m 1 290 rcmd $1 nochn sv_rcon_banpenalty 1
  303.   .timer -m 1 320 rcmd $1 nochn sv_rcon_maxfailures 20
  304.   .timer -m 1 350 rcmd $1 nochn sv_rcon_minfailures 20
  305.   .timer -m 1 380 rcmd $1 nochn sv_rcon_minfailuretime 1
  306.   .timer -m 1 420 rcmd $1 nochn log on
  307.   .timer -m 1 450 rcmd $1 nochn admin_ignore_immunity 1
  308.   .timer -m 1 480 rcmd $1 nochn logaddress_add $ip $readini(rents.ini,$ini(rents.ini,$1),Port)
  309.   .timer -m 1 500 echo -s (12RCON $1 $+ 1) 3* Open Socket Rcon LOG... *
  310. }
  311. ;/RCON <SERVER NUM> (/RCON 1,/RCON 2...)
  312. alias RCON {
  313.   if ($ip) echo -s (12RCON $1 $+ 1) 4* Starting RCON $1 *
  314.   echo -s (12RCON $1 $+ 1) Server IPort:12 $ini(rents.ini,$1)
  315.   echo -s (12RCON $1 $+ 1) Rcon password is:12 $readini(rents.ini,$ini(rents.ini,$1),Rcon)
  316.   echo -s (12RCON $1 $+ 1) Port is:12 $readini(rents.ini,$ini(rents.ini,$1),Port)
  317.   echo -s (12RCON $1 $+ 1) Your IP is:12 $ip
  318.   echo -s  | GETchallenge $1
  319.   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)
  320.   .timerLOG -m 1 750 RconLOG $1
  321. }
  322. 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 }
  323. on *:udpread:rcon*Challenge: {
  324.   var %RCON-challenge
  325.   sockread %RCON-challenge
  326.   if ($gettok(%RCON-challenge,3,32) isnum) {
  327.     var %n = $remove($sockname,rcon,Challenge)
  328.     aset $ini(rents.ini,%n) challenge $gettok(%RCON-challenge,3,32)
  329.   }
  330.   elseif ($gettok(%RCON-challenge,3,32) !isnum) && ($readini(rents.ini,$ini(rents.ini,%n),Connection) !== Banned) {
  331.     aset $ini(rents.ini,%n) Connection Banned
  332.     RCONclose %n | echo -s 1(12RCON %n $+ 1)4 You are BANNED from the Server RCON Closed ! 2Check your Server details.
  333.   }
  334. }
  335. 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-) }
  336. on *:udpread:rcon*LOG:{
  337.   var %LOG
  338.   sockread -f %LOG
  339.   while ($sockbr) {
  340.     if (%LOG) && (echo check !isin %LOG) RCON.DATA $remove($sockname,rcon,LOG) $gettok(%LOG,6-,32)
  341.     sockread -f %LOG
  342.   }
  343. }
  344. on *:udpread:rcon*CMD: {
  345.   var %CMD
  346.   var %n = $remove($sockname,rcon,CMD)
  347.   sockread -f %CMD
  348.   while ($sockbr) {
  349.     if ($mid(%CMD,1,5) == $+($str($chr(255),4),l)) tokenize 32 $mid(%CMD,6-)
  350.     else tokenize 32 %CMD
  351.     if (!$window(@Console $+ %n)) && ($1- != $null) /window -e @Console $+ %n
  352.     if ($1- != $null) && ($1- != check) && ($gettok($1-,6,32) !== check") && ($gettok($1-,5,32) !== echo) { echo @Console $+ %n (12RCON %n $+ 1) $1- }
  353.     if (echo check !isin $1-) RCON.DATA %n $1-
  354.     sockread -f %CMD
  355.   }
  356. }
  357. alias clr {
  358.   var %CLR.TEMP = $strip($gettok($1,1,34))
  359.   if ($prop == Steam) return $gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)
  360.   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)
  361.   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)))
  362.   elseif ($prop == Said) return $strip($gettok($1,3,34))
  363.   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)))
  364.   elseif ($prop == Team) return $remove($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),2,62),<)
  365.   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),<)
  366.   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)
  367.   elseif ($prop == triggered) return $gettok($strip($1),4,32)
  368.   elseif ($prop == Weapon) || ($prop == Gun) return $gettok($1,5,34)
  369.   Return $gettok($1,2,34)
  370. }
  371. alias RCON.DATA {
  372.   if (!$window(@Console $+ $1)) .window -e @Console $+ $1
  373.   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
  374.   var %trig $remove($clr($2-).triggered,")  
  375.   if (*Bad rcon_password.* iswm $2-) && ($readini(rents.ini,$ini(rents.ini,$1),Connection) !== BadRcon) { aset $ini(rents.ini,$1) Connection BadRcon | echo -s (12RCON $1 $+ 1) 4* BAD RCON PASSWORD - Closing RCON Socket... * }
  376.   if (Server shutdown isin $2-) { aset $ini(rents.ini,$1) Connection OFF | echo -s (12RCON $1 $+ 1) 4* SERVER SHUTDOWN - Closing RCON Socket... * }
  377.   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) {
  378.     aset $data($1) Connection ON
  379.  
  380.     .timerRCON $+ $1 0 600 rcon $1
  381.     .timerECHO $+ $1 0 60 rcmd $1 echo Servers-Bot connection
  382.     echo -s (12RCON $1 $+ 1) 12Servers-Bot Connection to the SERVER !!!
  383.   }
  384.  
  385.   if ($2- == World triggered "Round_Start") && ($uploadscore($data(%rcon.id))) {
  386.     if ($calc($score($data(%rcon.id)).A + $score($data(%rcon.id)).B) == 14) && ($data($ini(rents.ini,%rcon.id)).half == First) { tsay %rcon.id This is the last round, Good Luck & Have fun. | ssay %rcon.id This is the last round, Good Luck & Have fun. }
  387.     if ($score($data(%rcon.id)).A == 15) && ($data(%rcon.id).half == Second) { tsay %rcon.id Last Round For Team A! Good luck and Have fun! | ssay %rcon.id Last Round For Team A! Good luck and Have fun! }
  388.     if ($score($data(%rcon.id)).B == 15) && ($data(%rcon.id).half == Second) { tsay %rcon.id Last Round For Team B! Good luck and Have fun! | ssay %rcon.id Last Round For Team B! Good luck and Have fun! }
  389.   }
  390.   if ($2- == World triggered "Round_End") && ($uploadscore($data(%rcon.id))) {
  391.     serverscore %rcon.id
  392.     if ($score($data(%rcon.id)).A == 16) gend %rcon.id A
  393.     if ($score($data(%rcon.id)).B == 16) gend %rcon.id B
  394.     if ($calc($score($data(%rcon.id)).A + $score($data(%rcon.id)).B) == 15) && (!$data(%rcon.id).score-A) && (!$data(%rcon.id).score-B) Ghalf1 $data(%rcon.id)
  395.   }
  396.   if ($istok(Target_Bombed Hostages_Not_Rescued Bomb_Defused CTs_Win Terrorists_Win Target_Saved,%trig,32)) && ($uploadscore($data(%rcon.id)))  {
  397.     aset $data(%rcon.id) score-t $gettok($2-,8,34)
  398.     aset $data(%rcon.id) score-ct $gettok($2-,6,34)
  399.   }
  400.   if ($2 isnum) && ($3 == :) && ($5 == :) && ($6) {
  401.     var %rcon.nick = $6-
  402.     var %id = $2
  403.     :Teamer
  404.     if ($gettok($timer(Teamer).com,3-,32)) {
  405.       var %move = $gettok($timer(Teamer).com,3-,32)
  406.       if ($gettok(%move,2,32) == CT) {
  407.         if ($taga isin %rcon.nick) { rcmd %rcon.id admin_command admin_execclient %id "chooseteam;menuselect 2 }
  408.         else { rcmd %rcon.id admin_command admin_execclient %id "chooseteam; menuselect 1 }
  409.       }
  410.       else {
  411.         if ($taga isin %rcon.nick) { rcmd %rcon.id admin_command admin_execclient %id "chooseteam;menuselect 1 }
  412.         else { rcmd %rcon.id admin_command admin_execclient %id "chooseteam;menuselect 2 }
  413.       }
  414.     }
  415.     :CTag
  416.     if ($taga !isin %rcon.nick) && ($tagb !isin %rcon.nick)  { tsay %rcon.id All the players must be with Tag: %taga or %tagb $chr(44) in their nicks | .timerctag off }
  417.     else {
  418.       aset $data(%rcon.id) supload on
  419.       setscore $data(%rcon.id)
  420.       if ($data($ini(rents.ini,%rcon.id)).half == $null) { aset $data(%rcon.id) half start }
  421.       if ($istok(start First,$data($ini(rents.ini,%rcon.id)).half,32)) {
  422.         aset $data(%rcon.id) half First
  423.         RCMDfirstlife %rcon.id
  424.         if (%rcon.team == CT) {
  425.           if ($taga isin %rcon.nick) aset $data(%rcon.id) ctis A
  426.           if ($tagb isin %rcon.nick) aset $data(%rcon.id) ctis B
  427.         }
  428.         if (%rcon.team == TERRORIST) {
  429.           if ($taga isin %rcon.nick) aset $data(%rcon.id) ctis B
  430.           if ($tagb isin %rcon.nick) aset $data(%rcon.id) ctis A
  431.         }
  432.       }
  433.       if ($istok(Second half1,$data($ini(rents.ini,%rcon.id)).half,32)) {
  434.         aset $data(%rcon.id) half Second
  435.         RCMDsecondlife %rcon.id
  436.       }
  437.       .timerctag off
  438.     }
  439.   }
  440.   if (echo check !isin $2-) { echo @Console $+ $1 (12RCON $1 $+ 1) $$2- }
  441.   if (Bad Rcon: "rcon* iswm %rcon.dat) { aset $ini(rents.ini,$1) Connection BadRcon }
  442.   if (You have been banned from this server. == %Rcon.dat) && ($readini(rents.ini,$ini(rents.ini,$1),Connection) !== Banned) { aset $ini(rents.ini,$1) Connection Banned }
  443.   if ( ($clr($2-) == say) || ($clr($2-) == say_team) ) && (!%Bot.S. [ $+ [ %rcon.id ] ]) && ($readini(rents.ini,$ini(rents.ini,%rcon.id),SteamID) == %RCON.Steam) {
  444.     Tokenize 32 $clr($2-).said
  445.     if ($1 == !score) { Set -u2 %Bot.S $+ %rcon.id On | serverscore %rcon.id }
  446.     if ($1 == !rr) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id sv_restart $iif($2 isnum,$2,1) }
  447.     if ($1 == !Kick) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_kick $2- }    
  448.     if ($1 == !pass) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id sv_password $2- | ssay %rcon.id %rcon.nick "[Password] Serverer Password is Now: $2- }
  449.     if ($1- == !NoPass) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_nopass }
  450.     if ($1 == !Map) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_map $2 }    
  451.     if ($1- == !prac) { Set -u5 %Bot.S $+ %rcon.id On | PRAC %rcon.id | Esay %rcon.id [Prac] Prac Setting loaded by %rcon.nick }    
  452.     if ($1- == !MR15) { Set -u5 %Bot.S $+ %rcon.id On | MR15 %rcon.id | Esay %rcon.id [MR15] MR15 Setting loaded by %rcon.nick }  
  453.     if ($1 == !T) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | MOVE-T %rcon.id $2- }
  454.     if ($1 == !CT) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | MOVE-CT %rcon.id $2- }      
  455.     if ($1 == !Slay) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_slay $2- }
  456.     if ($1 == !Name) && ($2) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_execclient $2 name " $+ $3- }
  457.     if ($1 == @) || ($1 == !) || ($1 == !tsay) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_tsay $2- }
  458.     if ($1 == !ssay) { Set -u2 %Bot.S $+ %rcon.id On | Ssay %rcon.id $2- }
  459.     if ($1 == !tax) { rcmd %rcon.id admin_command admin_freezetime 59 | rcmd %rcon.id sv_Restart 1 | Esay %rcon.id [TAX] TAX Setting loaded by %rcon.nick }
  460.     if ($1 == !Knife) {
  461.       mr15 %rcon.id
  462.       .timer 1 2 ssay %rcon.id ..::Knife Round Has Been Started:::..
  463.       .timer 1 2 ssay %rcon.id ..::Knife Round Has Been Started:::..
  464.       .timer 1 2 ssay %rcon.id Dont TK, Throw Grenades or Quit!
  465.       .timer 6 2 rcmd %rcon.id admin_command admin_execall drop
  466.     }
  467.     if ($1 == !disconnect) || ($1 == !Quit) { Set -u2 %Bot.S $+ %rcon.id On | rcmd %rcon.id admin_command admin_execall disconnect }
  468.     if ($1 == !FF) {
  469.       if ($2 == ON) || ($2 == 1) { Set -u2 %Bot.S $+ %rcon.id On | ssay %rcon.id Friendlyfire is ON now. | rcmd %rcon.id mp_friendlyfire 1 }
  470.       if ($2 == OFF) || ($2 == $chr(48)) { Set -u2 %Bot.S $+ %rcon.id On | ssay %rcon.id Friendlyfire is OFF now. | rcmd %rcon.id mp_friendlyfire 0 }
  471.     }
  472.     if ($1 == !Help) || ($1 == !Commands) {
  473.       Esay %rcon.id [HELP] Admin Commands Are: !Pass ¬ !NoPass ¬ !Slay ¬ !Map ¬ !RR ¬ !CT/T ¬ !Name ¬ !Kick $+ .
  474.       Esay %rcon.id [HELP] Admin Commands Are: !MR15 ¬ !Prac ¬ !Rates ¬ !Live ¬ !Notlive ¬ !Quit ¬ !Tax ¬ !Knife $+ .
  475.       Esay %rcon.id [HELP] Admin Commands Are: !Ssay ¬ !Swap CT/T ¬ !End ¬ !Tsay $+ .
  476.     }
  477.     if ($1-2 == !swap t) { teamer %rcon.id t }
  478.     if ($1-2 == !swap ct) { teamer %rcon.id ct }
  479.     if ($1 == !Fz) { Set -u2 %Bot.S $+ %rcon.id On | ssay %rcon.id Freezetime is $2 now. | rcmd %rcon.id mp_freezetime $2 }
  480.     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 }
  481.     if ($1 == !Rates) { Set -u2 %Bot.S $+ %rcon.id On | Rates %rcon.id | Esay %rcon.id [Rates] Rates Setting loaded by %rcon.nick }    
  482.     if ($1 == !End) { Set -u2 %Bot.S $+ %rcon.id On | gend %rcon.id }
  483.     if ($1 == !notLive) {
  484.       aset %rcon.id supload off
  485.       Esay %rcon.id [NotLive] The Game Has Been Paused
  486.     }    
  487.     if ($1 == !live) {
  488.       ctag %rcon.id
  489.     }
  490.   }
  491. }
  492.  
  493.  
  494. alias tags {
  495.   if ($1 == off) { return off }
  496.   else { return on }
  497. }
  498. alias ctag { var %1 = $1 | .timerCTag -m 1 3500 CTag x %1 | .timer -m 1 500 rcmd %1 users }
  499. alias taga { return %taga }
  500. alias tagb { return %tagb }
  501. alias gend {
  502.   var %1 $1
  503.   if ($data(%1).status == off) { halt }
  504.   if ($2) {
  505.     ssay %1 ..::The Game has ENDED! Team $2 Won.!::..
  506.     ssay %1 ..::The Game has ENDED! Team $2 Won.!::..
  507.     tsay %1 ..::The Game has ENDED! Team $2 Won.!::..
  508.     tsay %1 ..::The Game has ENDED! Team $2 Won.!::..
  509.   }
  510.   else {
  511.     ssay %1 ..::The Game is ENDED!::..
  512.     ssay %1 ..::The Game is ENDED!::..
  513.     tsay %1 ..::The Game is ENDED!::..
  514.     tsay %1 ..::The Game is ENDED!::..
  515.   }
  516.   rcmd %1 sv_password $r(100,999)
  517.   aunset $data(%1) supload half ctis score-A score-B score-CT score-T
  518. }
  519. alias data {
  520.   var %file rents.ini
  521.   if ($1) {
  522.     if ($readini(%file,$1,$prop)) {
  523.       return $$v1
  524.     }
  525.     if (!$prop) && ($ini(%file,$1)) { return $ini(%file,$1) }
  526.   }
  527. }
  528. alias serverscore {
  529.   var %1 $1
  530.   if ($data(%1).half == start) ssay %1 Score Is Not Live Yet!
  531.   else { ssay %1 [SCORE] Score is - Team-A: $calc($score($data(%1)).A + 0 ) Team-B: $calc($score($data(%1)).B + 0 ) $+([,$data($ini(rents.ini,%1)).half Half]) }
  532.  
  533. }
  534. alias swap {
  535.   var %1 $1
  536.   if ($data(%1).ctis == A) teamer $data(%1) T
  537.   elseif ($data(%1).ctis == B) teamer $data(%1) CT
  538. }
  539. alias Teamer {
  540.   var %1 $1
  541.   if (!$1) || ($1 = X) Halt
  542.   if ($2 != CT) && ($2 != T) Halt
  543.   .timerTEAMer -m 1 3500 Teamer x $1-2
  544.   rcmd %1 admin_quiet 2
  545.   rcmd %1 allow_client_exec 1
  546.   rcmd %1 admin_ignore_immunity 1
  547.   rcmd %1 admin_command admin_execall setinfo "_vgui_menus" "0"
  548.   .timer -m 1 500 rcmd %1 users
  549. }
  550.  
  551. alias uploadscore {
  552.   var %1 $1
  553.   if ($data(%1).supload != on) return $false
  554.   elseif ($data(%1).half == start) return $false
  555.   elseif (half isin $data(%1).half) return $false
  556.   return $true
  557. }
  558. alias setscore {
  559.   var %1 $1
  560.   aset %1 score-ct 0
  561.   aset %1 score-t 0
  562. }
  563. alias score {
  564.   if ($isid) {
  565.     var %1 $1
  566.     var %p $prop
  567.     var %ct $data(%1).ctis
  568.     var %half $data(%1).half
  569.     var %s-ct $data(%1).score-CT
  570.     var %s-t $data(%1).score-T
  571.     var %s-a $data(%1).score-A
  572.     var %s-b $data(%1).score-B
  573.     if (%p == A) {
  574.       if (%ct == A) {
  575.         if (%half == First) { return %s-ct }
  576.         if (%half == Half1) { return %s-a }
  577.         if (%half == Second) { return $calc(%s-t + %s-a) }
  578.       }
  579.       if (%ct == B) {
  580.         if (%half == First) { return %s-t }
  581.         if (%half == Half1) { return %s-a }
  582.         if (%half == Second) { return $calc(%s-ct + %s-a) }
  583.       }
  584.     }
  585.     if (%p == B) {
  586.       if (%ct == a) {
  587.         if (%half == First) { return %s-t }
  588.         if (%half == Half1) { return %s-b }
  589.         if (%half == Second) { return $calc(%s-ct + %s-b) }
  590.       }
  591.       if (%ct == B) {
  592.         if (%half == First) { return %s-ct }
  593.         if (%half == Half1) { return %s-b }
  594.         if (%half == Second) { return $calc(%s-t + %s-b) }
  595.       }
  596.     }
  597.     if (%half == start) { return Not-Live }
  598.   }
  599. }
  600. alias aunset {
  601.   var %file Rents.ini
  602.   var %s $1
  603.   tokenize 32 $2-
  604.   remini -n %file %s $*
  605. }
  606. alias aset {
  607.   var %file Rents.ini
  608.   if ($3) || ($3 == 0) writeini -n %file $1-
  609.   else { echo -ts BAD ASET COMMAND!!! //writeini -n %file $replace($1-,0,$chr(48)) }
  610. }
  611. alias RCMDfirstlife {
  612.   var %1 $1
  613.   mr15 %1
  614.   .timer 1 1 ssay %1 Preparing for starting game, Please Wait..
  615.   .timer 1 3 ssay %1 The Game is Starting after the Restart! Good Luck!
  616.   .timer 1 4 rcmd %1 sv_restart 1
  617.   .timer 1 9 ssay %1 ..::LIVE. Game started! -> TEAM KILL = BAN::..
  618.   .timer 1 9 ssay %1 Match is live! First half started, Score is - Team-A: 0 Team-B: 0.
  619. }
  620.  
  621. alias RCMDsecondlife {
  622.   var %1 $1
  623.   mr15 %1
  624.   .timer 1 2 ssay %1 Preparing for starting game, Please Wait..
  625.   .timer 1 4 ssay %1 The Second Half is Starting after the Restart! Good Luck!
  626.   .timer 1 6 rcmd %1 sv_restart 1
  627.   .timer 1 9 ssay %1 Match is live! Second half started, Score is - Team-A: $score($data(%1)).A Team-B: $score($data(%1)).B
  628. }
  629.  
  630.  
  631. alias ghalf1 {
  632.   var %1 $1
  633.   aset %1 score-A $score(%1).A
  634.   aset %1 score-B $score(%1).B
  635.   aset %1 supload off
  636.   aset %1 half half1
  637.   ssay $data(%1) First Half Is Ended! Score: [Team-A: $score(%1).A Team-B: $score(%1).B $+ ]
  638.   tsay $data(%1) First Half Is Ended! Score: [Team-A: $score(%1).A Team-B: $score(%1).B $+ ]
  639.   swap %1
  640. }
  641. alias Esay { rcmd $1 admin_command admin_ssay $$2- }
  642. alias tsay { rcmd $1 admin_command admin_tsay $2- }
  643. alias ssay { rcmd $1 admin_command admin_ssay $+([,%Schan,]) $$2- }
  644. 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 }
  645. 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 }
  646. alias MR15 {
  647.   rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
  648.   rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4timer 35;mr122"
  649.   rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 800;mr123"
  650.   rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
  651.   rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
  652.   rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  653.   rcmd $1 mr122k
  654. }
  655. alias PRAC {
  656.   rcmd $1 alias prac122k "admin_ignore_immunity 1;default_access 0;Prac1"
  657.   rcmd $1 alias Prac1 "mp_forcecamera 0;mp_forcechasecam 0;mp_c4timer 35;Prac2"
  658.   rcmd $1 alias Prac2 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 16000;Prac3"
  659.   rcmd $1 alias Prac3 "mp_autokick 0;mp_friendlyfire 0;mp_freezetime 0;Prac4"
  660.   rcmd $1 alias Prac4 "mp_roundtime 7;mp_buytime 9;mp_fadetoblack 0;Prac5"
  661.   rcmd $1 alias Prac5 "sv_alltalk 1;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  662.   rcmd $1 prac122k
  663. }
  664. alias Rates {
  665.   rcmd $1 alias r122k "sv_maxrate 25000;sv_maxupdaterate 101;sv_minrate 15000;sv_maxcmdrate 101;r121"
  666.   rcmd $1 alias r121 "sv_minupdaterate 20;sv_maxspeed 320;sv_ticrate 1000;r122"
  667.   rcmd $1 alias r122 "sv_region 3;restart"
  668.   rcmd $1 r122k
  669. }
  670. alias RetryRCONS {
  671.   echo -s 1(12RCONS1) 3Retrying rcons ...
  672.   Sockclose *
  673.   .timerRCON* Off
  674.   .timerECHO* Off
  675.   .timer 1 3 RCONstart
  676. }
  677. alias closeroom {
  678.   remove drop.txt
  679.   write drop.txt /chan delete " $+ Server $1 $+ "
  680.   run ventrcon.exe -f drop.txt -a %adminpw %vent.ip
  681.   aunset $data($1) PRoom
  682. }
  683. alias openroom {
  684.   remove create.txt
  685.   var %pw $r(100,999)
  686.   write create.txt /subchan " $+ %main.room $+ " " $+ Server $1 $+ " 1 %pw 1 $2
  687.   aset $data($1) PRoom %pw
  688.   run ventrcon.exe -f create.txt -a %adminpw %vent.ip
  689.   timer 1 1 msg $2 $stl(The Room has been Created. Password: %pw , Do NOT part the channel (14 $+ %Schan $+ 01) or IRC quit, This will cause the room to close.)
  690. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement