Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 116.76 KB | None | 0 0
  1. /;TODO\
  2.  
  3. Blacklist steamid & username - Cannot add ...
  4.  
  5. auto add users in vent
  6. Remove Gather Number from Status and all...
  7. kick user from vent by when ban
  8. !Add - need to be faster
  9. Ban points
  10. menu for the settings and all...
  11.  
  12. FIX ALL FLOODS [SERVER/CHANNEL/PM]
  13. CHECK NOTICES TIMER TO NOT SHOW LIKE $me or $Nick... to hack the bot
  14.  
  15. /;END TODO\
  16.  
  17. menu * {
  18. Tray { showmirc -t }
  19. Refresh Gatherbot { RCONclose | .timer 1 2 RCONstart }
  20. Settings
  21. .Set Channel { var %x = $input(Type Channel 'With #',e,Type Channel 'With #') | if (%x) && ($chr(35) $+ * iswm %x) { Set %Gather.Channel %x } }
  22. .Set MainSign { var %x = $input(Enter MainSign,e,Enter MainSign) | if (%x) && ($chr(35) $+ * iswm %x) { Set %Gather.Sign %x } }
  23. .HideRun (ON/OFF)
  24. ..ON { unset %Gather.HideRun }
  25. ..OFF { Set %Gather.HideRun OFF }
  26. }
  27.  
  28. ;$stl(num,msg)
  29. alias stl { return $data($1).style1 $2- $data($1).style2 }
  30. on *:disconnect:{ .timercon 0 35 /if ($status == disconnected) { server irc.quakenet.org : 6667 } }
  31. ON *:CONNECT: { if (!%Gather.Today) { Set %Gather.Today 0 } | join %Gather.Channel | join %Gather.Logchannel | msg Q@CServe.quakenet.org AUTH yeled Jde4dJg3GT | .timer 1 3 mode $me +x | .timerCLOSEPMS 0 120 close -m | .timer 1 1 CheckBanTimes | .timerCheckBanTimes 0 600 CheckBanTimes | .timer 1 3 RCONstart | Fld 10 }
  32. ON *:TEXT:*:*: {
  33. if ($gettok(%Gather.LastStarted,3,32) !== $date) && (%Gather.LastReset !== $date) { Reset-Today }
  34. if ($target ischan) && (%Gather.Channel == $target) {
  35. if (*GetPass iswm $1-) && ($len($1-) == 8) && ($readini(Subs.ini,Signs,$left($1,1))) && (!%Gather.CantGetPass) { var %n = $v1 | .timer 1 $iif(%Gather.Timer,$v1,0) GetPass %n $nick $address | inc -u4 %Gather.Timer 1 | Fld 3 }
  36. if (*Sub iswm $1-) && ($len($1-) == 4) && ($readini(Subs.ini,Signs,$left($1,1))) {
  37. var %n = $v1
  38. if ($data(%n).sub) && (!$isnick(%n,$nick)) && (!$isaddress(%n,$address)) { SubFound %n $nick $address | Fld 5 }
  39. ;elseif (!$data(%n).sub) && ($data(%n).Status == ON) && (!$Fld) && (!%Gather.Adding) { msg %Gather.Channel $stl(%n,Sub is not needed) | Fld 5 }
  40. }
  41. if (%Gather.Adding) {
  42. var %n = %Gather.Adding
  43. if ($1- == $Sign(%n,Add)) && (!$isaddress(%n,$address)) && ($numtok($data(%n).players,32) !== $data(%n).Max) {
  44. .writeini -n Settings.ini %n Players $data(%n).players $nick | .writeini -n Settings.ini %n Address $data(%n).address $address
  45. if (!$Fld) && ($numtok($data(%n).players,32) !== $data(%n).Max) { .timerPlayers 1 $iif(%Gather.Timer,$v1,0) ShowPlayers %n | Fld 5 | inc -u3 %Gather.Timer 1 }
  46. elseif ($numtok($data(%n).players,32) == $data(%n).Max) { unset %Gather.Adding | mode %Gather.Channel +m | EndAdding %n | inc -u3 %Gather.Timer 5 }
  47. }
  48. elseif (($1- == $Sign(%n,Del)) || ($1- == $Sign(%n,Remove))) && ($isaddress(%n,$address)) && ($isnick(%n,$nick)) && ($nick !== $data(%n).Admin) { .writeini -n Settings.ini %n Players $remtok($data(%n).players,$nick,32) | .writeini -n Settings.ini %n Address $remtok($data(%n).address,$address,32) | if (!$Fld) { .timerPlayers 1 $iif(%Gather.Timer,$v1,0) ShowPlayers %n | Fld 5 | inc -u3 %Gather.Timer 1 } }
  49. if (!$Fld) {
  50. var %n = %Gather.Adding
  51. if ($1- == $Sign(%n,Status)) { ShowAddingStatus %Gather.Adding | Fld 5 }
  52. elseif ($1- == $Sign(%n,Players)) { ShowPlayers %Gather.Adding | Fld 5 }
  53. elseif ($1- == $Sign(%n,Vent)) || ($1- == $Sign(%n,Ventrilo)) { ShowVentrilo | Fld 5 }
  54. elseif ($1- == $Sign(%n,Map)) { ShowMap %Gather.Adding | Fld 5 }
  55. elseif ($1- == $Sign(%n,Admin)) { ShowAdmin %Gather.Adding | Fld 5 }
  56. }
  57. }
  58. if ($islogged($address)) {
  59. var %u $v1, %lvl $acc(%u).lvl
  60. if (((*Notice iswm $1) && ($2) && ($len($1) == 7)) || ((*N iswm $1-) && ($2) && ($len($1) == 2))) && (!%Gather.FldNotice) && (!$Fld) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | Set -u5 %Gather.FldNotice ON | .timer 1 $iif(%Gather.Timer,$v1,0) Noticer %n $2- | inc -u3 %Gather.Timer 1 | Fld 2 }
  61. elseif ( ( (*Notice iswm $1-) && (!$Fld) && ($len($1-) == 7)) || ( (*N iswm $1-) && ($len($1-) == 2) ) ) && (!%Gather.FldNotice) && ($readini(Subs.ini,Signs,$left($1,1))) && ($readini(Subs.ini,Signs,$left($1,1)) == %Gather.Adding) { Set -u5 %Gather.FldNotice ON | .timer 1 $iif(%Gather.Timer,$v1,0) NoticeAdd | inc -u3 %Gather.Timer 1 | Fld 3 }
  62. elseif ( ( (*Stop iswm $1-) && ($len($1) == 5)) || ( (*StopGather iswm $1) && ($len($1) == 11)) ) && ($readini(Subs.ini,Signs,$left($1,1)) == %Gather.Adding) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | StopGather %Gather.Adding $nick $2- }
  63. elseif (*Map iswm $1) && ($len($1) == 4) && ($2) && ($chr(37) $+ Gather !isin $2) && ($chr(36) !isin $2) && ($chr(124) !isin $2) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | if ( (%Gather.Adding == %n) || ($data(%n).Status == ON) ) { ChangeMap %n $2 } }
  64. elseif ($1 == $SignMain(Ban)) && ($2) { AddBan $2 %u CHAN $iif($3-,$3-,no reason) }
  65. elseif ($1 == $SignMain(BanTime)) && ($3) { AddBanTime $2 %u CHAN $3 $iif($4-,$4-,no reason) }
  66. elseif ($1 == $SignMain(Unban)) && ($2) { Unban $2 %u CHAN }
  67. elseif ($1 == $Sign(%Gather.Adding,Change)) && ( ($2 == 4) || ($2 == 6) || ($2 == 8) || ($2 == 10) || ($2 == 12) ) && (%Gather.Adding) { aset %Gather.Adding Max $2 | msg %Gather.Channel $stl(%Gather.Adding,Max players has changed to $+ $data(%Gather.Adding).Color2 $2 $data(%Gather.Adding).Color1 $+ by $+ $data(%Gather.Adding).Color2 $nick) }
  68. elseif (*End iswm $1-) && ($len($1) == 4) && ($readini(Subs.ini,Signs,$left($1,1))) {
  69. var %n = $v1
  70. if ($data(%n).Status == ON) { EndGather %n $nick }
  71. }
  72. }
  73. if (!%Gather.Adding) && (!$Fld) {
  74. if ($1- == ?Status) && (!%Gather.AllStatus) { Set -u20 %Gather.AllStatus ON | .timer 1 $iif(%Gather.Timer,$v1,0) ShowALLStatus | Fld 15 | inc -u3 %Gather.Timer 3 }
  75. elseif ($1- == $SignMain(Vent)) || ($1- == $SignMain(Ventrilo)) { ShowVentrilo | Fld 5 }
  76. elseif ($1 == $SignMain(Rank)) && ($2) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) ShowRank $2- | Fld 10 | inc -u3 %Gather.Timer 1 }
  77. elseif ( ($1 == $SignMain(Mvp)) || ($1 == $SignMain(Mvps)) ) && ($2) { ShowMvp $2- | Fld 8 }
  78. elseif ($1 == $SignMain(Bans)) && ($2) { ShowBans $2- | Fld 7 }
  79. elseif ($1 == $SignMain(Stats)) && ($2) { .timer 1 $iif(%Gather.Timer,$v1,0) ShowStats $2- | Fld 12 | inc -u3 %Gather.Timer 1 }
  80. elseif ($1- == $SignMain(Help)) || ($1- == $SignMain(Commands)) { ShowHelp | Fld 5 }
  81. elseif ($1- == $SignMain(Admins)) { ShowLevel Admin | Fld 10 }
  82. elseif ( ($1 == $SignMain(Gathers)) || ($1 == $SignMain(Gtrs)) ) && ($2) { ShowUserGathers $2 | Fld 6 }
  83. elseif ($1- == $SignMain(Today)) { ShowTodayGathers | Fld 5 }
  84. elseif ($1- == $SignMain(Masters)) { ShowLevel Master | Fld 10 }
  85. elseif ($1 == $SignMain(dban)) && ($2) { .timer 1 $iif(%Gather.Timer,$v1,0) ShowReason $2- | Fld 7 | inc -u3 %Gather.Timer 1 }
  86. elseif ($1- == $SignMain(Managers)) { ShowLevel Manager | Fld 10 }
  87. elseif ($1- == $SignMain(Gathers)) { ShowTotalGathers | Fld 5 }
  88. elseif ($1 == $SignMain(BanID)) && ($ini(Banned.ini,$2)) { .timer 1 $iif(%Gather.Timer,$v1,0) ShowReason $v1 | Fld 6 | inc -u3 %Gather.Timer 1 }
  89. elseif ( ($1- == $SignMain(topplayers)) || ($1- == $SignMain(top players)) || ($1- == $SignMain(top-players)) ) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) top players | inc -u3 %Gather.Timer 2 }
  90. elseif ( ($1- == $SignMain(topadmins)) || ($1- == $SignMain(top admins)) || ($1- == $SignMain(top-admins)) ) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) top admins | inc -u3 %Gather.Timer 2 }
  91. elseif ( ($1- == $SignMain(topmvps)) || ($1- == $SignMain(top mvps)) || ($1- == $SignMain(top-mvps)) ) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) top mvps | inc -u3 %Gather.Timer 2 }
  92. elseif ( ($1- == $SignMain(topnoobs)) || ($1- == $SignMain(top noobs)) || ($1- == $SignMain(top-noobs)) ) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) top noobs | inc -u3 %Gather.Timer 2 }
  93. elseif ( ($1- == $SignMain(topaces)) || ($1- == $SignMain(top aces)) || ($1- == $SignMain(top-aces)) ) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) top aces | inc -u3 %Gather.Timer 2 }
  94. elseif ( ($1- == $SignMain(topminiaces)) || ($1- == $SignMain(top miniaces)) || ($1- == $SignMain(top-miniaces)) ) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) top miniaces | inc -u3 %Gather.Timer 2 }
  95. elseif ($1 == $SignMain(Top)) && ($istok($weapons,$2,32)) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) Top Weapon $2 | inc -u3 %Gather.Timer 2 }
  96. elseif (%Gather.Sign $+ Top-* iswm $1) && ($istok($weapons,$gettok($1,2,$asc(-)),32)) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) Top Weapon $gettok($1,2,$asc(-)) | inc -u3 %Gather.Timer 2 }
  97. elseif (%Gather.Sign $+ Top* iswm $1) && ($istok($weapons,$remove($1,%Gather.Sign $+ Top),32)) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) Top Weapon $remove($1,%Gather.Sign $+ Top) | inc -u3 %Gather.Timer 2 }
  98. elseif ($1- == $SignMain(top10)) && (!%Gather.CantGetPass) { .timer 1 $iif(%Gather.Timer,$v1,0) top 10 | inc -u3 %Gather.Timer 2 }
  99. elseif ($1- == $SignMain(Owners)) { .timer 1 $iif(%Gather.Timer,$v1,0) ShowLevel Owner | Fld 10 | inc -u3 %Gather.Timer 2 }
  100. elseif (*Admin iswm $1-) && ($len($1) == 6) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | ShowAdmin $v1 | Fld 5 }
  101. elseif (*Map iswm $1-) && ($len($1) == 4) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | ShowMap $v1 | Fld 5 }
  102. elseif (*Subs iswm $1-) && ($len($1-) == 5) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | ShowSubs $v1 | Fld 5 }
  103. elseif ( (*Teams iswm $1-) && ($len($1) == 6) || (*Players iswm $1-) && ($len($1) == 8) ) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | ShowTeams $v1 | Fld 6 }
  104. elseif (*Server iswm $1-) && ($len($1) == 7) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | ShowServer $v1 | Fld 6 }
  105. elseif (*Sub iswm $1-) && ($len($1-) == 4) && ($readini(Subs.ini,Signs,$left($1,1))) {
  106. var %n = $v1
  107. if ($data(%n).sub) && (!$isnick(%n,$nick)) && (!$isaddress(%n,$address)) { SubFound %n $nick $address | Fld 6 }
  108. ;elseif (!$data(%n).sub) && ($data(%n).Status == ON) { msg %Gather.Channel $stl(%n,Sub is not needed) | Fld 5 }
  109. }
  110. elseif (*Status iswm $1-) && ($len($1-) == 7) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | ShowStatus %n | Fld 6 }
  111. elseif (*Score iswm $1-) && ($len($1-) == 6) && ($readini(Subs.ini,Signs,$left($1,1))) { var %n = $v1 | ShowScore %n | Fld 6 }
  112. }
  113. }
  114. ;Start PM
  115. elseif ($target !ischan) {
  116. if (!$window(@PME)) { window -e @PME }
  117. aline @PME ( $+ $date - $time $+ ) < $+ $nick - $iif($islogged($address),$acc($v1).lvl,No-admin) $+ > $1-
  118. if ($1 == $SignMain(Login)) && ($acc($2).pass == $3) && (!$islogged($address)) && ($3) {
  119. if (%Gather.TAG) && (%Gather.TAG !isin $nick) { msg $nick $stlmain(You must to be with the tag $+ %Gather.Color2 %Gather.TAG %Gather.Color1 $+ for login.) | halt }
  120. if ($nick !ison %Gather.Channel) { msg $nick $stlmain(You must be on the channel $+ %Gather.Color2 %Gather.Channel %Gather.Color1 $+ for login.) | halt }
  121. if (%Gather.logchannel) && ($nick !ison %Gather.logchannel) { msg $nick $stlmain(You must be on the channel $+ %Gather.Color2 %Gather.LogChannel %Gather.Color1 $+ for login.) | halt }
  122. acc $2 address $address | Fld 2 | acc $2 status ON | acc $2 LastLogin $date $+ - $+ $asctime(HH:nn)
  123. if (%Gather.logchannel) mode %Gather.logchannel +v $nick | inc -u3 %Gather.Timer 1
  124. mode %Gather.channel +v $nick
  125. notice $nick $stlmain(You are now Logged in! with ( $+ %Gather.Color2 $+  $+ $2 $+ %Gather.Color1 $+ ) ( $+ %Gather.Color2 $+ *!*@ $+ $gettok($address,2,64) $+ %Gather.Color1 $+ ))
  126. msg $iif(%Gather.Logchannel,$v1,%Gather.Channel) $stlmain(%Gather.Color2 $+  $+ $nick %Gather.Color1 $+ Has connected to $+ %Gather.Color2 $Upper($acc($2).lvl) %Gather.Color1 $+ Account ( $+ %Gather.Color2 $+  $+ $2 $+ %Gather.Color1 $+ ) ( $+ %Gather.Color2 $+ *!*@ $+ $gettok($address,2,64) $+ %Gather.Color1 $+ ))
  127. }
  128. ;Start Access commands
  129. if ($islogged($address)) {
  130. var %u $v1, %lvl $acc(%u).lvl
  131. if ($1 == $SignMain(NewSteam)) && ($CheckSteam($2)) { ACC %u Steam $2 | msg $nick $stlmain(Your steam id changed to $+ %Gather.Color2 $2) }
  132. if ($1 == $SignMain(NewPass)) { ACC %u Pass $2 | msg $nick $stlmain(Your password changed to $+ %Gather.Color2 $2) }
  133. if ($1- == $SignMain(logout)) { LogoutUser %u $nick $address Logged out }
  134. elseif (*Start iswm $1) && ($len($1) == 6) && ($2) && ($readini(Subs.ini,Signs,$left($1,1))) {
  135. var %n = $v1
  136. if (%Gather.Adding) { msg $nick $stlmain(Gather is already running adding, please wait until $Sign(%Gather.Adding,add) finished.) }
  137. elseif (!%Gather.Adding) && ($data(%n).Status == ON) { msg $nick $stl(%n,Gather %n is already running) }
  138. else { StartGather %n $address %u $nick $2- }
  139. }
  140. elseif (*End iswm $1-) && ($len($1) == 4) && ($readini(Subs.ini,Signs,$left($1,1))) {
  141. var %n = $v1
  142. if ($data(%n).Status == ON) { EndGather %n $nick }
  143. else { msg $nick $stl(%n,Gather $+ %Gather.Color2 %n %Gather.Color1 $+ isn't running.) }
  144. }
  145. elseif ($1 == $SignMain(Ban)) && ($2) { AddBan $2 %u CHAN $iif($3-,$3-,no reason) }
  146. elseif ($1 == $SignMain(BanTime)) && ($3) { AddBanTime $2 %u CHAN $3 $iif($4-,$4-,no reason) }
  147. elseif ($1 == $SignMain(Unban)) && ($2) { Unban $2 %u CHAN }
  148. elseif ( ($1 == $SignMain(Stop)) || ($1 == $SignMain(stopgather)) ) && (%Gather.Adding) { StopGather %Gather.Adding $nick $2- }
  149. elseif (*Sub iswm $1) && ($len($1) == 4) && ( ($2 == A) || ($2 == B) || ($2 == OFF) ) && ($readini(Subs.ini,Signs,$left($1,1))) {
  150. var %n = $v1
  151. if ($data(%n).Status == ON) { SubSearch %n $2 }
  152. else { msg $nick $stl(%n,Gather %n isn't running.) }
  153. }
  154. ;Masters/Managers/Owners commands
  155. if (%lvl !== admin) {
  156. if ($1 == $SignMain(set)) && ($2 == admin) { adduser $3 $4 $5 ADMIN $nick %u }
  157. elseif ($1 == $SignMain(add-a)) { adduser $2 $3 $4 ADMIN $nick %u }
  158. elseif ($1 == $SignMain(del-a)) { Unuser $2 ADMIN $nick }
  159. elseif ($1 == $SignMain(set)) && ($2 == unadmin) { Unuser $3 ADMIN $nick }
  160. elseif ($1 == $SignMain(Info)) && ($2) && ($ACC($2).lvl == Admin) { ShowUserInfo $2 $nick }
  161. }
  162. ;End Of Masters/Managers/Owners commands
  163. ;Managers/Owners commands
  164. if (%lvl == Manager) || (%lvl == Owner) {
  165. if ($1 == $SignMain(set)) && ($2 == master) { adduser $3 $4 $5 MASTER $nick %u }
  166. elseif ($1 == $SignMain(set)) && ($2 == unmaster) { Unuser $3 MASTER $nick }
  167. elseif ($1 == $SignMain(add-m)) || ($1 == $SignMain(add-master)) { adduser $2 $3 $4 MASTER $nick %u }
  168. elseif ($1 == $SignMain(del-m)) || ($1 == $SignMain(del-master)) { Unuser $2 MASTER $nick }
  169. elseif ($1 == $SignMain(how)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == MASTER) { How $2 $nick }
  170. elseif ($1 == $SignMain(up-a)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == ADMIN) { ACC $2 lvl MASTER | msg $nick $stlmain(User: $2 Promoted to Master!.) }
  171. elseif ($1 == $SignMain(down-m)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == MASTER) { ACC $2 lvl ADMIN | msg $nick $stlmain(User: $2 Now Admin!.) }
  172. elseif ($1 == $SignMain(Info)) && ($2) && ($ACC($2).lvl == Master) { ShowUserInfo $2 $nick }
  173. }
  174. ;End Of Managers/Owners commands
  175. ;Owners commands
  176. if (%lvl == Owner) {
  177. if ($1 == $SignMain(set)) && ($2 == Manager) { adduser $3 $4 $5 MANAGER $nick %u }
  178. elseif ($1 == $SignMain(set)) && ($2 == unManager) { Unuser $3 MANAGER $nick }
  179. elseif ($1 == $SignMain(set)) && ($2 == Owner) { adduser $3 $4 $5 OWNER $nick %u }
  180. elseif ($1 == $SignMain(set)) && ($2 == unOwner) { Unuser $3 OWNER $nick }
  181. elseif ($1 == $SignMain(add-manager)) { adduser $2 $3 $4 MANAGER $nick %u }
  182. elseif ($1 == $SignMain(del-manager)) { Unuser $2 MANAGER $nick }
  183.  
  184. elseif (*Pass iswm $1) && ($len($1) == 5) && ($2) && ($readini(Subs.ini,Signs,$left($1,1))) {
  185. var %n = $v1
  186. if ($data(%n).Status !== OFF) { aset %n Pass $2 }
  187. if (%n) { rcmd %n sv_password $2 | msg $nick $stl(%n,Server password has changed to $+ $data(%n).Color2 $2) }
  188. Fld 3
  189. }
  190. elseif ($1 == $SignMain(Info)) && ($2) && ( ($ACC($2).lvl == Manager) || ($ACC($2).lvl == Owner) ) { ShowUserInfo $2 $nick }
  191. elseif ($1 == $SignMain(Find)) && ($islogged($remove($address($2,5),$2 $+ !))) { ShowUserInfo $v1 $nick }
  192. elseif ($1- == $SignMain(retryrcon)) { RCONstart | msg $nick $stlmain(Retryring all rcons ... (/RCONstart)) }
  193. elseif ($1 == $SignMain(how)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == MANAGER) { How $2 $nick }
  194. elseif ($1 == $SignMain(whois)) && ($2) { ShowSteamInfo $2 $nick }
  195. elseif ( ($1 == $SignMain(downmanager)) || ($1 == $SignMain(down-manager)) ) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == MANAGER) { ACC $2 lvl MASTER | msg $nick $stlmain(User: $2 Now Master!.) }
  196. elseif ($1 == $SignMain(join)) && ($2) { join $2- | msg $nick $stlmain(Joining to $2-) }
  197. elseif ($1 == $SignMain(part)) && ($2) { part $2- | msg $nick $stlmain(Parting from $2-) }
  198. elseif ($1 == $SignMain(nick)) && ($2) { nick $2 | msg $nick $stlmain(Changing nick to $2) }
  199. elseif ($1 == $SignMain(upmaster)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == MASTER) { ACC $2 lvl MANAGER | msg $nick $stlmain(User: $2 Now Manager!.) }
  200. elseif ($1 == $SignMain(set)) && ($2 == port) && ($3 isnum) && ($4 isnum) && ($ini(Settings.ini,$3)) { aset $3 Port $4 | msg $nick $stlmain(Changing gather $3 port to $4 (Type $SignMain(RCON) $3 $+ )) }
  201. elseif ($1- == $SignMain(refresh)) { Unset %Gather.Flood | .timerRCON* OFF | .timer 1 1 RCONstart | msg $nick $stlmain(Gatherbot refreshed) }
  202. elseif ($1 == $SignMain(RCON)) && ($2 isnum) && ($ini(Settings.ini,$2)) { RCONclose $2 | .timer 1 2 RCON $2 | msg $nick $stlmain(Gatherbot number $2 refreshed) }
  203. }
  204. ;End Of Owners commands
  205. }
  206. ;End Access commands
  207. }
  208. ;End PM
  209. }
  210. ;/GetPass <num> <nick> <address>
  211. alias GetPass {
  212. if ($data($1).Status == ON) && ($istok($data($1).Address,$3,32)) && ( ($istok($data($1).Team-A,$2,32)) || ($istok($data($1).Team-B,$2,32)) ) {
  213. var %team = $iif($istok($data($1).Team-A,$2,32),A,B)
  214. Fld 4
  215. msg %Gather.Pratim $+ $r(1, $+ %Gather.Pratims $+ ) SendMsg $2 $details($1,%team)
  216. }
  217. }
  218. alias ShowSubs { if ($data($1).Status == ON) { msg %Gather.Channel $stl($1,$data($1).Color2 $+ Subs $+ $data($1).Color1 $+ : $data($1).Subs) } }
  219. ;/LogoutUser <user> <nick> <address> <reason>
  220. alias LogoutUser {
  221. .remini -n Access.ini ADDRESS $3 | .writeini -n Access.ini Access $1 $gettok($readini(Access.ini,Access,$1),1-8,32) | acc $1 Status OFF
  222. if ($4 !== Quit) notice $nick $stlmain(You are now Logged out! from ( $+ %Gather.Color2 $+  $+ $1 $+ %Gather.Color1 $+ ))
  223. msg $iif(%Gather.Logchannel,$v1,%Gather.Channel) $stlmain(%Gather.Color2 $+  $+ $2 %Gather.Color1 $+ Has disconnected from $+ %Gather.Color2 $upper($acc($1).lvl) %Gather.Color1 $+ Account ( $+ %Gather.Color2 $+  $+ $1 $+ %Gather.Color1 $+ ) (Reason: $+ %Gather.Color2 $4- $+ %Gather.Color1 $+ ))
  224. }
  225. alias ShortNick { return $iif($len($1-) > 20,$left($1-,20) $+ ...,$1-) }
  226. alias ShowSteamInfo { if (!$readini(Access.ini,STEAMIDS,$1)) { msg $2 $stlmain(%Gather.Color2 $+ $1- %Gather.Color1 $+ doesn't exist.) } | else { ShowUserInfo $readini(Access.ini,STEAMIDS,$1) $2 } }
  227. alias ShowUserInfo { var %lvl = $upper($left($acc($1).lvl,1)) $+ $lower($right($acc($1).lvl,$calc($len($acc($1).lvl)-1))) | msg $2 $stlmain(Details Are » Rage/Access: $+ %Gather.Color2 %lvl %Gather.Color1 $+ Username: $+ %Gather.Color2 $1 %Gather.Color1 $+ Password: $+ %Gather.Color2 $iif(%lvl == Owner,******,$acc($1).pass) %Gather.Color1 $+ STEAM:ID: $+ %Gather.Color2 $acc($1).steam %Gather.Color1 $+ Status: $iif($acc($1).status == ON,3Online $+ %Gather.Color1 $+ ,4Offline $+ %Gather.Color1 $+ ) $+ . BY: $+ %Gather.Color2 $acc($1).by %Gather.Color1 $+ Since: $+ %Gather.color2 $replace($acc($1).since,$chr(45),$chr(44)) %Gather.Color1 $+ LastLogin: $+ %Gather.Color2 $replace($acc($1).LastLogin,$chr(45),$chr(44))) }
  228. alias NoticeAdd {
  229. var %n = %Gather.Adding
  230. mode %Gather.Channel +m-N
  231. notice %Gather.Channel $stl(%n,Gather is ON $chr(44) $data(%n).Color2 $+ Players $+ $data(%n).Color1 $+ : $numtok($data(%n).Players,32) $+ / $+ $data(%n).Max $chr(44) $data(%n).Color2 $+ Type $+ $data(%n).Color1 $Sign(%n,add) to Join)
  232. notice %Gather.Channel $stl(%n,$data(%n).Color2 $+ Admin $+ $data(%n).Color1 $+ : $data(%n).Admin $chr(44) $data(%n).Color2 $+ Map $+ $data(%n).Color1 $+ : $data(%n).Map)
  233. .timer -m 1 500 mode %Gather.Channel -m+N
  234. }
  235. alias ChangeMap { msg %Gather.Channel $stl($1,Map has changed to $+ $data($1).Color2 $2) | aset $1 Map $2 | rcmd $1 admin_command admin_map $2 }
  236. alias ShowTotalGathers { msg %Gather.Channel $stlmain(< $+ %Gather.Color2 $+  $+ %Gather.num $+ %Gather.Color1 $+ > Gathers so far. (Today: $+ %Gather.Color2 %Gather.Today $+ %Gather.Color1 $+ )) ) }
  237. alias ShowUserGathers {
  238. if ($acc($1).steam) { var %u = $1 }
  239. elseif ($CheckSteam($1)) && ($isadmin($1)) { var %u = $v1 }
  240. if (%u) { msg %Gather.Channel $stlmain( $iif($acc(%u).status == ON,3 $+ %u,15 $+ %u) %Gather.Color2 $+ ( $+ %Gather.Color1 $+  $+ $acc(%u).steam $+ %Gather.Color2 $+ ) $+ %Gather.Color1 Has done $+ %Gather.Color2 $acc(%u).Gathers %Gather.Color1 $+ Gathers so far.) }
  241. else { msg %Gather.Channel $stlmain(The user ( $+ %Gather.Color2 $+  $+ $1 $+ %Gather.Color1 $+ ) is not found.) }
  242. }
  243. alias How {
  244. var %x 1, %count 0
  245. while ($ini(Access.ini,Access,%x)) { if ($acc($ini(Access.ini,Access,%x)).by == $1) { inc %count } | inc %x }
  246. msg $2 $stlmain(The user $+ %Gather.Color2 $1 %Gather.Color1 $+ has added $+ %Gather.Color2 %count %Gather.Color1 $+ users so far.)
  247. }
  248. ;/Adduser <User> <Pass> <SteamID> <Level> <Nick> <Byuser>
  249. alias Adduser {
  250. if ($6) {
  251. if ($readini(Access.ini,Access,$1)) { msg $5 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the username $+ %Gather.Color2 $1 %Gather.Color1 $+ has already in use.) }
  252. elseif ( ($len($1) > 29) || ($len($2) > 29) || ($len($3) > 29) ) { msg $5 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 $iif($len($1) > 29,Username,$iif($len($2) > 29,Password,$iif($len($3) > 29,STEAM_ID))) is too long (Max chars: 30)) }
  253. elseif (!$CheckSteam($3)) && (!$readini(Access.ini,$1,User)) { msg $5 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the syntax of the STEAM_ID is: $+ %Gather.Color2 STEAM_*:*:*) }
  254. elseif ($readini(Access.ini,STEAMIDS,$3)) { msg $5 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the steam_id $+ %Gather.Color2 $3 %Gather.Color1 $+ is already in use.) }
  255. elseif ($CheckSteam($3)) && (!$readini(Access.ini,$1,User)) { msg $5 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2) | SetNewAcc $1 $2 $3 $4 $6 }
  256. }
  257. }
  258. ;/Unuser <User> <Level> <Nick>
  259. alias Unuser {
  260. if (!$readini(Access.ini,Access,$1)) { msg $3 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the username $+ %Gather.Color2 $1 %Gather.Color1 $+ doesn't exist.) }
  261. else {
  262. if ($acc($1).lvl == $2) { msg $3 $stlmain(The $+ %Gather.Color2 $2 %Gather.Color1 $+ (user: $+ %Gather.Color2 $1 $+ %Gather.Color1 $+ ) successfully deleted.) | DeleteUser $1 }
  263. else { msg $3 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 your are not allowed to remove $+ %Gather.Color2 $ACC($1).lvl $+ s %Gather.Color1 $+ or $+ %Gather.Color2 $1 %Gather.Color1 $+ isn't $+ %Gather.Color2 $2) }
  264. }
  265. }
  266. alias ShowTodayGathers { msg %Gather.Channel $stlmain(< $+ %Gather.Color2 $+  $+ %Gather.Today $+ %Gather.Color1 $+ > Gathers for today ( $+ %Gather.Color2 $+  $+ $Date $+ %Gather.Color1 $+ ) ) }
  267. alias DeleteUser { var %steam = $acc($1).steam | var %addr = $acc($1).address | .remini -n Access.ini Access $1 | .remini -n Access.ini STEAMIDS %steam | if (%addr) .remini -n Access.ini ADDRESS %addr }
  268. alias CheckSteam { if ($gettok($1,1,58) != STEAM_0) || ( ($gettok($1,2,58) < 0) || ($gettok($1,2,58) > 1) ) || ($gettok($1,3,58) !isnum) || ($len($gettok($1,3,58)) < 4) { return $false } | return $true }
  269.  
  270. ;$ACC(USER).Pass - returns password
  271. ;/ACC <user> <prop> <string>
  272. alias ACC {
  273. if ($prop) { return $gettok($readini(Access.ini,Access,$1),$AccNumTok($prop),32) }
  274. else {
  275. var %c = $AccNumTok($2)
  276. if ($2 == pass) { .writeini -n Access.ini Access $1 $3 $gettok($readini(Access.ini,Access,$1),2-,32) }
  277. if ($2 == steam) { .remini -n Access.ini STEAMIDS $gettok($readini(Access.ini,Access,$2),2,32) | .writeini -n Access.ini STEAMIDS $3 $1 }
  278. if ($2 == address) { .writeini -n Access.ini ADDRESS $3 $1 }
  279. if ($2 !== pass) { .writeini -n Access.ini Access $1 $gettok($readini(Access.ini,Access,$1),1- $+ $calc(%c - 1),32) $3 $gettok($readini(Access.ini,Access,$1),$calc(%c + 1) $+ -,32) }
  280. }
  281. }
  282. ;/SetNewAcc <user> <pass> <steam_id> <level> <by>
  283. alias SetNewAcc { .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never | .writeini -n Access.ini STEAMIDS $3 $1 }
  284. alias AccNumTok {
  285. if ($1 == pass) { return 1 }
  286. if ($1 == steam) { return 2 }
  287. if ($1 == lvl) { return 3 }
  288. if ($1 == gathers) { return 4 }
  289. if ($1 == status) { return 5 }
  290. if ($1 == since) { return 6 }
  291. if ($1 == by) { return 7 }
  292. if ($1 == lastlogin) { return 8 }
  293. if ($1 == address) { return 9 }
  294. }
  295. alias ShowLevel {
  296. var %x 1, %temp, %y 1, %us $users($1)
  297. while ($ini(Access.ini,Access,%x)) {
  298. var %u = $v1
  299. if ($ACC(%u).lvl == $1) {
  300. if ($ACC(%u).status == ON) { var %temp = %temp 3 $+ %u $+ %Gather.Color1 $+ $chr(44) }
  301. else var %temp = %temp 15 $+ %u $+ %Gather.Color1 $+ $chr(44)
  302. }
  303. if ($numtok(%temp,32) == 20) {
  304. if (%y == 1) { msg %Gather.Channel $stlmain(%Gather.Color2 $+ $1 $+ s are ( $+ %Gather.Color1 $+  $+ $gettok(%us,2,32) $+ / $+ $gettok(%us,1,32) $+ %Gather.Color2 $+ ): %temp) | var %temp | inc %y }
  305. else { msg %Gather.Channel $stlmain(%temp) | var %temp }
  306. }
  307. inc %x
  308. }
  309. if (%temp) {
  310. if (%y == 1) { msg %Gather.Channel $stlmain(%Gather.Color2 $+ $1 $+ s are ( $+ %Gather.Color1 $+  $+ $gettok(%us,2,32) $+ / $+ $gettok(%us,1,32) $+ %Gather.Color2 $+ ): %temp) }
  311. else { msg %Gather.Channel $stlmain(%temp) }
  312. }
  313. if (!%us) { msg %Gather.Channel $stlmain(Gatherbot is empty of $+ %Gather.Color2 $1 $+ s) }
  314. }
  315. alias Users {
  316. var %x 1, %on 0, %all 0
  317. while ($ini(Access.ini,Access,%x)) {
  318. if ($Acc($ini(Access.ini,Access,%x)).lvl == $1) { inc %all
  319. if ($Acc($ini(Access.ini,Access,%x)).status == ON) inc %on
  320. }
  321. inc %x
  322. }
  323. return %all %on
  324. }
  325. alias Reset-Today { Set %Gather.LastReset $date | echo -ts (12Reset-Today1) Reset Today Gathers... | set %Gather.Today 0 }
  326. alias FindFreeGather { if (%Gather.Adding) return $false | var %x = 1 | while ($ini(Settings.ini,%x)) { if ($data(%x).Status == OFF) { return %x } | inc %x } }
  327. alias ShowALLMaps {
  328. var %x = 1
  329. while ($ini(Settings.ini,%x)) {
  330. if ($readini(Settings.ini,%x,Status) == ON) { ShowMap %x }
  331. inc %x
  332. }
  333. }
  334. alias ShowScore {
  335. if ($data($1).Status == OFF) { ShowStatus $1 }
  336. else {
  337. if ($data($1).Live) { msg %Gather.Channel $stl($1,Score is ( $+ $data($1).Color2 $+ Team-A $+ $data($1).Color1 $+ ): $+ $data($1).Color2 $Score($1,A) $+ $data($1).Color1 $chr(44) $+ ( $+ $data($1).Color2 $+ Team-B $+ $data($1).Color1 $+ ): $+ $data($1).Color2 $Score($1,B) $+ $data($1).Color1 ( $+ $data($1).Color2 $+  $+ $Score($1,Half) $+ $data($1).Color1 $+ )) }
  338. else { msg %Gather.Channel $stl($1,Match is not live Yet!) }
  339. }
  340. }
  341.  
  342. alias ShowALLAdmins {
  343. var %x = 1
  344. while ($ini(Settings.ini,%x)) {
  345. if ($readini(Settings.ini,%x,Status) == ON) { ShowAdmin %x }
  346. inc %x
  347. }
  348. }
  349. alias ShowMap {
  350. if ($data($1).Status == OFF) { ShowStatus $1 }
  351. else msg %Gather.Channel $stl($1,Map is: $+ $data($1).Color2 $data($1).Map)
  352. }
  353. alias ShowAdmin {
  354. if ($data($1).Status == OFF) { ShowStatus $1 }
  355. else msg %Gather.Channel $stl($1,Gather $1 $+ : Admin $data($1).Admin $+ .)
  356. }
  357. alias ShowHelp { msg %Gather.Channel $stlmain(%Gather.Color2 $+ Commands are $+ %Gather.Color1 $+ : $SignMain(status) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(vent) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(teams) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(map) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(admin\s) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(top10) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(score) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(topadmins) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(server <num>) %Gather.Color2 $+ • $+ %Gather.Color1 $+  $SignMain(rank <nick>)) }
  358. alias SubFound {
  359. var %team = $data($1).Sub
  360. .remini -n Settings.ini $1 Sub
  361. .timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,Sub has been found - $+ $data($1).Color2 $2)
  362. ;msg $nick $details($1,%team)
  363. .timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Pratim $+ $r(1, $+ %Gather.Pratims $+ ) SendMsg $nick $details($1,%team)
  364. .timerSub $+ $1 $+ %team Off
  365. inc -u3 %Gather.Timer 1
  366. Fld 4
  367. .writeini -n Settings.ini $1 Subs $data($1).subs $nick
  368. .writeini -n Settings.ini $1 Address $data($1).address $address
  369. if (%Gather.Adding) && ($isnick(%Gather.Adding,$nick)) && ($nick !== $data($1).Admin) { .writeini -n Settings.ini %Gather.Adding Players $remtok($data(%Gather.Adding).players,$nick,32) | .writeini -n Settings.ini %Gather.Adding Address $remtok($data(%Gather.Adding).address,$address,32) }
  370. tsay $1 Sub has been found for Team- $+ $upper(%team) - $2
  371. ssay $1 Sub has been found for Team- $+ $upper(%team) - $2
  372. }
  373. alias details { return $stl($1,Gather $+ $data($1).Color2 $1 $+ $data($1).Color1 $+ : ( $+ $data($1).Color2 $+ Team- $+ $upper($2) $+ $data($1).Color1 $+ ) $+ $data($1).Color1 Server: $+ $data($1).Color2 $data($1).server $+ $data($1).Color1 $chr(44) $+ pass: $+ $data($1).Color2 $data($1).pass $chr(44) $+ $data($1).Color1 $+ Vent: $+ $data($1).Color2 %Gather.Vent $chr(44) $+ $data($1).Color1 $+ Room- $+ $upper($2) $+ : $+ $data($1).Color2 $readini(Settings.ini,$1,Pass $+ $2)) }
  374. ;/SubSearch <Num> <A/B/OFF>
  375. alias SubSearch {
  376. if ($2 == A) || ($2 == B) { .timerSub $+ $1 $+ * Off | ssay $1 Searching sub for Team- $+ $2 | tsay $1 Searching sub for Team- $+ $2 | .writeini -n Settings.ini $1 Sub $2 | Sub $1 $2 | .timerSub $+ $1 $+ $2 0 40 Sub $1 $2 }
  377. elseif ($2 == OFF) { .timerSub $+ $1 $+ * Off | ssay $1 Sub Searching has been canceled. | tsay $1 Sub Searching has been canceled. | .remini -n Settings.ini $1 Sub | Sub $1 OFF }
  378. }
  379. alias Sub {
  380. if ($2 == A) || ($2 == B) { inc -u3 %Gather.Timer 1 | Set -u3 %Gather.CantStart ON | .timer 1 $iif(%Gather.Timer,$v1,0) mode %Gather.Channel -N+m | .timer 1 $iif(%Gather.Timer,$v1,0) .timer -m 1 300 notice %Gather.Channel $stl($1,Sub is needed $+ $chr(44) Type $data($1).Color2 $+ $Sign($1) $+ $data($1).Color1 $+ sub to be sub $chr(44) $+ Admin: $+ $data($1).Color2 $data($1).Admin $+ $data($1).Color1 $chr(44) $+ Map: $+ $data($1).Color2 $data($1).Map $+ $data($1).Color1 $chr(44) $+ Score: $+ $data($1).Color2 $iif($data($1).Live,$Score($1,A) - $Score($1,B),Not live) ) | .timer 1 $iif(%Gather.Timer,$v1,0) .timer 1 1 mode %Gather.Channel +N-m }
  381. elseif ($2 == OFF) { .timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,Sub player searching has been canceled.) }
  382. }
  383. alias SignSub { return $readini(Settings.ini,$1,Sign) }
  384. alias Send-details { .msg $replace($data($1).Team-A,$chr(32),$chr(44)) $details($1,A) | .timer 1 2 .msg $replace($data($1).Team-B,$chr(32),$chr(44)) $details($1,B) }
  385. alias ShowVentrilo { msg %Gather.Channel $stlmain( $+ %Gather.Color2 $+ Ventrilo $+ %Gather.Color1 $+ : %Gather.Vent ( $+ %Gather.Color2 $+ v $+ %Gather.Vent-Version $+ %Gather.Color1 $+ )) }
  386. alias EndAdding {
  387. mode %Gather.Channel +m
  388. unset %Gather.Adding | Set -u30 %Gather.Flood ON | .timerPlayers OFF | Set -u30 %Gather.CantStart ON | Set -u60 %Gather.CantGetPass ON
  389. .timer 1 $iif(%Gather.Timer,$v1,0) .timer -m 1 200 msg %Gather.Channel $stl($1,Mixing teams, Please wait ...)
  390. .timer 1 $iif(%Gather.Timer,$calc( $v1 + 10 ) ,10) mode %Gather.Channel -m
  391. .writeini -n Settings.ini $1 Status ON
  392. inc -u5 %Gather.Timer 7 | MIX $1 | .timer -m 1 500 ChangePassVent $1
  393. .timer 1 $iif(%Gather.Timer,$v1,0) .timer 1 1 ShowTeams $1
  394. .timer 1 10 Send-details $1
  395. ;.timer 1 $iif(%Gather.Timer,$v1,0) .timer 1 1 SendPratim $1
  396. }
  397. alias SendPratim { msg %Gather.Pratim $+ $r(1, $+ %Gather.Pratims $+ ) SendMsg $replace($data($1).Team-A,$chr(32),$chr(44)) $details($1,A) | .timer 1 2 msg %Gather.Pratim $+ $r(1, $+ %Gather.Pratims $+ ) SendMsg $replace($data($1).Team-B,$chr(32),$chr(44)) $details($1,B) }
  398. alias ShowTeams { if ($data($1).Status == OFF) { ShowStatus $1 } | else { var %a = $replace($data($1).Team-A,%Gather.TAG,$data($1).Color2 $+ %Gather.TAG $+ $data($1).Color1)) | var %b = $replace($data($1).Team-B,%Gather.TAG,$data($1).Color2 $+ %Gather.TAG $+ $data($1).Color1)) | msg %Gather.Channel $stl($1,$data($1).Color2 $+ Team-A $+ $data($1).Color1 $+ : $replace(%a,$data($1).Color2 $+ %Gather.TAG $+ $data($1).Color1 $+ $remove($data($1).Admin,%Gather.TAG),« $+ $data($1).Color2 $+  $+ $data($1).Admin $+ $data($1).Color1 $+ »))) | msg %Gather.Channel $stl($1,$data($1).Color2 $+ Team-B $+ $data($1).Color1 $+ : $replace(%b,$data($1).Color2 $+ %Gather.TAG $+ $data($1).Color1 $+ $remove($data($1).Admin,%Gather.TAG),« $+ $data($1).Color2 $+  $+ $data($1).Admin $+ $data($1).Color1 $+ »))) } }
  399. alias MIX {
  400. var %NEWPlayers1 $data($1).players,%NEW,%AFTER
  401. while ($numtok(%NEWPlayers1,32)) { %NEW = $gettok(%NEWPlayers1,$r(1,$v1),32) | %AFTER = %AFTER %NEW | %NEWPlayers1 = $remove(%NEWPlayers1,%NEW) }
  402. .writeini -n Settings.ini $1 Team-A $gettok(%AFTER,1- $calc($numtok($data($1).players,32) /2),32) | .writeini -n Settings.ini $1 Team-B $gettok(%AFTER,$calc($calc($numtok($data($1).players,32) /2) +1) -,32)
  403. }
  404. ON *:PART:%Gather.Channel: {
  405. if (%Gather.Adding) && ($isnick(%Gather.Adding,$nick)) && ($nick !== $data($1).Admin) { .writeini -n Settings.ini %Gather.Adding Players $remtok($data(%Gather.Adding).players,$nick,32) | .writeini -n Settings.ini %Gather.Adding Address $remtok($data(%Gather.Adding).address,$address,32) }
  406. if ($islogged($address)) { LogoutUser $v1 $nick $address Part }
  407. }
  408. ON *:KICK:%Gather.Channel {
  409. if (%Gather.Adding) && ($isnick(%Gather.Adding,$knick)) && ($knick !== $data(%Gather.Adding).Admin) { .writeini -n Settings.ini %Gather.Adding Players $remtok($data(%Gather.Adding).players,$knick,32) | .writeini -n Settings.ini %Gather.Adding Address $remtok($data(%Gather.Adding).address,$remove($address($knick,5),$knick,!),32) }
  410. if ($islogged($remove($address($knick,5),$knick $+ !))) { LogoutUser $v1 $knick $remove($address($knick,5),$knick $+ !) Kicked from channel }
  411. }
  412. ON *:QUIT: {
  413. if (%Gather.Adding) && ($isnick(%Gather.Adding,$nick)) && ($nick !== $data($1).Admin) { .writeini -n Settings.ini %Gather.Adding Players $remtok($data(%Gather.Adding).players,$nick,32) | .writeini -n Settings.ini %Gather.Adding Address $remtok($data(%Gather.Adding).address,$address,32) }
  414. if ($islogged($address)) { LogoutUser $v1 $nick $address Quit }
  415. }
  416. ON !*:NICK: { if (%Gather.Adding) && ($isaddress(%Gather.Adding,$address)) && ($isnick(%Gather.Adding,$nick)) { .writeini -n Settings.ini %Gather.Adding Players $reptok($data(%Gather.Adding).players,$nick,$newnick,32) | if ($nick == $data(%Gather.Adding).Admin) { .writeini -n Settings.ini %Gather.Adding Admin $newnick } } }
  417. alias islogged { return $readini(Access.ini,ADDRESS,$1) }
  418. alias isadmin { return $readini(Access.ini,STEAMIDS,$1) }
  419. alias ShowPlayers { msg %Gather.Channel $stl($1,Players $data($1).Color2 $+ ( $+ $data($1).Color1 $+  $+ $numtok($data($1).Players,32) $+ / $+ $data($1).Max $+ $data($1).Color2 $+ ) $+ $data($1).Color1 « $+ $data($1).Color2 $+  $+ $data($1).Admin $+  $+ $data($1).Color1 $+ » ¬ $replace($gettok($data($1).Players,2-,32),$chr(32),$chr(32) ¬ $chr(32),%Gather.TAG,$data($1).Color2 $+  $+ %Gather.TAG $+ $data($1).Color1)) }
  420.  
  421. ;$isaddress(num,address)
  422. alias isaddress { return $istok($data($1).address,$2,32) }
  423. ;$isnick(num,nick)
  424. alias isnick { if ( ($istok($data($1).players,$2,32)) || ($istok($data($1).subs,$2,32)) ) { return $true } }
  425.  
  426. alias ShowAddingStatus { msg %Gather.Channel $stl($1,Gather is 3ON $+ $data($1).Color1 ( $+ $data($1).Color2 $+  $+ $numtok($data($1).players,32) $+ / $+ $data($1).Max $+ $data($1).Color1 $+ ) $+ $chr(44) Map: $+ $data($1).Color2 $data($1).Map $+ $data($1).Color1 $chr(44) $+ Use $+ $data($1).Color2 $Sign($1) $+ $data($1).Color1 $+ add to Add yourself.) }
  427. alias Fld { if ($isid) return %Gather.Flood | else set $+(-u,$1) %Gather.Flood On }
  428. alias ShowALLStatus2 { var %x = 1 | while ($ini(Settings.ini,%x)) { .timer -m 1 $calc(%x * 500) ShowStatus %x | inc %x } }
  429. alias ShowALLStatus {
  430. var %x 1, %temp
  431. while ($ini(Settings.ini,%x)) {
  432. var %temp = %temp Gather %x $+ : ( $+ $iif($data(%x).Status == ON,9ON $+ %Gather.Color1 $+ ,4OFF $+ %Gather.Color1 $+ ) $+ )
  433. inc %x
  434. }
  435. if (%temp) msg %Gather.Channel $stlmain(%temp)
  436. }
  437. alias ShowStatus {
  438. if ($data($1).Status == ON) { msg %Gather.Channel $stl($1,Gather $+ $data($1).Color2 $1 $data($1).Color1 $+ Started At $+ $data($1).Color2 $gettok($data($1).Started,1,32) $+ $data($1).Color1 $chr(44) $+ Admin: $+ $data($1).Color2 $data($1).Admin $+ $data($1).Color1 $chr(44) $+ Map: $+ $data($1).Color2 $data($1).Map $+ $data($1).Color1 $chr(44) $+ Score: $+ $data($1).Color2 $iif($data($1).Live,$score($1,A) $data($1).Color1 $+ - $+ $data($1).Color2 $Score($1,B) $data($1).Color1 $+ ( $+ $data($1).Color2 $+  $+ $score($1,Half) $+ $data($1).Color1 $+ ),Not started)) }
  439. else { msg %Gather.Channel $stl($1,There is no gather running at the moment.) }
  440. }
  441. alias data { return $readini(Settings.ini,$1,$prop) }
  442. alias stlmain { return %Gather.Style1 $1- %Gather.Style2 }
  443. alias SignMain { return %Gather.Sign $+ $1 }
  444. alias Sign { return $readini(Settings.ini,$1,Sign) $+ $2 }
  445.  
  446. ;/StartGather <Num> <Address> <User> <Nick> <Map> <Server> <A> <B>
  447. alias StartGather {
  448. var %file = pass $+ $1 $+ .txt
  449. if (%Gather.CantStart) halt
  450. if (%Gather.Adding) { msg $4 $stlmain(Gather is already running, please wait until teams mixed.) | Halt }
  451. elseif ($data($1).Connected == BadRcon) { msg $4 $stl($1,Cannot run gather. Reason: Bad rcon password.) | Halt }
  452. elseif ($data($1).Connected == Banned) { msg $4 $stl($1,Cannot run gather. Reason: Gatherbot is BANNED from the server.) | Halt }
  453. elseif ($data($1).Connected == OFF) || (!$data($1).Connected) { msg $4 $stl($1,Cannot run gather. Reason: Gatherbot isn't connect to the server.) | Halt }
  454. elseif ($chr(37) $+ Gather isin $1-) || ($chr(36) isin $1-) || ($chr(124) isin $5-) { msg %Gather.Channel $stlmain($4 %Gather.Color1 $+ is trying hack the gatherbot.) | Halt }
  455. Set %Gather.Adding $1
  456. .timerSub $+ $1 $+ * Off
  457. RCON $1
  458. .remini -n Settings.ini $1 Sub
  459. .remini -n Settings.ini $1 SecondA
  460. .remini -n Settings.ini $1 SecondB
  461. .remini -n Settings.ini $1 MR3A
  462. .remini -n Settings.ini $1 MR3B
  463. .remini -n Settings.ini $1 FirstA
  464. .remini -n Settings.ini $1 FirstB
  465. inc %Gather.num
  466. inc %Gather.Today
  467. ACC $3 Gathers $calc($acc($3).Gathers +1)
  468. aset $1 AdminUser $3
  469. aset $1 GatherNum %Gather.num
  470. aset $1 Status Adding
  471. aset $1 Max 10
  472. .remini -n Settings.ini $1 Team-A
  473. .remini -n Settings.ini $1 Team-B
  474. .remini -n Settings.ini $1 ScoreStatus
  475. .remini -n Settings.ini $1 Score-CT
  476. .remini -n Settings.ini $1 Score-T
  477. .remini -n Settings.ini $1 Banlast
  478. .remini -n Settings.ini $1 Live
  479. .remini -n Settings.ini $1 BombPlanet
  480. .writeini -n Settings.ini $1 Half notyet
  481. .writeini -n Settings.ini $1 ScoreStatus OFF
  482. .writeini -n Settings.ini $1 Map $5
  483. .writeini -n Settings.ini $1 Admin $4
  484. .writeini -n Settings.ini $1 Players $4
  485. .writeini -n Settings.ini $1 Address ~ $+ $2
  486. .writeini -n Settings.ini $1 Started $time / $date
  487. .writeini -n Settings.ini $1 PassA $iif($7,$7,$r(1,9) $+ $r(1,9))
  488. .writeini -n Settings.ini $1 PassB $iif($8,$8,$r(1,9) $+ $r(1,9))
  489. .writeini -n Settings.ini $1 Pass $iif($6,$6,$r(1,9) $+ $r(1,9) $+ $r(1,9))
  490. msg $4 $stl($1,Gather details: serv pass: $data($1).pass a: $data($1).passa b: $data($1).passb)
  491. mode %Gather.Channel +m-N
  492. .write %file /chan delete $data($1).gtrinfo
  493. .write %file /subchan $data($1).roomnum $data($1).gtrinfo ¶ $data($1).passa ¶ "Gather is ON addit "
  494. run -hide Ventox.exe -n %Gather.VentUser -w %Gather.VentPass -a %Gather.VentRCON -f %file %Gather.Vent
  495. .timer 1 $iif(%Gather.Timer,$v1,0) notice %Gather.Channel $stl($1,Gather is about to START Be ready for -m)
  496. .timer 1 $iif(%Gather.Timer,$calc($v1 + 1),1) msg %Gather.Channel $stl($1,Starting the $+ $data($1).Color2 $ord($data($1).GatherNum) $data($1).Color1 $+ Gather since the $+ $data($1).Color2 $gettok($data($1).Started,1,32) $data($1).Color1 $+ by $+ $data($1).Color2 $data($1).Admin)
  497. .timer 1 $iif(%Gather.Timer,$calc($v1 + 2),2) .timer 1 2 msg %Gather.Channel $stl($1,Current map $+ $data($1).Color2 $data($1).Map $data($1).Color1 $+  $+ $chr(44) $+ Commands are: $+ $data($1).Color2 $Sign($1) $+ $data($1).Color1 $+ Add $+ $data($1).Color2 $Sign($1) $+ $data($1).Color1 $+ Remove $+ $data($1).Color2 $Sign($1) $+ $data($1).Color1 $+ Players)
  498. ;if (%Gather.Startnotice) .timer 1 $iif(%Gather.Timer,$calc($v1 + 3),3) notice %Gather.Channel $stl($1,%Gather.Startnotice)
  499. inc -u3 %Gather.Timer 3
  500. .timer 1 7.5 mode %Gather.Channel -m+N
  501. rcmd $1 sv_password $data($1).Pass
  502. .timer 1 1 rcmd $1 admin_command admin_map $data($1).Map
  503. .timer 1 3 rcmd $1 sv_password $data($1).Pass
  504. .timer 1 3 rcmd $1 admin_command admin_map $data($1).Map
  505. if ($exists(Mvps.ini)) .remini -n Mvps.ini $1
  506. }
  507. ;/StopGather <num> <nick> <Reason>
  508. alias StopGather {
  509. var %file = pass $+ $1 $+ .txt
  510. if (!%Gather.Adding) Halt
  511. unset %Gather.Adding
  512. .timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,Gather number < $+ $data($1).Color2 $+  $+ %Gather.num $+  $+ $data($1).Color1 $+ > has been stopped by $+ $data($1).Color2 $2 $iif($3,$data($1).Color1 $+ Reason: $+ $data($1).Color2 $3-))
  513. inc -u3 %Gather.Timer 2
  514. .timerSub $+ $1 $+ * Off
  515. aset $1 Max 10
  516. .write %file /chan delete $data($1).gtrinfo
  517. .write %file /subchan $data($1).roomnum $data($1).gtrinfo ¶ $data($1).passa ¶ "OFF"
  518. run -hide Ventox.exe -n %Gather.VentUser -w %Gather.VentPass -a %Gather.VentRCON -f %file %Gather.Vent
  519. .remini -n Settings.ini $1 Sub
  520. .remini -n Settings.ini $1 Subs
  521. .remini -n Settings.ini $1 SecondA
  522. .remini -n Settings.ini $1 SecondB
  523. .remini -n Settings.ini $1 MR3A
  524. .remini -n Settings.ini $1 MR3B
  525. .remini -n Settings.ini $1 FirstA
  526. .remini -n Settings.ini $1 FirstB
  527. .remini -n Settings.ini $1 Players
  528. .remini -n Settings.ini $1 Address
  529. .remini -n Settings.ini $1 Pass
  530. .remini -n Settings.ini $1 PassA
  531. .remini -n Settings.ini $1 PassB
  532. .remini -n Settings.ini $1 Admin
  533. .remini -n Settings.ini $1 Team-A
  534. .remini -n Settings.ini $1 Team-B
  535. .remini -n Settings.ini $1 ScoreStatus
  536. .remini -n Settings.ini $1 Score-CT
  537. .remini -n Settings.ini $1 Score-T
  538. .remini -n Settings.ini $1 Banlast
  539. .remini -n Settings.ini $1 Live
  540. .remini -n Settings.ini $1 BombPlanet
  541. .remini -n Settings.ini $1 Started
  542. .remini -n Settings.ini $1 Map
  543. .remini -n Settings.ini $1 Half
  544. .writeini -n Settings.ini $1 Status OFF
  545. aset $1 GatherNum $calc($data($1).GatherNum -1)
  546. ACC $data($1).AdminUser Gathers $calc($acc($data($1).AdminUser).Gathers -1)
  547. .remini -n Settings.ini $1 AdminUser
  548. dec %Gather.num
  549. dec %Gather.Today
  550. .timer 1 3 rcmd $1 sv_password $r(1,9) $+ $r(1,9) $+ $r(1,9)
  551. .timer 1 5 rcmd $1 admin_command admin_execall disconnect
  552. if ($exists(Mvps.ini)) .remini -n Mvps.ini $1
  553. }
  554. ;/EndGather <num> <by>
  555. alias EndGather {
  556. .timerSub $+ $1 $+ * Off
  557. Set %Gather.LastStarted $data($1).Started
  558. if ($calc($Score($1,A) + $Score($1,B)) < 5) || (!$data($1).Live) { dec %Gather.Today | dec %Gather.Num | ACC $data($1).AdminUser Gathers $calc($acc($data($1).AdminUser).Gathers -1) }
  559. else { setMvps $1 }
  560. RemovePassVent $1
  561. rcmd $1 allow_client_exec 1
  562. .timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,Gather Number < $+ $data($1).Color2 $+  $+ $data($1).GatherNum $+  $+ $data($1).Color1 $+ > is over! $iif($2,by $+ $data($1).Color2 $2 $+ $data($1).Color1) Score was ( $+ $data($1).Color2 $+  $+ $iif($data($1).Live,$Score($1,A) $+ $data($1).Color1 $+ - $+ $data($1).Color2 $+  $+ $Score($1,B),Not live) $+ $data($1).Color1 $+ ) $+ $chr(44) Ready for the next one.)
  563. inc -u3 %Gather.Timer 2
  564. ssay $1 Gather is over! ( $+ $iif($data($1).Live,$Score($1,A) $+ - $Score($1,B)) $+ )
  565. tsay $1 Gather is over! ( $+ $iif($data($1).Live,$Score($1,A) $+ - $Score($1,B)) $+ )
  566. .timer 1 3 rcmd $1 sv_password $r(1,9) $+ $r(1,9) $+ $r(1,9)
  567. .timer 1 5 rcmd $1 admin_command admin_execall disconnect
  568. .remini -n Settings.ini $1 Sub
  569. .remini -n Settings.ini $1 Subs
  570. .remini -n Settings.ini $1 SecondA
  571. .remini -n Settings.ini $1 SecondB
  572. .remini -n Settings.ini $1 MR3A
  573. .remini -n Settings.ini $1 MR3B
  574. .remini -n Settings.ini $1 FirstA
  575. .remini -n Settings.ini $1 FirstB
  576. .remini -n Settings.ini $1 Players
  577. .remini -n Settings.ini $1 Address
  578. .remini -n Settings.ini $1 Pass
  579. .remini -n Settings.ini $1 PassA
  580. .remini -n Settings.ini $1 PassB
  581. .remini -n Settings.ini $1 Admin
  582. .remini -n Settings.ini $1 Team-A
  583. .remini -n Settings.ini $1 Team-B
  584. .remini -n Settings.ini $1 ScoreStatus
  585. .remini -n Settings.ini $1 Score-CT
  586. .remini -n Settings.ini $1 Score-T
  587. .remini -n Settings.ini $1 Banlast
  588. .remini -n Settings.ini $1 Live
  589. .remini -n Settings.ini $1 BombPlanet
  590. .remini -n Settings.ini $1 Started
  591. .remini -n Settings.ini $1 Map
  592. .remini -n Settings.ini $1 Half
  593. .writeini -n Settings.ini $1 Status OFF
  594. .remini -n Settings.ini $1 AdminUser
  595. aset $1 Max 10
  596. if ($exists(Kills $+ $1 $+ .ini)) { .remove Kills $+ $1 $+ .ini }
  597. }
  598. alias SetMvps {
  599. Fld 20 | var %num = $FindMvpNum($1) | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  600. while ($ini(Mvps.ini,%num,%x)) { var %s = $v1 | echo @Bot %s $readini(Mvps.ini,$1,%s) | inc %x }
  601. filter -cwwteu 2 32 @Bot @Bot | var %1st = $gettok($line(@Bot,1),1,32) | var %2nd = $gettok($line(@Bot,2),1,32) | var %3rd = $gettok($line(@Bot,3),1,32)
  602. if (%1st) { Stats inc %1st mvps 3 | Stats inc %1st Points 6 }
  603. if (%2nd) { Stats inc %2nd mvps 2 | Stats inc %2nd Points 5 }
  604. if (%3rd) { Stats inc %3rd mvps 1 | Stats inc %3rd Points 4 }
  605. msg %Gather.Channel $stl($1,$data($1).Color2 $+ MVP'S $+ $data($1).Color1 of the game: $data($1).Color2 $+  $+ 1st. $+ $data($1).Color1 $Stats(%1st).nick $data($1).Color2 $+  $+ 2nd. $+ $data($1).Color1 $Stats(%2nd).nick $data($1).Color2 $+  $+ 3rd. $+ $data($1).Color1 $Stats(%3rd).nick)
  606. tsay $1 MVPS'S of the game: 1st.( $+ $Stats(%1st).nick $+ ) 2nd.( $+ $Stats(%2nd).nick $+ ) 3rd.( $+ $Stats(%3rd).nick $+ ).
  607. ssay $1 MVPS'S of the game: 1st.( $+ $Stats(%1st).nick $+ ) 2nd.( $+ $Stats(%2nd).nick $+ ) 3rd.( $+ $Stats(%3rd).nick $+ ).
  608. if ($exists(Mvps.ini)) .timer 1 3 .remini -n Mvps.ini $1
  609. }
  610.  
  611. alias FindMvpNum { var %x = 1 | while ($ini(Mvps.ini,%x)) { if ($v1 == $1) return %x | inc %x } }
  612.  
  613. ;
  614. ;;;;; CS 1.6 Multi Server Connection ;;;;;
  615. ;
  616.  
  617. alias RCONstart {
  618. echo -s (12RCON1)3 Starting RCONS ...
  619. var %x 1, %y 1
  620. while ($ini(Settings.ini,%x)) { .timer 1 %y RCON %x | inc %x | inc %y 10 }
  621. }
  622. alias RCONclose { .timerRCON $+ $1 Off | rcmd $1 logaddress_del $ip $readini(Settings.ini,$1,Port) | .remini -n Settings.ini $1 Challenge | .timerRCON $+ $1 OFF | .writeini -n Settings.ini $1 Connected OFF | sockclose rcon $+ $1 * | echo -s (12RCON $1 $+ 1) 1---4Sockets closed1--- }
  623. alias RconLOG {
  624. rcmd $1 nochn logaddress_del $ip $readini(Settings.ini,$1,Port)
  625. rcmd $1 nochn logaddress_del $ip $readini(Settings.ini,$1,Port)
  626. .timer -m 1 230 rcmd $1 nochn mp_logfile 1
  627. .timer -m 1 260 rcmd $1 nochn mp_logdetail 2
  628. .timer -m 1 290 rcmd $1 nochn sv_rcon_banpenalty 1
  629. .timer -m 1 320 rcmd $1 nochn sv_rcon_maxfailures 20
  630. .timer -m 1 350 rcmd $1 nochn sv_rcon_minfailures 20
  631. .timer -m 1 380 rcmd $1 nochn sv_rcon_minfailuretime 1
  632. .timer -m 1 420 rcmd $1 nochn log on
  633. .timer -m 1 450 rcmd $1 nochn admin_ignore_immunity 1
  634. .timer -m 1 480 rcmd $1 nochn logaddress_add $ip $readini(Settings.ini,$1,Port)
  635. .timer -m 1 500 echo -s (12RCON $1 $+ 1) 3* Open Socket Rcon LOG... *
  636. }
  637. ;/RCON <SERVER NUM> (/RCON 1,/RCON 2...)
  638. alias RCON { if ($ip) echo -s (12RCON $1 $+ 1) 4* Starting RCON $1 * | echo -s (12RCON $1 $+ 1) Server IPort:12 $readini(Settings.ini,$1,Server) | echo -s (12RCON $1 $+ 1) Rcon password is:12 $readini(Settings.ini,$1,RCONpass) | echo -s (12RCON $1 $+ 1) Port is:12 $readini(Settings.ini,$1,Port) | echo -s (12RCON $1 $+ 1) Your IP is:12 $ip | echo -s  | GETchallenge $1 | sockudp -k rcon $+ $1 $+ LOG $readini(Settings.ini,$1,Port) $replace($readini(Settings.ini,$1,Server),$chr(58),$chr(32)) $str($chr(255),4) | .timerLOG -m 1 750 RconLOG $1 }
  639. alias GETchallenge { sockclose rcon $+ $1 $+ Challenge | sockudp -k rcon $+ $1 $+ Challenge $replace($readini(Settings.ini,$1,Server),$chr(58),$chr(32)) $str($chr(255),4) $+ challenge rcon }
  640. on *:udpread:rcon*Challenge: { var %RCON-challenge | sockread %RCON-challenge | if ($gettok(%RCON-challenge,3,32) isnum) { var %n = $remove($sockname,rcon,Challenge) | .writeini -n Settings.ini %n Challenge $gettok(%RCON-challenge,3,32) } | elseif ($gettok(%RCON-challenge,3,32) !isnum) && ($readini(Settings.ini,%n,Connected) !== Banned) { .writeini -n Settings.ini %n Connected Banned | RCONclose | echo -s 1(12RCON1)4 You are BANNED from the Server %n RCON Closed ! 2Check your Server details. } }
  641. alias rcmd { if ($2 != nochn) GETchallenge $1 | sockudp -k rcon $+ $1 $+ CMD $replace($readini(Settings.ini,$1,Server),$chr(58),$chr(32)) $str($chr(255),4) $+ rcon $readini(Settings.ini,$1,Challenge) " $+ $readini(Settings.ini,$1,RCONpass) $+ " $iif($2 == nochn,$3-,$2-) }
  642. on *:udpread:rcon*LOG:{
  643. var %LOG
  644. sockread -f %LOG
  645. while ($sockbr) {
  646. if (%LOG) && (echo check !isin %LOG) RCON.DATA $remove($sockname,rcon,LOG) $gettok(%LOG,6-,32)
  647. sockread -f %LOG
  648. }
  649. }
  650. on *:udpread:rcon*CMD: {
  651. var %CMD
  652. var %n = $remove($sockname,rcon,CMD)
  653. sockread -f %CMD
  654. while ($sockbr) {
  655. if ($mid(%CMD,1,5) == $+($str($chr(255),4),l)) tokenize 32 $mid(%CMD,6-)
  656. else tokenize 32 %CMD
  657. if (!$window(@Console $+ %n)) && ($1- != $null) /window -e @Console $+ %n
  658. if ($1- != $null) && ($1- != check) && ($gettok($1-,6,32) !== check") && ($gettok($1-,5,32) !== echo) { echo @Console $+ %n (12RCON %n $+ 1) $1- }
  659. if (echo check !isin $1-) RCON.DATA %n $1-
  660. sockread -f %CMD
  661. }
  662. }
  663. alias LiveShow { ssay $1 Live. | ssay $1 Live.. | ssay $1 Live... | .timer 1 2 ssay $1 Game is ON. }
  664. alias ssay { rcmd $1 admin_command admin_ssay ( $+ %Gather.Channel $+ ) $2- }
  665. alias tsay { rcmd $1 admin_command admin_tsay $2- }
  666. alias SignS { return %Gather.Sign-Server $+ $1- }
  667. alias RCON.DATA {
  668. var %n = $1
  669. if (!$timer(RCON $+ $1)) .timerRCON $+ $1 0 600 rcon %n
  670. if (!$window(@Console $+ %n)) .window -e @Console $+ %n
  671. var %rcon.dat = $2- , %rcon.said = $clr($2-).said , %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
  672. if (*Bad rcon_password.* iswm $2-) && ($readini(Settings.ini,$1,Connected) !== BadRcon) { .writeini -n Settings.ini $1 Connected BadRcon | echo -s (12RCON $1 $+ 1) 4* BAD RCON PASSWORD - Closing RCON Socket... * }
  673. if (Server shutdown isin $2-) { .writeini -n Settings.ini $1 Connected OFF | echo -s (12RCON $1 $+ 1) 4* SERVER SHUTDOWN - Closing RCON Socket... * }
  674. if ( (Rcon: isin $2-) || (Logging disabled isin $2-) || (logaddress_del isin $2-) ) && (Bad Rcon !isin $2-) && ($readini(Settings.ini,$1,Connected) !== ON) { .writeini -n Settings.ini %n Connected ON | echo -s (12RCON %n $+ 1) 12Gatherbot connected to the SERVER !!! | echo -s (12RCON %n $+ 1) 12Gatherbot connected to the SERVER !!! | echo -s (12RCON %n $+ 1) 12Gatherbot connected to the SERVER !!! }
  675. if (echo check !isin $2-) { echo @Console $+ %n (12RCON %n $+ 1) $$2- }
  676. if (Bad Rcon: "rcon* iswm %rcon.dat) { .writeini -n Settings.ini $1 Connected BadRcon }
  677. if (You have been banned from this server. == %Rcon.dat) && ($readini(Settings.ini,%n,Connected) !== Banned) { .writeini -n Settings.ini %n Connected Banned }
  678. if ($2 isnum) && ($3 == :) && ($remove($4,STEAM_,:) isnum) && ($5 == :) && ($6) { inc %num | aset %n Players-list $data(%n).Players-list «£ $+ $remove($data(%n).Color2,) $+ ƒƒ $+ %num $+ £ $+ $remove($data(%n).Color1,) $+ » $6- }
  679.  
  680. if ($data(%n).Status == ON) {
  681. if (STEAM USERID validated == $clr($2-)) { ssay %n %rcon.nick ( $+ %RCON.steam $+ ) Has connected. }
  682. if (disconnected == $clr($2-)) { aset %n Banlast %Rcon.steam | ssay %n %rcon.nick ( $+ %rcon.steam $+ ) Has disconnected ,Type %Gather.Sign-Server $+ Banlast }
  683. ;Start ScoreStatus (ON)
  684. if ($data(%n).ScoreStatus == ON) {
  685. if (*Team "TERRORIST" triggered "Terrorists_Win"* iswm %rcon.dat) { aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) }
  686. elseif (*Team "CT" triggered "CTs_Win"* iswm %rcon.dat) { aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) }
  687. elseif (*Team "CT" triggered "Target_Saved"* iswm %rcon.dat) { aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) }
  688. elseif (*Team "TERRORIST" triggered "Target_Bombed"* iswm %rcon.dat) { aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) | var %s = $data(%n).BombPlanet | .writeini -n Mvps.ini %n %s $calc($readini(Mvps.ini,%n,%s) +1) | Stats inc %s Points }
  689. elseif (*Team "CT" triggered "Bomb_Defused"* iswm %rcon.dat) { aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) }
  690. elseif (World triggered "Restart_Round_(*_second)" iswm %rcon.dat) { aset %n Score-CT 0 | aset %n Score-T 0 }
  691. ;Start Round_End
  692. if (*World triggered "Round_End"* iswm %rcon.dat) {
  693. if ($exists(Kills $+ %n $+ .ini)) {
  694. var %x = 1 | while ($ini(Kills $+ %n $+ .ini,%x)) { if ($readini(Kills $+ %n $+ .ini,$ini(Kills $+ %n $+ .ini,%x),Kills) == 4) { Stats inc $ini(Kills $+ %n $+ .ini,%x) miniaces | .writeini -n Mvps.ini %n $ini(Kills $+ %n $+ .ini,%x) $calc($readini(Mvps.ini,%n,$ini(Kills $+ %n $+ .ini,%x)) +3.07) | Stats inc $ini(Kills $+ %n $+ .ini,%x) Points 3.07 | tsay %n $Stats($ini(Kills $+ %n $+ .ini,%x)).nick Just did a MINI ACE. | ssay %n $Stats($ini(Kills $+ %n $+ .ini,%x)).nick Just did a MINI ACE. } | inc %x }
  695. if ($exists(Kills $+ %n $+ .ini)) .remove Kills $+ %n $+ .ini
  696. }
  697. if ($calc($Score(%n,a) + $Score(%n,b)) == 15) && (!$data(%n).FirstA) && (!$data(%n).FirstB) { SWAP %n | End1stHalf %n }
  698. elseif ( ($Score(%n,a) == 16) || ($Score(%n,b) == 16) ) && ($data(%n).Half == Second) { EndGather %n }
  699. elseif ( ($Score(%n,a) == 19) || ($Score(%n,b) == 19) ) && ($data(%n).Half == MR4) { EndGather %n }
  700. elseif ($calc($Score(%n,a) + $Score(%n,b)) == 14) && (!$data(%n).FirstA) && (!$data(%n).FirstB) { .timer 1 6 ssay %n Last round has been started. | .timer 1 6 tsay %n Last round has been started. }
  701. elseif ($Score(%n,a) == 15) && (%Gather.Half == Second) { .timer 1 6 ssay %n Last round for (Team-A) has been started. | .timer 1 6 tsay %n Last round for (Team-A) has been started. }
  702. elseif ($Score(%n,b) == 15) && (%Gather.Half == Second) { .timer 1 6 ssay %n Last round for (Team-B) has been started. | .timer 1 6 tsay %n Last round for (Team-B) has been started. }
  703. elseif ( ($Score(%n,a) == 18) && ($Score(%n,b) == 18) ) && ($data(%n).Half == MR4) { EndGather %n }
  704. elseif ($data(%n).Half == MR3) && ($calc($data(%n).Score-T + $data(%n).Score-CT) == 3) { SWAP %n | EndMR3Half %n }
  705. elseif ($Score(%n,a) == 15) && ($Score(%n,b) == 15) && ($data(%n).Half == Second) { SWAP %n | End2ndHalf %n }
  706. ShowServerScore %n
  707. .remini -n Settings.ini %n BombPlanet
  708. }
  709. ;End Round_End
  710. elseif (attacked == $clr($2-)) && (%rcon.team == %rcon.team2) { rcmd %n admin_command admin_ssay ( $+ $iif(%RCON.team == TERRORIST,TS,CT) $+ ) ( $+ %rcon.nick $+ ) attacked ( $+ %rcon.nick2 $+ ) $iif($gettok($2-,11,34) <= 0,(DEAD),( $+ $iif($gettok($2-,7,34) > 100,100,$v1) HP)) }
  711. elseif (World triggered "Round_Start"* iswm %rcon.dat) || (World triggered "Round_Draw"* iswm %rcon.dat) { .remini -n Settings.ini %n BombPlanet }
  712. elseif (Killed == $clr($2-)) {
  713. if (%rcon.team !== %rcon.team2) {
  714. if (!$ini(Stats.ini,STEAMIDS,%rcon.steam)) { SetNewPlayer %rcon.steam }
  715. if (!$ini(Stats.ini,STEAMIDS,%rcon.steam2)) { SetNewPlayer %rcon.steam2 }
  716. .writeini -n Stats.ini NICKS %rcon.steam %rcon.nick
  717. .writeini -n Stats.ini NICKS %rcon.steam2 %rcon.nick2
  718. Stats inc %rcon.steam kills | Stats inc %rcon.steam Points $Guns(%rcon.weapon) | .writeini -n Mvps.ini %n %rcon.steam $calc($readini(Mvps.ini,%n,%rcon.steam) + $Guns(%rcon.weapon)) | Stats dec %rcon.steam2 Points | .writeini -n Mvps.ini %n %rcon.steam2 $calc($readini(Mvps.ini,%n,%rcon.steam2) -1) | Stats inc %rcon.steam %rcon.weapon | Stats inc %rcon.steam2 deaths
  719. if ($Stats(%rcon.steam).Last == 0) || ($Stats(%rcon.steam).Last !== $data(%n).GatherNum) { .writeini -n Stats.ini STEAMIDS %rcon.steam $gettok($stats(%rcon.steam).all,1-8,32) $data(%n).GatherNum $gettok($stats(%rcon.steam).all,10-,32) | Stats inc %rcon.steam Gathers }
  720. if ($Stats(%rcon.steam2).Last == 0) || ($Stats(%rcon.steam2).Last !== $data(%n).GatherNum) { .writeini -n Stats.ini STEAMIDS %rcon.steam2 $gettok($stats(%rcon.steam2).all,1-8,32) $data(%n).GatherNum $gettok($stats(%rcon.steam2).all,10-,32) | Stats inc %rcon.steam2 Gathers }
  721. if ($readini(Kills $+ %n $+ .ini,%rcon.steam,Kills)) { .writeini -n Kills $+ %n $+ .ini %rcon.steam Kills $calc($readini(Kills $+ %n $+ .ini,%rcon.steam,Kills) +1) }
  722. elseif (!$readini(Kills $+ %n $+ .ini,%rcon.steam,Kills)) { .writeini -n Kills $+ %n $+ .ini %rcon.steam Kills 1 }
  723. if ($readini(Kills $+ %n $+ .ini,%rcon.steam,Kills) == 5) { Stats inc %rcon.steam aces | Stats inc %rcon.steam Points 4.51 | .writeini -n Mvps.ini %n %rcon.steam $calc($readini(Mvps.ini,%n,%rcon.steam) + 4.51) | tsay %n %rcon.nick Just did an ACE. | ssay %n %rcon.nick Just did an ACE. | .remove Kills $+ %n $+ .ini }
  724. }
  725. elseif (%rcon.team == %rcon.team2) {
  726. if (!$ini(Stats.ini,STEAMIDS,%rcon.steam)) { SetNewPlayer %rcon.steam }
  727. if (!$ini(Stats.ini,STEAMIDS,%rcon.steam2)) { SetNewPlayer %rcon.steam2 }
  728. .writeini -n Stats.ini NICKS %rcon.steam %rcon.nick
  729. .writeini -n Stats.ini NICKS %rcon.steam2 %rcon.nick2
  730. Stats dec %rcon.steam Points 3 | Stats inc %rcon.steam tks | .writeini -n Mvps.ini %n %rcon.steam $calc($readini(Mvps.ini,%n,%rcon.steam) -3)
  731. }
  732. }
  733. elseif (Triggered == $clr($2-)) {
  734. if (%rcon.said == Planted_The_Bomb) {
  735. if (!$ini(Stats.ini,STEAMIDS,%rcon.steam)) { SetNewPlayer %rcon.steam }
  736. aset %n BombPlanet %rcon.steam | .writeini -n Stats.ini NICKS %rcon.steam %rcon.nick | Stats inc %rcon.steam Points 1.01 | .writeini -n Mvps.ini %n %rcon.steam $calc($readini(Mvps.ini,%n,%rcon.steam) + 1.01) | Stats inc %rcon.steam plants
  737. }
  738. if (%rcon.said == Defused_The_Bomb) {
  739. if (!$ini(Stats.ini,STEAMIDS,%rcon.steam)) { SetNewPlayer %rcon.steam }
  740. .writeini -n Stats.ini NICKS %rcon.steam %rcon.nick | Stats inc %rcon.steam Points 1.01 | .writeini -n Mvps.ini %n %rcon.steam $calc($readini(Mvps.ini,%n,%rcon.steam) + 1.01) | Stats inc %rcon.steam defuses
  741. }
  742. }
  743. }
  744. ;End ScoreStatus (ON)
  745. if ($clr($2-) == say) || ($clr($2-) == say_team) {
  746. Tokenize 32 %rcon.said
  747. if (!$window(@Cmds $+ %n)) { window @Cmds $+ %n }
  748. if ($1- == $SignS(score)) && ($data(%n).Status == ON) && (!%Gather.ServFld $+ %n) { if ($data(%n).Live) { Set -u2 %Gather.ServFld $+ %n ON | ShowServerScore %n } | else { Set -u2 %Gather.ServFld $+ %n ON | ssay %n Score status: Match is not live yet! } }
  749. elseif ($1- == $SignS(rank)) && (!%Gather.ServFld $+ %n) { Set -u2 %Gather.ServFld $+ %n ON | ShowRankServer %n %rcon.steam %RCON.steam }
  750. elseif ($1- == $SignS(stats)) && (!%Gather.ServFld $+ %n) { Set -u2 %Gather.ServFld $+ %n ON | ShowStatsServer %n %rcon.steam %RCON.steam }
  751. elseif ($1 == $SignS(rank)) && (!%Gather.ServFld $+ %n) && ($2) { Set -u2 %Gather.ServFld $+ %n ON | ShowRankServer %n %rcon.steam $2- }
  752. elseif ($1 == $SignS(stats)) && (!%Gather.ServFld $+ %n) && ($2) { Set -u2 %Gather.ServFld $+ %n ON | ShowStatsServer %n %rcon.steam $2- }
  753. elseif ($1- == $SignS(Vent)) && (!%Gather.ServFld $+ %n) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Vent is: %Gather.Vent ( $+ %Gather.Vent-Version $+ ) }
  754. elseif ($1- == $SignS(Time)) && (!%Gather.ServFld $+ %n) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Time is now: $time }
  755. elseif ( ($1- == $SignS(Help)) || ($1- == $SignS(Commands)) ) && (!%Gather.ServFld $+ %n) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Commands are: $SignS(Vent) $SignS(Score) $SignS(Stats) $SignS(Rank) $SignS(Admin) $+ . }
  756. elseif ($1- == $SignS(Admin)) && (!%Gather.ServFld $+ %n) && ($data(%n).Status == ON) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Admin is: $data(%n).Admin }
  757. if ($isadmin(%rcon.steam)) {
  758. var %u $v1, %lvl $acc(%u).lvl
  759. if ($1 == $SignS(rr)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n sv_restart 1 | ssay %n Restarting round by %rcon.nick ... }
  760. elseif ($1- == $SignS(teams)) && ($data(%n).Status == ON) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n (Team-A): $data(%n).Team-A | ssay %n (Team-B): $data(%n).Team-B }
  761. elseif ($1 == $SignS(Freezetime)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Freezetime is $2 now. | rcmd %n mp_freezetime $2 }
  762. elseif ($1 == $SignS(roundtime)) && ($2 isnum) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Roundtime is $2 now. | rcmd %n mp_roundtime $2 }
  763. elseif ($1 == !) || ($1 == @) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | tsay %n [ $+ %rcon.nick $+ ]: $2- }
  764. elseif ($1 == $SignS(FF)) {
  765. if ($2 == ON) || ($2 == 1) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Friendlyfire is $2 now. | rcmd %n mp_friendlyfire 1 }
  766. elseif ($2 == OFF) || ($2 == $chr(48)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Friendlyfire is $2 now. | rcmd %n mp_friendlyfire 0 }
  767. }
  768. elseif ($1- == $SignS(PASS)) && ($data(%n).Status == ON) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | psay %n %rcon.steam Server pass: $data(%n).pass Room-A: $data(%n).passa Room-B: $data(%n).passb }
  769. elseif ($1 == $SignS(disconnect)) || ($1 == $SignS(Quit)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_execall disconnect }
  770. elseif ($1 == $SignS(ss)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | tsay %n Snapshot has just taken by the admin ( $+ %rcon.nick $+ ) | rcmd %n rcmd admin_quiet 1 | rcmd %n allow_client_exec 1 | rcmd %n admin_command admin_execall snapshot | rcmd %n admin_quiet 2 }
  771. elseif ($1 == $SignS(Sub)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | SubSearch %n $upper($2) }
  772. elseif ($1 == $SignS(Kick)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_kick $2- | ssay %n $2- Kicked by %rcon.nick }
  773. elseif ($1- == $SignS(MR15)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n MR15 Settings loaded by %rcon.nick | MR15 %n }
  774. elseif ($1- == $SignS(PRAC)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n PRAC Settings loaded by %rcon.nick | PRAC %n }
  775. elseif ($1- == $SignS(Knife)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | Knife %n }
  776. elseif ($1- == $SignS(Rates)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | Rates %n }
  777. elseif ($1- == $SignS(End)) && ($data(%n).Status == ON) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | EndGather %n %rcon.nick }
  778. elseif ($1 == $SignS(Pass)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n sv_password $2 | ssay %n Password is $2 now.
  779. if ($data(%n).Status == ON) { aset %n pass $2 }
  780. }
  781. elseif ($1 == $SignS(Map)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_map $2 | ssay %n Changing map to $2 now
  782. if ($data(%n).Status == ON) { aset %n map $2 }
  783. }
  784. elseif ( ($1 == $SignS(Name)) || ($1 == $SignS(Nick)) ) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_execclient $2 name " $+ $3- }
  785. elseif ( ($1 == $SignS(StartMoney)) || ($1 == $SignS(Money)) ) && ($2) && ($2 isnum) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Startmoney is $2 now. | rcmd %n mp_startmoney $2 }
  786. elseif ($1 == $SignS(Slay)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_slay $2 | ssay %n $2 Slayed by %rcon.nick }
  787. elseif ($1 == $SignS(T)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | MOVE-T %n $2- }
  788. elseif ($1 == $SignS(CT)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | MOVE-CT %n $2- }
  789. elseif ($1 == $SignS(Ban)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBan $2 %u SSAY $+ %n $iif($3-,$3-,no reason) }
  790. elseif ($1 == $SignS(BanTime)) && ($3) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBan $2 %u SSAY $+ %n $3 $iif($4-,$4-,no reason) }
  791. elseif ($1- == $SignS(Banlast)) && ($data(%n).BanLast) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBanTime $data(%n).BanLast %u SSAY $+ %n 1 left in the middle. }
  792. elseif ($1- == $SignS(BanTK)) && ($data(%n).BanLast) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBanTime $data(%n).BanLast %u SSAY $+ %n 2 Tk team members. }
  793. elseif ($1 == $SignS(Unban)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | Unban $2 %u SSAY $+ %n }
  794. elseif ( ($1 == $SignS(Start)) || ($1 == $SignS(Live)) ) && ($data(%n).Status == ON) && (!%Gather.FloodStart) {
  795. if ($data(%n).Half == First) || ($data(%n).Half == notyet) {
  796. if (A.* iswm %rcon.nick) || ($iif(%Gather.TAG-A,$ifmatch,A.) $+ * iswm %rcon.nick) || (Team A* iswm %rcon.nick) || (Team-A* iswm %rcon.nick) { aset %n Score-CT 0 | aset %n Score-T 0 | Start1stHalf %n | $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-)
  797. if (%rcon.team == CT) { aset %n Live A-B | aset %n ScoreStatus ON | aset %n Half First }
  798. elseif (%rcon.team == TERRORIST) { aset %n Live B-A | aset %n ScoreStatus ON | aset %n Half First | if ($exists(Mvps.ini)) .remini -n Mvps.ini %n }
  799. }
  800. if (B.* iswm %rcon.nick) || ($iif(%Gather.TAG-B,$ifmatch,B.) $+ * iswm %rcon.nick) || (Team B* iswm %rcon.nick) || (Team-B* iswm %rcon.nick) { aset %n Score-CT 0 | aset %n Score-T 0 | aset %n ScoreStatus ON | aset %n Half First | Start1stHalf %n | $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-)
  801. if (%rcon.team == CT) { aset %n Live B-A | aset %n ScoreStatus ON | aset %n Half First }
  802. elseif (%rcon.team == TERRORIST) { aset %n Live A-B | aset %n ScoreStatus ON | aset %n Half First | if ($exists(Mvps.ini)) .remini -n Mvps.ini %n }
  803. }
  804. }
  805. elseif ($data(%n).Half == First-Second) || ($data(%n).Half == Second) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | aset %n Half Second | aset %n ScoreStatus ON | aset %n Score-CT 0 | aset %n Score-T 0 | Start2ndHalf %n }
  806. elseif ($data(%n).Half == Second-MR3) || ($data(%n).Half == MR3) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | aset %n Half MR3 | aset %n ScoreStatus ON | aset %n Score-CT 0 | aset %n Score-T 0 | StartMR3Half %n }
  807. elseif ($data(%n).Half == MR3-MR4) || ($data(%n).Half == MR4) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | aset %n Half MR4 | aset %n ScoreStatus ON | aset %n Score-CT 0 | aset %n Score-T 0 | StartMR4Half %n }
  808. }
  809. ;END - START GATHER
  810. }
  811. }
  812. ;End SAY/SAY_TEAM CHAT
  813. }
  814. }
  815. ;/ShowWindowCmd <num> <steam_id> <rcon.nick> <cmds>
  816. ;$ShowWindowCmd(num,steam_id,rcon.nick,cmds)
  817. alias ShowWindowCmd { aline @Cmds $+ $1 ( $+ $date - $time $+ ) < $+ $3- - $iif($isadmin($2),$acc($v1).lvl,No-admin) $+ > $4- }
  818. alias Noticer { mode %Gather.Channel -N | notice %Gather.Channel $stl($1,$2-) | .timer -m 1 600 mode %Gather.Channel +N }
  819. alias MOVE-T { rcmd $1 admin_quiet 2 | rcmd $1 admin_command admin_execclient $2- setinfo "_vgui_menus" "0" | rcmd $1 admin_command admin_execclient $2- chooseteam | rcmd $1 admin_command admin_execclient $2- menuselect 1 }
  820. alias MOVE-CT { rcmd $1 admin_quiet 2 | rcmd $1 admin_command admin_execclient $2- setinfo "_vgui_menus" "0" | rcmd $1 admin_command admin_execclient $2- chooseteam | rcmd $1 admin_command admin_execclient $2- menuselect 2 }
  821. alias Rates {
  822. ssay $1 Fixing server Rates, Please Wait....
  823. tsay $1 Fixing server Rates, Please Wait....
  824. .timer 1 1 rcmd $1 admin_command admin_rcon sv_maxrate "25000"
  825. .timer 1 1 rcmd $1 admin_command admin_rcon sv_maxupdaterate "101"
  826. .timer 1 1 rcmd $1 admin_command admin_rcon sv_minrate "10000"
  827. .timer 1 1 rcmd $1 admin_command admin_rcon sv_minupdaterate "101"
  828. .timer 1 1 rcmd $1 admin_command admin_rcon sys_ticrate "10000.0"
  829. .timer 1 1 rcmd $1 admin_command admin_rcon sv_maxspeed "920"
  830. .timer 1 1 rcmd $1 admin_command admin_rcon sv_stats "0"
  831. .timer 1 1 rcmd $1 admin_command admin_rcon fps_max "101"
  832. .timer 1 1 rcmd $1 admin_command admin_rcon sv_region "6"
  833. .timer 1 3 rcmd $1 admin_command admin_rcon restart
  834. }
  835. alias Knife { .timer 1 11 csay $1 red Attention - Knife Round | .timer 1 11 ssay $1 *******Good Luck******* | ssay $1 Preparing for Knife Round, Please Wait... | .timer 1 2 MR15 $1 | .timer 1 9 ssay $1 IMPORTANT: Shooting while in kniferound will cause a team win automaticlly. | .timer 1 5 ssay $1 *********KNIFE********* | .timer 1 5 tsay $1 ********* KNIFE ********* }
  836. alias psay { rcmd $1 admin_command admin_psay $2 $3- }
  837. alias csay { rcmd $1 admin_command admin_csay $2- }
  838. alias Guns {
  839. if ($1 == AK47) return 1.00
  840. if ($1 == M4A1) return 1.00
  841. if ($1 == Famas) return 1.00
  842. if ($1 == Galil) return 1.00
  843. if ($1 == AWP) return 1.05
  844. if ($1 == MP5navy) return 1.25
  845. if ($1 == Deagle) return 1.50
  846. if ($1 == Usp) return 1.50
  847. if ($1 == Glock18) return 1.50
  848. if ($1 == Grenade) return 1.80
  849. if ($1 == Aug) return 1.05
  850. if ($1 == SG552) return 1.05
  851. if ($1 == MAC10) return 1.25
  852. if ($1 == P90) return 1.25
  853. if ($1 == TMP) return 1.25
  854. if ($1 == UMP45) return 1.25
  855. if ($1 == G3sg1) return 1.40
  856. if ($1 == M3) return 1.40
  857. if ($1 == XM1014) return 1.40
  858. if ($1 == Elite) return 1.50
  859. if ($1 == FiveSeven) return 1.50
  860. if ($1 == P228) return 1.50
  861. if ($1 == Scout) return 1.60
  862. if ($1 == SG550) return 1.70
  863. if ($1 == M249) return 1.80
  864. if ($1 == Knife) return 2.00
  865. }
  866. alias ShowServer { .remini -n Settings.ini $1 Players-list | unset %num | rcmd $1 users | hl $1 | ShowServerMsg $1 }
  867. alias HL {
  868. Set %Gather.HL-NUM $1
  869. Set %Gather.HL-IP $data($1).server
  870. bset -t &hl 1 $str($chr(255),4) $+ TSource Engine Query
  871. bset &hl $calc($bvar(&hl,0) + 1) 0
  872. sockudp -k HL $replace(%Gather.HL-IP,$chr(58),$chr(32)) &hl
  873. .timer 1 3 unset %Gather.HL-*
  874. }
  875. alias HLB { return $bvar(&HL,1,$bvar(&HL,0)).text }
  876. on *:UDPREAD:HL: {
  877. sockread &HL
  878. breplace &HL 0 254
  879. var %Gather.HL-Players $iif($asc($mid($gettok($HLB,6,254),2,1)),$asc($mid($gettok($HLB,6,254),1,1)) $+ / $+ $asc($mid($gettok($HLB,6,254),2,1)),0/ $+ $asc($mid($gettok($HLB,6,254),1,1)))
  880. var %Gather.HL-Name = $right($gettok($HLB,1,254),$calc($len($gettok($HLB,1,254)) -6))
  881. var %Gather.HL-Map = $gettok($HLB,2,254)
  882. if ($data(%Gather.HL-NUM).Connected == ON) { var %n = %Gather.HL-NUM | msg %Gather.channel $stl(%n,$data(%n).Color2 $+ Hostname: $+ $data(%n).Color1 %Gather.HL-Name $data(%n).Color2 $+ Players: $+ $data(%n).Color1 %Gather.HL-Players $data(%n).Color2 $+ Map: $+ $data(%n).Color1 %Gather.HL-Map $data(%n).Color2 $+ IP: $+ $data(%n).Color1 %Gather.HL-IP) }
  883. }
  884. alias ShowServerMsg {
  885. if ($data($1).Server !== $Null) {
  886. if ($data($1).Connected == ON) { .timer -m 1 500 ShowServerPlayers $1 }
  887. elseif ($data($1).Connected == BadRcon) { msg %Gather.Channel $stl($1,Bad rcon password $chr(44) $+ check your server info again.) }
  888. elseif ($data($1).Connected == Banned) { msg %Gather.Channel $stl($1,Banned from the server.) }
  889. elseif ($data($1).Connected == OFF) { msg %Gather.Channel $stl($1,No connection.) }
  890. }
  891. else { msg %Gather.Channel $stl($1,Server isn't set yet.) }
  892. }
  893. alias ShowServerPlayers {
  894. if ($data($1).Players-list) msg %Gather.Channel $stl($1,$replace($v1,£,,ƒ,))
  895. .remini -n Settings.ini $1 Players-list | unset %num
  896. }
  897. alias Start1stHalf { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 0 | ;.timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,First half is now starting $+ $chr(44) good luck teams.) | ssay $1 Preparing for starting game, Please Wait... | .timer 1 1 ssay $1 Game started after 3 restarts. | .timer 1 1 MR15 $1 | .timer 1 3 rcmd $1 sv_restart 1 | .timer 1 4 rcmd $1 sv_restart 1 | .timer 1 8 tsay $1 1st HALF. Gather started! | .timer 1 8 LiveShow $1 }
  898. alias Start2ndHalf { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 0 | ;.timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,Second half has just started $+ $chr(44) Score is Team-A: $+ $data($1).Color2 $Score($1,A) $+ $data($1).Color1 $+ $chr(44) Team-B: $+ $data($1).Color2 $Score($1,B) $+ $data($1).Color1 $+ .) | ssay $1 Preparing for starting the game, Please Wait... | .timer 1 1 ssay $1 Game started after 3 restarts. | .timer 1 1 MR15 $1 | .timer 1 3 rcmd $1 sv_restart 1 | .timer 1 4 rcmd $1 sv_restart 1 | .timer 1 8 tsay $1 2nd HALF. Gather is LIVE -> Score ( $+ $score($1,a) $+ - $+ $score($1,b) $+ ) | .timer 1 8 LiveShow $1 }
  899. alias StartMR3Half { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 0 | ;.timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,MR3 1st half has just started $+ $chr(44) Score is Team-A: $+ $data($1).Color2 $Score($1,A) $+ $data($1).Color1 $+ $chr(44) Team-B: $+ $data($1).Color2 $Score($1,B) $+ $data($1).Color1 $+ .) | ssay $1 Preparing for starting the game, Please Wait... | .timer 1 1 ssay $1 Game started after 3 restarts. | .timer 1 1 MR3 $1 | .timer 1 3 rcmd $1 sv_restart 1 | .timer 1 4 rcmd $1 sv_restart 1 | .timer 1 8 tsay $1 MR3 - 1st HALF. Gather is LIVE -> Score ( $+ $score($1,a) $+ - $+ $score($1,b) $+ ) | .timer 1 8 LiveShow $1 }
  900. alias StartMR4Half { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 0 | ;.timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,MR3 2nd half has just started $+ $chr(44) Score is Team-A: $+ $data($1).Color2 $Score($1,A) $+ $data($1).Color1 $+ $chr(44) Team-B: $+ $data($1).Color2 $Score($1,B) $+ $data($1).Color1 $+ .) | ssay $1 Preparing for starting the game, Please Wait... | .timer 1 1 ssay $1 Game started after 3 restarts. | .timer 1 1 MR3 $1 | .timer 1 3 rcmd $1 sv_restart 1 | .timer 1 4 rcmd $1 sv_restart 1 | .timer 1 8 tsay $1 MR3 - 2nd HALF. Gather is LIVE -> Score ( $+ $score($1,a) $+ - $+ $score($1,b) $+ ) | .timer 1 8 LiveShow $1 }
  901. alias ShowServerScore { if ($data($1).Status == ON) { ssay $1 Score is - (Team A): $Score($1,a) - (Team B): $Score($1,b) - ( $+ $score($1,half) $+ ) } }
  902. alias SetNewPlayer { .writeini -n Stats.ini STEAMIDS $1 $iif(%Gather.Points,$v1,1000) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
  903. alias End1stHalf {
  904. var %a = $Score($1,A) , %b = $Score($1,B)
  905. aset $1 FirstA %a
  906. aset $1 FirstB %b
  907. aset $1 Half First-Second
  908. aset $1 ScoreStatus OFF
  909. ;.timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,First half is over)
  910. ssay $1 First half is over ( $+ %a $+ - $+ %b $+ )
  911. tsay $1 First half is over ( $+ %a $+ - $+ %b $+ )
  912. }
  913. alias End2ndHalf {
  914. var %a = $Score($1,a) , %b = $Score($1,b)
  915. aset $1 SecondA $Score($1,anow)
  916. aset $1 SecondB $Score($1,bnow)
  917. aset $1 Half Second-MR3
  918. aset $1 ScoreStatus OFF
  919. ;.timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,Second half is over)
  920. ssay $1 Second half is over ( $+ %a $+ - $+ %b $+ )
  921. tsay $1 Second half is over ( $+ %a $+ - $+ %b $+ )
  922. }
  923. alias EndMR3Half {
  924. var %a = $Score($1,a) , %b = $Score($1,b)
  925. aset $1 MR3A $score($1,anow)
  926. aset $1 MR3B $score($1,bnow)
  927. aset $1 Half MR3-MR4
  928. aset $1 ScoreStatus OFF
  929. ;.timer 1 $iif(%Gather.Timer,$v1,0) msg %Gather.Channel $stl($1,MR3 1st half is over)
  930. ssay $1 MR3.1st half is over ( $+ %a $+ - $+ %b $+ )
  931. tsay $1 MR3.1st half is over ( $+ %a $+ - $+ %b $+ )
  932. }
  933.  
  934. alias SWAP { rcmd $1 allow_client_exec 1 | rcmd $1 admin_quiet 2 | rcmd $1 admin_command admin_execall setinfo "_vgui_menus" "0" | rcmd $1 admin_command admin_execteam 1 chooseteam | rcmd $1 admin_command admin_execteam 1 menuselect 2 | rcmd $1 admin_command admin_execteam 2 chooseteam | rcmd $1 admin_command admin_execteam 2 menuselect 1 }
  935. ;/aset <num> <prop> <string>
  936. alias aset { .writeini -n Settings.ini $1 $2 $3- }
  937. ;Stats.ini file
  938. ;[STEAMIDS]
  939. ;(37 things) STEAM_ID=Points Mvps kills deaths plants defuses tks Gathers Last AK47 M4A1 Famas Galil AWP MP5navy Deagle Usp Glock18 Grenade Aug SG552 MAC10 P90 TMP UMP45 G3sg1 M3 XM1014 Elite FiveSeven P228 Scout SG550 M249 Knife Ace MiniAce
  940.  
  941. alias weapons { return AK47 M4A1 Famas Galil AWP MP5navy Deagle Usp Glock18 Grenade Aug SG552 MAC10 P90 TMP UMP45 G3sg1 M3 XM1014 Elite FiveSeven P228 Scout SG550 M249 Knife }
  942. ;$Stats(STEAM_ID).Points
  943. ;/Stats <inc/dec> <steam_id> <prop> <points>
  944.  
  945. alias Stats {
  946. if ($prop) {
  947. if ($prop == all) { return $readini(Stats.ini,STEAMIDS,$1) }
  948. elseif ($prop == Nick) { return $iif($readini(Stats.ini,NICKS,$1),$v1,no nick) }
  949. elseif ($prop == Points) { return $gettok($readini(Stats.ini,STEAMIDS,$1),1,32) }
  950. elseif ($prop == Mvps) { return $gettok($readini(Stats.ini,STEAMIDS,$1),2,32) }
  951. elseif ($prop == kills) { return $gettok($readini(Stats.ini,STEAMIDS,$1),3,32) }
  952. elseif ($prop == deaths) { return $gettok($readini(Stats.ini,STEAMIDS,$1),4,32) }
  953. elseif ($prop == plants) { return $gettok($readini(Stats.ini,STEAMIDS,$1),5,32) }
  954. elseif ($prop == defuses) { return $gettok($readini(Stats.ini,STEAMIDS,$1),6,32) }
  955. elseif ($prop == tks) { return $gettok($readini(Stats.ini,STEAMIDS,$1),7,32) }
  956. elseif ($prop == gathers) { return $gettok($readini(Stats.ini,STEAMIDS,$1),8,32) }
  957. elseif ($prop == last) { return $gettok($readini(Stats.ini,STEAMIDS,$1),9,32) }
  958. elseif ($prop == aces) { return $gettok($readini(Stats.ini,STEAMIDS,$1),36,32) }
  959. elseif ($prop == miniaces) { return $gettok($readini(Stats.ini,STEAMIDS,$1),37,32) }
  960. elseif ($prop == bans) { return $gettok($readini(Stats.ini,STEAMIDS,$1),38,32) }
  961. elseif ($istok($weapons,$prop,32)) { var %c = $calc(9 + $findtok($weapons,$prop,32)) | return $gettok($readini(Stats.ini,STEAMIDS,$1),%c,32) }
  962. }
  963. else {
  964. var %p = $iif($4,$4,1)
  965. if ($3 == Points) { .writeini -n Stats.ini STEAMIDS $2 $calc($gettok($readini(Stats.ini,STEAMIDS,$2),1,32) $iif($1 == inc,+,-) %p) $gettok($readini(Stats.ini,STEAMIDS,$2),2-,32) }
  966. elseif ($istok(Points Mvps Kills deaths plants defuses tks gathers last aces miniaces bans,$3,32)) { var %c = $GetNumTok($3) | .writeini -n Stats.ini STEAMIDS $2 $gettok($readini(Stats.ini,STEAMIDS,$2),1- $+ $calc(%c - 1),32) $calc($gettok($readini(Stats.ini,STEAMIDS,$2),%c,32) $iif($1 == inc,+,-) %p) $gettok($readini(Stats.ini,STEAMIDS,$2),$calc(%c + 1) $+ -,32) }
  967. elseif ($istok($weapons,$3,32)) { var %c = $calc(9 + $findtok($weapons,$3,32)) | .writeini -n Stats.ini STEAMIDS $2 $gettok($readini(Stats.ini,STEAMIDS,$2),1- $+ $calc(%c - 1),32) $calc($gettok($readini(Stats.ini,STEAMIDS,$2),%c,32) $iif($1 == inc,+,-) %p) $gettok($readini(Stats.ini,STEAMIDS,$2),$calc(%c + 1) $+ -,32) }
  968. }
  969. }
  970. alias GetNumTok {
  971. if ($1 == Points) { return 1 }
  972. elseif ($1 == Mvps) { return 2 }
  973. elseif ($1 == kills) { return 3 }
  974. elseif ($1 == deaths) { return 4 }
  975. elseif ($1 == plants) { return 5 }
  976. elseif ($1 == defuses) { return 6 }
  977. elseif ($1 == tks) { return 7 }
  978. elseif ($1 == gathers) { return 8 }
  979. elseif ($1 == last) { return 9 }
  980. elseif ($1 == aces) { return 36 }
  981. elseif ($1 == miniaces) { return 37 }
  982. elseif ($1 == bans) { return 38 }
  983. }
  984. alias clr {
  985. var %CLR.TEMP = $strip($gettok($1,1,34))
  986. if ($prop == Steam) return $gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)
  987. 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)
  988. 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)))
  989. elseif ($prop == Said) return $strip($gettok($1,3,34))
  990. 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)))
  991. elseif ($prop == Team) return $remove($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),2,62),<)
  992. 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),<)
  993. 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)
  994. elseif ($prop == Weapon) || ($prop == Gun) return $gettok($1,5,34)
  995. Return $gettok($1,2,34)
  996. }
  997. ;$Score(Num,Team)
  998. alias Score {
  999. if ($2 == a) {
  1000. if ($data($1).Status == ON) {
  1001. if ($data($1).Half == notyet) { return notset }
  1002. elseif ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1003. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-CT }
  1004. if ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-T }
  1005. if ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1006. if ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1007. if ($data($1).Live == A-B) && ($data($1).Half == Second) { return $calc($data($1).Score-T + $data($1).FirstA) }
  1008. if ($data($1).Live == B-A) && ($data($1).Half == Second) { return $calc($data($1).Score-CT + $data($1).FirstA) }
  1009. if ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstA + $data($1).SecondA) }
  1010. if ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstA + $data($1).SecondA) }
  1011. if ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $calc($data($1).Score-T + $data($1).FirstA + $data($1).SecondA) }
  1012. if ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $calc($data($1).Score-CT + $data($1).FirstA + $data($1).SecondA) }
  1013. if ($data($1).Live == B-A) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-T + $data($1).FirstA + $data($1).SecondA) }
  1014. if ($data($1).Live == A-B) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-CT + $data($1).FirstA + $data($1).SecondA) }
  1015. if ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $calc($data($1).Score-CT + $data($1).FirstA + $data($1).SecondA + $data($1).MR3A) }
  1016. if ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $calc($data($1).Score-T + $data($1).FirstA + $data($1).SecondA + $data($1).MR3A) }
  1017. }
  1018. }
  1019. else { return None }
  1020. }
  1021. elseif ($2 == anow) {
  1022. if ($data($1).Status == ON) {
  1023. if ($data($1).Half == notyet) { return notset }
  1024. if ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1025. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-CT }
  1026. if ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-T }
  1027. if ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1028. if ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1029. if ($data($1).Live == A-B) && ($data($1).Half == Second) { return $data($1).Score-T }
  1030. if ($data($1).Live == B-A) && ($data($1).Half == Second) { return $data($1).Score-CT }
  1031. if ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $data($1).SecondA }
  1032. if ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $data($1).SecondA }
  1033. if ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $data($1).Score-CT }
  1034. if ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $data($1).Score-T }
  1035. if ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $data($1).Score-T }
  1036. if ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $data($1).Score-CT }
  1037. }
  1038. }
  1039. else { return None }
  1040. }
  1041. elseif ($2 == b) {
  1042. if ($data($1).Status == ON) {
  1043. if ($data($1).Half == notyet) { return notset }
  1044. if ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1045. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-T }
  1046. if ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-CT }
  1047. if ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1048. if ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1049. if ($data($1).Live == A-B) && ($data($1).Half == Second) { return $calc($data($1).Score-CT + $data($1).FirstB) }
  1050. if ($data($1).Live == B-A) && ($data($1).Half == Second) { return $calc($data($1).Score-T + $data($1).FirstB) }
  1051. if ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstB + $data($1).SecondB) }
  1052. if ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstB + $data($1).SecondB) }
  1053. if ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $calc($data($1).Score-CT + $data($1).FirstB + $data($1).SecondB) }
  1054. if ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $calc($data($1).Score-T + $data($1).FirstB + $data($1).SecondB) }
  1055. if ($data($1).Live == B-A) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-CT + $data($1).FirstB + $data($1).SecondB) }
  1056. if ($data($1).Live == A-B) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-T + $data($1).FirstB + $data($1).SecondB) }
  1057. if ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $calc($data($1).Score-T + $data($1).FirstB + $data($1).SecondB + $data($1).MR3B) }
  1058. if ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $calc($data($1).Score-CT + $data($1).FirstB + $data($1).SecondB + $data($1).MR3B) }
  1059. }
  1060. }
  1061. else { return None }
  1062. }
  1063. elseif ($2 == bnow) {
  1064. if ($data($1).Status == ON) {
  1065. if ($data($1).Half == notyet) { return notset }
  1066. if ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1067. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-T }
  1068. if ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-CT }
  1069. if ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1070. if ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1071. if ($data($1).Live == A-B) && ($data($1).Half == Second) { return $data($1).Score-CT }
  1072. if ($data($1).Live == B-A) && ($data($1).Half == Second) { return $data($1).Score-T }
  1073. if ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $data($1).SecondB }
  1074. if ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $data($1).SecondB }
  1075. if ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $data($1).Score-T }
  1076. if ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $data($1).Score-CT }
  1077. if ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $data($1).Score-CT }
  1078. if ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $data($1).Score-T }
  1079. }
  1080. }
  1081. else { return None }
  1082. }
  1083. elseif ($2 == Half) {
  1084. if ($data($1).Status == ON) {
  1085. if ($data($1).Half == notyet) { return notyet }
  1086. if ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1087. if ($data($1).Half == First) && ($calc($data($1).Score-CT + $data($1).Score-T) == 14) { return 1st half }
  1088. if ($data($1).Half == First) && ($calc($data($1).Score-CT + $data($1).Score-T) !== 14) { return 1st half }
  1089. if ($data($1).Half == First-Second) { return 2nd half }
  1090. if ($data($1).Half == Second) { return 2nd half }
  1091. if ($data($1).Half == Second-MR3) { return MR3 1st.half }
  1092. if ($data($1).Half == MR3) { return MR3 1st.half }
  1093. if ($data($1).Half == MR3-MR4) { return MR3 2nd.half }
  1094. if ($data($1).Half == MR4) { return MR3 2nd.half }
  1095. }
  1096. }
  1097. else { return None }
  1098. }
  1099. }
  1100. alias LVLStyled { return $upper($left($1,1)) $+ $lower($right($1,$calc($len($1)-1))) }
  1101. ;/AddBan <Steam_ID/Nick> <User> <SSAY[num]/CHAN> <Reason>
  1102. alias Addban {
  1103. var %user = $2
  1104. var %lvl = $acc($2).lvl
  1105. var %steam = $iif($CheckSteam($1),$1,$findsteam($1))
  1106. if ($readini(Banned.ini,%steam,steam)) {
  1107. if ($3 == CHAN) msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+ %steam $+ %Gather.Color1 $+ ) Is already banned by $+ %Gather.Color2 $readini(Banned.ini,%steam,by) %Gather.Color1 $+ ( $+ %Gather.Color2 $+  $+ $LVLStyled($acc($readini(Banned.ini,%steam,by)).lvl) $+ %Gather.Color1 $+ ))
  1108. else ssay $remove($3,SSAY) $stats(%steam).nick ( $+ %steam $+ ) Is already banned by $readini(Banned.ini,%steam,by) ( $+ $LVLStyled($acc($readini(Banned.ini,%steam,by)).lvl) $+ )
  1109. halt
  1110. }
  1111. if ($isadmin(%steam)) {
  1112. var %ban-user = $v1
  1113. var %ban-lvl = $acc($v1).lvl
  1114. var %lvl-num = $replace(%lvl,Owner,4,Manager,3,Master,2,Admin,1)
  1115. var %ban-lvl-num = $replace(%ban-lvl,Owner,4,Manager,3,Master,2,Admin,1)
  1116. if (%lvl-num > %ban-lvl-num) || ( (%lvl-num == 4) && (%ban-lvl-num == 4) ) {
  1117. .writeini -n Banned.ini %steam steam %steam | .writeini -n Banned.ini %steam reason $iif($4-,$4-,no reason) | .writeini -n Banned.ini %steam at $date $time | .writeini -n Banned.ini %steam by $2
  1118. if (!$ini(Stats.ini,STEAMIDS,%steam)) { SetNewPlayer %steam }
  1119. stats inc %steam bans
  1120. if (SSAY isin $3) ssay $remove($3,SSAY) ( $+ $LVLStyled(%ban)-lvl Ban) $iif($Stats(%steam).nick !== no nick,$v1,%ban-user) ( $+ %steam $+ ) by: $2 with reason: $iif($4-,$4-,no reason)
  1121. else msg %Gather.Channel $stlmain(( $+ %Gather.Color2 $+ Ban $+ %Gather.Color1 $+ ) $iif($Stats(%steam).nick !== no nick,$v1,%ban-user) ( $+ %Gather.Color2 $+ %steam $+ %Gather.Color1 $+ ) by: $+ %Gather.Color2 $2 %Gather.Color1 $+ with reason: $+ %Gather.Color2 $iif($4-,$4-,no reason) $+ .)
  1122. var %x = 1 | while ($ini(Settings.ini,%x)) { .timer -m 1 $calc(%x * 100) rcmd %x admin_command admin_ban %steam | inc %x }
  1123. }
  1124. else {
  1125. if ($3 == CHAN) { msg %Gather.Channel $stlmain((!) $+ %Gather.Color2 %lvl $+ %Gather.Color1 $+ ( $+ %user $+ ) is not allowed to ban $+ %Gather.Color2 %ban-lvl $+ %Gather.Color1 $+ ( $+ %ban-user $+ )) }
  1126. else { ssay $remove($3,SSAY) (!) %lvl $+ ( $+ %user $+ ) is not allowed to ban %ban-lvl $+ ( $+ %ban-user $+ ) }
  1127. }
  1128. }
  1129. else {
  1130. if (%steam) {
  1131. .writeini -n Banned.ini %steam steam %steam | .writeini -n Banned.ini %steam reason $iif($4-,$4-,no reason) | .writeini -n Banned.ini %steam at $date $time | .writeini -n Banned.ini %steam by $2
  1132. if (!$ini(Stats.ini,STEAMIDS,%steam)) { SetNewPlayer %steam }
  1133. stats inc %steam bans
  1134. if (SSAY isin $3) ssay $remove($3,SSAY) (BANNED) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 reason: $iif($4-,$4-,no reason)
  1135. else msg %Gather.Channel $stlmain(( $+ %Gather.Color2 $+ BANNED $+ %Gather.Color1 $+ ) $Stats(%steam).nick ( $+ %Gather.Color2 $+ %steam $+ %Gather.Color1 $+ ) by: $+ %Gather.Color2 $2 %Gather.Color1 $+ with reason: $+ %Gather.Color2 $iif($4-,$4-,no reason) $+ .)
  1136. var %x = 1 | while ($ini(Settings.ini,%x)) { .timer -m 1 $calc(%x * 100) rcmd %x admin_command admin_ban %steam | inc %x }
  1137. }
  1138. }
  1139. }
  1140. ;/Addbantime <Steam_ID/Nick> <User> <SSAY4/CHAN> <Days> <Reason>
  1141. alias Addbantime {
  1142. var %user = $2
  1143. var %lvl = $acc($2).lvl
  1144. var %steam = $iif($CheckSteam($1),$1,$findsteam($1))
  1145. if ($readini(Banned.ini,%steam,steam)) {
  1146. if ($3 == CHAN) msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+ %steam $+ %Gather.Color1 $+ ) Is already banned by $+ %Gather.Color2 $readini(Banned.ini,%steam,by) %Gather.Color1 $+ ( $+ %Gather.Color2 $+  $+ $LVLStyled($acc($readini(Banned.ini,%steam,by)).lvl) $+ %Gather.Color1 $+ ))
  1147. else ssay $remove($3,SSAY) $stats(%steam).nick ( $+ %steam $+ ) Is already banned by $readini(Banned.ini,%steam,by) ( $+ $LVLStyled($acc($readini(Banned.ini,%steam,by)).lvl) $+ )
  1148. halt
  1149. }
  1150. if ($isadmin(%steam)) {
  1151. var %ban-user = $v1
  1152. var %ban-lvl = $acc($v1).lvl
  1153. var %lvl-num = $replace(%lvl,Owner,4,Manager,3,Master,2,Admin,1)
  1154. var %ban-lvl-num = $replace(%ban-lvl,Owner,4,Manager,3,Master,2,Admin,1)
  1155. if (%lvl-num > %ban-lvl-num) || ( (%lvl-num == 4) && (%ban-lvl-num == 4) ) {
  1156. .writeini -n Banned.ini %steam steam %steam
  1157. .writeini -n Banned.ini %steam reason $iif($5-,$5-,no reason)
  1158. .writeini -n Banned.ini %steam at $date $time
  1159. .writeini -n Banned.ini %steam by $2
  1160. .writeini -n Banned.ini %steam Days $4
  1161. if (!$ini(Stats.ini,STEAMIDS,%steam)) { SetNewPlayer %steam }
  1162. stats inc %steam bans
  1163. if (SSAY isin $3) ssay $remove($3,SSAY) ( $+ %ban-lvl ban) $iif($Stats(%steam).nick !== no nick,$v1,%ban-user) ( $+ %steam $+ ) by: $2 with reason: $iif($5-,$5-,no reason) For: $4 days.
  1164. else msg %Gather.Channel $stlmain(( $+ %Gather.Color2 $+ BANNED $+ %Gather.Color1 $+ ) $iif($Stats(%steam).nick !== no nick,$v1,%ban-user) ( $+ %Gather.Color2 $+ %steam $+ %Gather.Color1 $+ ) by: $+ %Gather.Color2 $2 %Gather.Color1 $+ with reason: $+ %Gather.Color2 $iif($5-,$5-,no reason) %Gather.Color1 $+ For: $+ %Gather.Color2 $4 days.)
  1165. var %x = 1 | while ($ini(Settings.ini,%x)) { .timer -m 1 $calc(%x * 100) rcmd %x admin_command admin_ban %steam | inc %x }
  1166. }
  1167. else {
  1168. if ($3 == CHAN) { msg %Gather.Channel $stlmain((!) %lvl $+ ( $+ %user $+ ) is not allowed to ban %ban-lvl $+ ( $+ %ban-user $+ )) }
  1169. else { ssay $remove($3,SSAY) (!) %lvl $+ ( $+ %user $+ ) is not allowed to ban %ban-lvl $+ ( $+ %ban-user $+ ) }
  1170. }
  1171. }
  1172. else {
  1173. if (%steam) {
  1174. .writeini -n Banned.ini %steam steam %steam
  1175. .writeini -n Banned.ini %steam reason $iif($5-,$5-,no reason)
  1176. .writeini -n Banned.ini %steam at $date $time
  1177. .writeini -n Banned.ini %steam by $2
  1178. .writeini -n Banned.ini %steam Days $4
  1179. if (!$ini(Stats.ini,STEAMIDS,%steam)) { SetNewPlayer %steam }
  1180. stats inc %steam bans
  1181. if (SSAY isin $3) ssay $remove($3,SSAY) (BANNED) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 reason: $iif($5-,$5-,no reason) For: $4 days.
  1182. else msg %Gather.Channel $stlmain(( $+ %Gather.Color2 $+ BANNED $+ %Gather.Color1 $+ ) $Stats(%steam).nick ( $+ %Gather.Color2 $+ %steam $+ %Gather.Color1 $+ ) by: $+ %Gather.Color2 $2 %Gather.Color1 $+ with reason: $+ %Gather.Color2 $iif($5-,$5-,no reason) %Gather.Color1 $+ For: $+ %Gather.Color2 $4 days.)
  1183. var %x = 1 | while ($ini(Settings.ini,%x)) { .timer -m 1 $calc(%x * 100) rcmd %x admin_command admin_ban %steam | inc %x }
  1184. }
  1185. }
  1186. }
  1187. ;/Unban <Steam_ID/Nick> <User> <SSAY4/CHAN>
  1188. alias Unban {
  1189. var %steam = $iif($CheckSteam($1),$1,$findsteam($1))
  1190. var %user = $2
  1191. var %lvl = $acc($2).lvl
  1192. var %ban-user = $readini(Banned.ini,%steam,by)
  1193. var %ban-lvl = $acc(%ban-user).lvl
  1194. var %ban-lvl-num = $replace(%ban-lvl,Owner,4,Manager,3,Master,2,Admin,1)
  1195. var %lvl-num = $replace(%lvl,Owner,4,Manager,3,Master,2,Admin,1)
  1196. if (%lvl-num < %ban-lvl-num) && (%steam) {
  1197. if ($3 == CHAN) msg %Gather.Channel $stlmain((!) Only $+ %Gather.Color2 $replace(%ban-lvl-num,1,Admins\Masters\Managers\Owners,2,Masters\Managers\Owners,3,Managers\Owners,4,Owners) %Gather.Color1 $+ can remove this $+ %Gather.Color2 %steam %Gather.Color1 $+ ban.)
  1198. else ssay $remove($3,SSAY) (!) Only $replace(%ban-lvl-num,1,Admins\Masters\Managers\Owners,2,Masters\Managers\Owners,3,Managers\Owners,4,Owners) can remove this %steam ban.
  1199. halt
  1200. }
  1201. if (%steam) {
  1202. if ($3 == CHAN) msg %Gather.Channel $stlmain(( $+ %Gather.Color2 $+ UN-BANNED $+ %Gather.Color1 $+ ) $Stats(%steam).nick ( $+ %Gather.Color2 $+ %steam $+ %Gather.Color1 $+ ) by: $+ %Gather.Color2 $2 %Gather.Color1 $+ reason was: $+ %Gather.Color2 $iif($readini(Banned.ini,%steam,reason),$ifmatch,no reason))
  1203. else ssay $remove($3,SSAY) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 reason was: $iif($readini(Banned.ini,%steam,reason),$ifmatch,no reason)
  1204. .remini -n Banned.ini %steam
  1205. var %x = 1 | while ($ini(Settings.ini,%x)) { .timer -m 1 $calc(%x * 100) rcmd %x admin_command admin_unban %steam | inc %x }
  1206. }
  1207. }
  1208. alias MR15 {
  1209. rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
  1210. rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4timer 35;mr122"
  1211. rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 800;mr123"
  1212. rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
  1213. rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
  1214. rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  1215. rcmd $1 mr122k
  1216. }
  1217. alias PRAC {
  1218. RCMD $1 alias prac122k "admin_ignore_immunity 1;default_access 0;Prac1"
  1219. RCMD $1 alias Prac1 "mp_forcecamera 0;mp_forcechasecam 0;mp_c4timer 35;Prac2"
  1220. RCMD $1 alias Prac2 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 16000;Prac3"
  1221. RCMD $1 alias Prac3 "mp_autokick 0;mp_friendlyfire 0;mp_freezetime 0;Prac4"
  1222. RCMD $1 alias Prac4 "mp_roundtime 7;mp_buytime 9;mp_fadetoblack 0;Prac5"
  1223. RCMD $1 alias Prac5 "sv_alltalk 1;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  1224. RCMD $1 prac122k
  1225. }
  1226. alias MR3 {
  1227. rcmd $1 alias mr122k "admin_ignore_immunity 1;default_access 0;mr121"
  1228. rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4timer 35;mr122"
  1229. rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 4000;mr123"
  1230. rcmd $1 alias mr123 "mp_autokick 0;mp_friendlyfire 1;mp_freezetime 8;mr124"
  1231. rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
  1232. rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  1233. rcmd $1 mr122k
  1234. }
  1235. ;$rank(STEAM_ID) returns Rank number
  1236. alias rank { var %x = 1 | .close -@ @Rank | .window -h @Rank | while ($ini(Stats.ini,STEAMIDS,%x)) { echo @Rank $v1 $Stats($v1).Points | inc %x } | filter -cwwtue 2 32 @Rank @Rank * | var %rank = $fline(@Rank,$+(*,$1,*),1) | .close -@ @Rank | return %rank }
  1237. ;$findsteam(NICK) returns STEAM_ID
  1238. alias findsteam {
  1239. var %x = 1
  1240. while ($ini(Stats.ini,NICKS,%x)) {
  1241. if ($1 isin $readini(Stats.ini,n,NICKS,$ini(Stats.ini,NICKS,%x))) { return $ini(Stats.ini,NICKS,%x) }
  1242. inc %x
  1243. }
  1244. }
  1245. alias ShowRank {
  1246. if (STEAM_*:*:* iswm $1) {
  1247. if ($ini(Stats.ini,STEAMIDS,$1)) { var %steam = $1 }
  1248. else { PlayerNotFound $1- }
  1249. }
  1250. else {
  1251. if ($findsteam($1-)) { var %steam = $v1 }
  1252. else { PlayerNotFound $1- }
  1253. }
  1254. if (%steam) { msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+  $+ %steam $+ %Gather.Color1 $+ ) Rank: $+ %Gather.Color2 $rank(%steam) $+ / $+ $ini(Stats.ini,STEAMIDS,0) %Gather.Color1 $+ Points: $+ %Gather.Color2 $Stats(%steam).Points %Gather.Color1 $+ Mvps: $+ %Gather.Color2 $Stats(%steam).mvps %Gather.Color1 $+ Kills: $+ %Gather.Color2 $Stats(%steam).kills %Gather.Color1 $+ Deaths: $+ %Gather.Color2 $Stats(%steam).deaths ) }
  1255. }
  1256. alias ShowBans {
  1257. if (STEAM_*:*:* iswm $1) {
  1258. if ($ini(Stats.ini,STEAMIDS,$1)) { var %steam = $1 }
  1259. else { PlayerNotFound $1- }
  1260. }
  1261. else {
  1262. if ($findsteam($1-)) { var %steam = $v1 }
  1263. else { PlayerNotFound $1- }
  1264. }
  1265. if (%steam) { msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+  $+ %steam $+ %Gather.Color1 $+ ) has banned $+ %Gather.Color2 $stats(%steam).bans %Gather.Color1 $+ times.) }
  1266. }
  1267. alias ShowMvp {
  1268. if (STEAM_*:*:* iswm $1) {
  1269. if ($ini(Stats.ini,STEAMIDS,$1)) { var %steam = $1 }
  1270. else { PlayerNotFound $1 }
  1271. }
  1272. else {
  1273. if ($findsteam($1-)) { var %steam = $v1 }
  1274. else { PlayerNotFound $1 }
  1275. }
  1276. if (%steam) { msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+  $+ %steam $+ %Gather.Color1 $+ ) Mvps: $+ %Gather.Color2 $Stats(%steam).mvps) }
  1277. }
  1278. alias ShowRankServer {
  1279. if ($CheckSteam($3)) { if ($ini(Stats.ini,STEAMIDS,$3)) { var %steam = $3 } | else { PlayerNotFoundServer $3- } }
  1280. else { if ($findsteam($3-)) { var %steam = $v1 } | else { PlayerNotFoundServer $3- } }
  1281. if (%steam) { psay $1 $2 $Stats(%steam).nick ( $+ %steam $+ ) Rank: $rank(%steam) Points: $Stats(%steam).Points Mvps: $Stats(%steam).Mvps Kills: $Stats(%steam).Kills Deaths: $Stats(%steam).deaths }
  1282. }
  1283. alias ShowStats {
  1284. if (STEAM_*:*:* iswm $1) { if ($ini(Stats.ini,STEAMIDS,$1)) { var %steam = $1 } | else { PlayerNotFound $1- } }
  1285. else { if ($findsteam($1-)) { var %steam = $v1 } | else { PlayerNotFound $1- } }
  1286. if (%steam) {
  1287. msg %Gather.Channel $stlmain(Statistics for $+ %Gather.Color2 $stats(%STEAM).nick %Gather.Color1 $+ ( $+ %Gather.Color2 $+ %STEAM $+ %Gather.Color1 $+ ) $+ %Gather.Color1 Rank: $+ %Gather.Color2 $rank(%steam) $+ %Gather.Color1 $+ / $+ $ini(Stats.ini,STEAMIDS,0) %Gather.Color1 $+ Points: $+ %Gather.Color2 $stats(%STEAM).points %Gather.Color1 $+ K/D: $+ %Gather.Color2 $left($calc($stats(%STEAM).kills / $stats(%STEAM).deaths),5))
  1288. msg %Gather.Channel $stlmain(Played on: $+ %Gather.Color2 $Stats(%STEAM).Gathers %Gather.Color1 $+ Gathers so far. (Last one was number $+ %Gather.Color2 $Stats(%STEAM).last $+ %Gather.Color1 $+ ))
  1289. .timer -m 1 500 msg %Gather.Channel $stlmain(Kills: $+ %Gather.Color2 $stats(%STEAM).kills %Gather.Color1 $+ Deaths: $+ %Gather.Color2 $stats(%STEAM).deaths %Gather.Color1 $+ Accuracy: $+ %Gather.Color2 $calc($stats(%STEAM).kills / $stats(%STEAM).deaths) %Gather.Color1 $+ Plants: $+ %Gather.Color2 $stats(%STEAM).plants %Gather.Color1 $+ M4A1: $+ %Gather.Color2 $stats(%STEAM).m4a1 %Gather.Color1 $+ AK47: $+ %Gather.Color2 $stats(%STEAM).ak47 %Gather.Color1 $+ AWP: $+ %Gather.Color2 $stats(%STEAM).awp)
  1290. .timer -m 1 500 msg %Gather.Channel $stlmain(Deagle: $+ %Gather.Color2 $stats(%STEAM).DEAGLE %Gather.Color1 $+ Usp: $+ %Gather.Color2 $stats(%STEAM).USP %Gather.Color1 $+ Famas: $+ %Gather.Color2 $stats(%STEAM).famas %Gather.Color1 $+ Galil: $+ %Gather.Color2 $Stats(%STEAM).galil %Gather.Color1 $+ Glock: $+ %Gather.Color2 $stats(%STEAM).glock18 %Gather.Color1 $+ Knife: $+ %Gather.Color2 $stats(%STEAM).Knife %Gather.Color1 $+ Tks: $+ %Gather.Color2 $stats(%STEAM).Tks %Gather.Color1 $+ Aces: $+ %Gather.Color2 $Stats(%STEAM).aces %Gather.Color1 $+ MiniAces: $+ %Gather.Color2 $Stats(%STEAM).miniaces)
  1291. }
  1292. }
  1293. alias ShowStatsServer {
  1294. if ($CheckSteam($3)) {
  1295. if ($ini(Stats.ini,STEAMIDS,$3)) { var %steam = $3 }
  1296. else { PlayerNotFoundServer $3 }
  1297. }
  1298. else { if ($findsteam($3-)) { var %steam = $v1 } | else { PlayerNotFoundServer $3 } }
  1299. if (%steam) {
  1300. psay $1 $2 Stats Of $Stats(%steam).nick ( $+ %steam $+ ): $chr(35) $+ $rank(%steam) Points: $Stats(%steam).Points Mvps: $Stats(%steam).Mvps K/D: $left($calc($stats(%STEAM).kills / $stats(%STEAM).deaths),5) $+ .
  1301. psay $1 $2 Played on: $Stats(%steam).Gathers Gathers so far. (Last gather was number $Stats(%steam).Last $+ )
  1302. psay $1 $2 Kills: $Stats(%steam).kills Deaths: $Stats(%steam).deaths Plants: $Stats(%steam).plants M4A1: $Stats(%steam).M4A1 AK47: $Stats(%steam).ak47 Awp: $Stats(%steam).Awp
  1303. psay $1 $2 Deagle: $Stats(%steam).Deagle Usp: $Stats(%steam).Usp Tks: $Stats(%steam).tks Knife: $Stats(%steam).Knife Aces: $Stats(%steam).aces Miniaces: $Stats(%steam).Miniaces
  1304. }
  1305. }
  1306. alias PlayerNotFound { msg %Gather.Channel $stlmain(The player ( $+ %Gather.Color2 $+  $+ $1- $+ %Gather.Color1 $+ ) is not found.) }
  1307. alias PlayerNotFoundServer { ssay $1 The player ( $+ $2- $+ ) is not found. }
  1308. alias Top {
  1309. if ($1 == players) {
  1310. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | goto END }
  1311. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1312. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s).Points | inc %x }
  1313. filter -cwwteu 2 32 @Bot @Bot
  1314. if ($ini(Stats.ini,STEAMIDS,0) < %Gather.TopNumber) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1315. elseif ($ini(Stats.ini,STEAMIDS,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1316. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ Players $+ %Gather.Color1 out of $ini(Stats.ini,STEAMIDS,0) known players:)
  1317. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $Stats($gettok($line(@Bot,%o),1,32)).nick $+ %Gather.Color1 $chr(44) $+ Score: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32)) | inc %o | dec %z }
  1318. :END
  1319. }
  1320. elseif ($1 == noobs) {
  1321. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | GOTO END }
  1322. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1323. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s).Points | inc %x }
  1324. filter -cwwtu 2 32 @Bot @Bot
  1325. if ($ini(Stats.ini,STEAMIDS,0) < %Gather.TopNumber) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1326. elseif ($ini(Stats.ini,STEAMIDS,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1327. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ Noobs $+ %Gather.Color1 out of $ini(Stats.ini,STEAMIDS,0) known players:)
  1328. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $Stats($gettok($line(@Bot,%o),1,32)).nick $+ %Gather.Color1 $chr(44) $+ Score: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32)) | inc %o | dec %z }
  1329. :END
  1330. }
  1331. elseif ($1 == mvps) {
  1332. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | GOTO END }
  1333. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1334. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s).mvps | inc %x }
  1335. filter -cwwteu 2 32 @Bot @Bot
  1336. if ($ini(Stats.ini,STEAMIDS,0) < %Gather.TopNumber) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1337. elseif ($ini(Stats.ini,STEAMIDS,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1338. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ MVPS $+ %Gather.Color1 out of $ini(Stats.ini,STEAMIDS,0) known players:)
  1339. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $Stats($gettok($line(@Bot,%o),1,32)).nick $+ %Gather.Color1 $chr(44) $+ MVPS: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32)) | inc %o | dec %z }
  1340. :END
  1341. }
  1342. elseif ($1 == aces) {
  1343. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | GOTO END }
  1344. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1345. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s).aces | inc %x }
  1346. filter -cwwteu 2 32 @Bot @Bot
  1347. if ($ini(Stats.ini,STEAMIDS,0) < %Gather.TopNumber) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1348. elseif ($ini(Stats.ini,STEAMIDS,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1349. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ Aces $+ %Gather.Color1 out of $ini(Stats.ini,STEAMIDS,0) known players:)
  1350. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $Stats($gettok($line(@Bot,%o),1,32)).nick $+ %Gather.Color1 $chr(44) $+ Aces: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32)) | inc %o | dec %z }
  1351. :END
  1352. }
  1353. elseif ($1 == miniaces) {
  1354. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | GOTO END }
  1355. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1356. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s).miniaces | inc %x }
  1357. filter -cwwteu 2 32 @Bot @Bot
  1358. if ($ini(Stats.ini,STEAMIDS,0) < %Gather.TopNumber) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1359. elseif ($ini(Stats.ini,STEAMIDS,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1360. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ MiniAces $+ %Gather.Color1 out of $ini(Stats.ini,STEAMIDS,0) known players:)
  1361. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $Stats($gettok($line(@Bot,%o),1,32)).nick $+ %Gather.Color1 $chr(44) $+ MiniAces: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32)) | inc %o | dec %z }
  1362. :END
  1363. }
  1364. elseif ($1 == gathers) {
  1365. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | GOTO END }
  1366. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1367. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s).gathers | inc %x }
  1368. filter -cwwteu 2 32 @Bot @Bot
  1369. if ($ini(Stats.ini,STEAMIDS,0) < %Gather.TopNumber) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1370. elseif ($ini(Stats.ini,STEAMIDS,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1371. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ Gathers $+ %Gather.Color1 out of $ini(Stats.ini,STEAMIDS,0) known players:)
  1372. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $Stats($gettok($line(@Bot,%o),1,32)).nick $+ %Gather.Color1 $chr(44) $+ Gathers: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32)) | inc %o | dec %z }
  1373. :END
  1374. }
  1375. elseif ($1 == Weapon) && ($2) {
  1376. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | GOTO END }
  1377. if (!$istok($Weapons,$2,32)) { msg %Gather.Channel $stlmain(There is NO Weapon $+ %Gather.Color2 $2) | Fld 3 | GOTO END }
  1378. .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1379. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s). [ $+ [ $2 ] ] | inc %x }
  1380. filter -cwwteu 2 32 @Bot @Bot
  1381. if ($ini(Stats.ini,STEAMIDS,0) < %Gather.TopNumber) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1382. elseif ($ini(Stats.ini,STEAMIDS,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1383. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ $2 $+ %Gather.Color1 out of $ini(Stats.ini,STEAMIDS,0) known players:)
  1384. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $Stats($gettok($line(@Bot,%o),1,32)).nick $+ %Gather.Color1 $chr(44) $+ Frags: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32) %Gather.Color1 $+ with $+ %Gather.Color2 $2) | inc %o | dec %z }
  1385. }
  1386. elseif ($1 == 10) {
  1387. if ($ini(Stats.ini,STEAMIDS,0) == 0) { msg %Gather.Channel $stlmain(There is no current ranking on the gatherbot yet.) | Fld 3 | GOTO END }
  1388. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1389. while ($ini(Stats.ini,STEAMIDS,%x)) { var %s = $v1 | echo @Bot %s $stats(%s).Points | inc %x }
  1390. filter -cwwteu 2 32 @Bot @Bot
  1391. if ($ini(Stats.ini,STEAMIDS,0) < 10) { var %z = $ini(Stats.ini,STEAMIDS,0) }
  1392. elseif ($ini(Stats.ini,STEAMIDS,0) >= 10) { var %z = 10 }
  1393. var %temp1, %temp2
  1394. while (%z) {
  1395. var %steam = $gettok($line(@Bot,%o),1,32)
  1396. if (%o <= 5) { var %temp1 = %temp1 ( $+ $chr(35) $+ %o $+ ) $Stats(%steam).nick ( $+ $stats(%STEAM).points $+ ) }
  1397. else { var %temp2 = %temp2 ( $+ $chr(35) $+ %o $+ ) $Stats(%steam).nick ( $+ $stats(%STEAM).points $+ ) }
  1398. inc %o
  1399. dec %z
  1400. }
  1401. if (%temp1) msg %Gather.Channel $stlmain(%temp1)
  1402. if (%temp2) .timer 1 1 msg %Gather.Channel $stlmain(%temp2)
  1403. :END
  1404. }
  1405. elseif ($1 == admins) {
  1406. Fld 20 | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1407. while ($ini(Access.ini,Access,%x)) { var %s = $v1 | echo @Bot %s $acc(%s).gathers | inc %x }
  1408. filter -cwwteu 2 32 @Bot @Bot
  1409. if ($ini(Access.ini,Access,0) < %Gather.TopNumber) { var %z = $ini(Access.ini,Access,0) }
  1410. elseif ($ini(Access.ini,Access,0) >= %Gather.TopNumber) { var %z = %Gather.TopNumber }
  1411. msg %Gather.Channel $stlmain(Here are the Top $+ %z %Gather.Color2 $+ Admins $+ %Gather.Color1 out of $ini(Access.ini,Access,0) known users:)
  1412. while (%z) { .timer -m 1 $calc(%o * 200) msg %Gather.Channel $stlmain($ord(%o) $+ : $+ %Gather.Color2 $gettok($line(@Bot,%o),1,32) %Gather.Color1 $+ ( $+ $LVLStyled($ACC($gettok($line(@Bot,%o),1,32)).lvl) $+ ) $chr(44) $+ Gathers: $+ %Gather.Color2 $gettok($line(@Bot,%o),2,32)) | inc %o | dec %z }
  1413. :END
  1414. }
  1415. }
  1416.  
  1417. ;/ChangePass <num>
  1418. alias RemovePassVent {
  1419. var %file = pass $+ $1 $+ .txt
  1420. if ($exists(%file)) .remove %file
  1421. .write %file /chan delete $data($1).rooma
  1422. .write %file /chan delete $data($1).roomb
  1423. .write %file /chan delete $data($1).gtrinfo2
  1424. .write %file /chan delete $date($1).gtrinfo
  1425. .write %file /subchan $data($1).roomnum $data($1).gtrinfo ¶ $data($1).passa ¶ "OFF "
  1426. run -hide Ventox.exe -n %Gather.VentUser -w %Gather.VentPass -a %Gather.VentRCON -f %file %Gather.Vent
  1427. .timer 1 3 .remove %file
  1428. }
  1429. ;/ChangePassVent <num>
  1430. alias changepassvent {
  1431. var %file = pass $+ $1 $+ .txt
  1432. if ($exists(%file)) .remove %file
  1433. .write %file /chan delete $data($1).rooma
  1434. .write %file /chan delete $data($1).roomb
  1435. .write %file /chan delete $data($1).gtrinfo
  1436. .write %file /subchan $data($1).roomnum $data($1).roomA ¶ $data($1).passa ¶ $replace($data($1).Team-A,$chr(32),$chr(44))
  1437. .write %file /subchan $data($1).roomnum $data($1).roomB ¶ $data($1).passb ¶ $replace($data($1).Team-B,$chr(32),$chr(44))
  1438. .write %file /subchan $data($1).roomnum $data($1).gtrinfo2 ¶ " Map: $data($1).Map Admin: $data($1).Admin " ¶ " Map: $data($1).Map Admin: $data($1).Admin "
  1439. run -hide Ventox.exe -n %Gather.VentUser -w %Gather.VentPass -a %Gather.VentRCON -f %file %Gather.Vent
  1440. .timer 1 3 .remove %file
  1441. }
  1442. alias ShowReason {
  1443. if ($CheckSteam($1)) var %steam = $1
  1444. else var %steam = $findsteam($1-)
  1445. if (%steam) && ($ini(Banned.ini,%steam)) {
  1446. msg %Gather.Channel $stlmain(%Gather.Color2 $+ %steam %Gather.Color1 $+ ( $+ $Stats(%steam).nick $+ ) $+ %Gather.Color2 Banned by: $+ %Gather.Color1 $readini(Banned.ini,%steam,by) at: $+ %Gather.Color2 $readini(Banned.ini,%steam,at) %Gather.Color1 $+ with reason: $+ %Gather.Color2 $readini(Banned.ini,%steam,Reason) $+ $iif($readini(Banned.ini,%steam,days),$chr(32) %Gather.Color1 $+ timeleft: $+ %Gather.Color2 $duration3($Timeleft($readini(Banned.ini,%steam,at),$readini(Banned.ini,%steam,Days))) $+ .,.))
  1447. }
  1448. else { msg %Gather.Channel $stlmain(The player ( $+ %Gather.Color2 $+  $+ $1- $+ %Gather.Color1 $+ ) is not at the BANNED list.) }
  1449. }
  1450. alias Timeleft { return $duration($calc($ctime($1) + $calc(3600 * 24 * $2) - $ctime)) }
  1451. alias duration3 {
  1452. var %x 1, %temp
  1453. while ($gettok($1-,%x,32)) { if ( (day isin $gettok($1-,%x,32)) || (wk isin $gettok($1-,%x,32)) || (hr isin $gettok($1-,%x,32)) || (mins isin $gettok($1-,%x,32)) ) { var %temp = %temp $gettok($1-,%x,32) } | inc %x }
  1454. return $iif(%temp,%temp,less then 10mins)
  1455. }
  1456. alias TimePassed { return $calc($ctime($date $time) - $ctime($1 $2)) }
  1457. alias CheckBanTimes {
  1458. var %x 1, %temp, %y 1
  1459. while ($ini(Banned.ini,%x)) {
  1460. var %steam = $ini(Banned.ini,%x)
  1461. if ($readini(Banned.ini,%steam,Days)) && ($TimePassed($readini(Banned.ini,%steam,at),$readini(Banned.ini,%steam,days)) > $calc(3600 * 24 * $readini(Banned.ini,%steam,days))) { var %temp = %temp %steam | .timer 1 %y Unban2 %steam | inc %y 20 }
  1462. inc %x
  1463. }
  1464. }
  1465. alias Unban2 { .remini -n Banned.ini $1 | var %x = 1 | while ($ini(Settings.ini,%x)) { .timer 1 %x rcmd %x admin_command admin_unban $1 | inc %x } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement