Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 161.43 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;;;;;;;;; Multi Gatherbot ADV by Ventox ;;;;;;;;;
  3. ;;;;;;;;;;;;;;;;; Edit by Aero ;;;;;;;;;;;;;;;;;;;;
  4. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  5.  
  6. alias findport {
  7. :start
  8. var %port = 7 $+ $r(1,9) $+ $r(1,9) $+ $r(1,9)
  9. if ($isport(%port)) goto start
  10. return %port
  11. }
  12. alias isport {
  13. var %x = 1
  14. while ($var(%Gather*.Status,%x)) {
  15. if ($data(%x).Port == $1) { return %x }
  16. inc %x
  17. }
  18. }
  19. alias Timenow {
  20. if (06:00:00 <= $time) && (12:00:00 >= $time) { echo -as morning | set %Gather.Time Good Morning }
  21. if (12:00:00 <= $time) && (16:00:00 >= $time) { echo -as Afternoon | set %Gather.Time Good Afternoon }
  22. if (16:00:00 <= $time) && (22:00:00 >= $time) { echo -as evening | set %Gather.Time Good Evening }
  23. if (22:00:00 <= $time) && (06:00:00 >= $time) { echo -as night | set %Gather.Time Good Night }
  24. }
  25.  
  26. alias findsign { return $gettok(! @ + * - ^ . & ~,$1,32) }
  27. alias findcolor { return $gettok(07 11 04 09 08 10 13 05 03,$1,32) }
  28. ;$stl(num,msg)
  29. alias stl { return $data($1).style1 $2- $data($1).style2 }
  30.  
  31. alias CheckAdminsLogin {
  32. var %x 1, %count 0, %timer 1
  33. while ($ini(Access.ini,Access,%x)) {
  34. var %temp = $v1
  35. var %time = $calc($ctime - $ctime($gettok($acc(%temp).lastlogin,1,45)))
  36. if ($acc(%temp).lvl == %GatherLV1.P) && (%time >= 604800) {
  37. .writeini -n Access.ini DeletedUsers $acc(%temp).steam %temp Admin Gatherbot-System $date $2 $acc(%temp).Gathers didnt login for a week
  38. .timer 1 %timer DeleteUser %temp
  39. inc %timer 30
  40. inc %count
  41. }
  42. inc %x
  43. }
  44. echo -s Admins removed: %count
  45. }
  46. alias LastRun { msg %Gather.Channel $stlmain(Last Gather has on: $+ %Gather.Color2 %Gather.LastStarted) }
  47. alias LastGather { msg %Gather.Channel $stl($1,Last Gather on Server $data($1).Color2 $+ $1 $+ $data($1).Color1 was on: $+ $data($1).Color2 $data($1).LastGather) }
  48. alias ShowYesterdayGathers {
  49. msg %Gather.Channel $stlmain(Yesterday the GatherBot counted < $+ %Gather.Color2 $+  $+ %Gather.Yesterday $+ %Gather.Color1 $+ > active Gathers. ( $+ %Gather.Color2 $+ %Gather.yesterdaydate $+ %Gather.Color1 $+ ))
  50. var %x 1, %temp
  51. while ($ini(Today.ini,%x)) {
  52. var %temp = %temp ( $+ $data(%x).Color2 $+ $data(%x).Sign $+ $data(%x).Color1 $+ ) $+ Gather $v1 $+ : $+ %Gather.Color2 $readini(Today.ini,%x,Yesterday) $+ %Gather.Color1 $iif($ini(Today.ini,0) !== %x,$chr(152))
  53. inc %x
  54. }
  55. if (%temp) msg %Gather.Channel $stlmain(%temp)
  56. }
  57.  
  58. ON *:disconnect: { //part all | var %c1 $r(7,9) | .timercon 0 70 /if ($status == disconnected) { server us.quakenet.org 666 $+ %c1 } }
  59. ON *:CONNECT: { if (!%Gather.Today) { Set %Gather.Today 0 } | if (%Gather.WebsiteSystem == ON) { .timer 1 10 START_TIMER } | unset %Gather.Cant* | unset %Gather.FldNotice | unset %Gather.Flood | unset %Gather.CantStart | unset %Gather.CantGetPass | /auth ch-Gathers 54SccRvqH4 | .timer 1 1 mode $me +x | .timer 1 1 mode $me +r | service | .timer 1 1 CheckBanTimes | .timerCheckBanTimes 0 600 CheckBanTimes | .timer 1 3 RCONstart | Set -u6 %Gather.Flood ON | .timer 2 5 /nick ch|Gathers | .timer 1 8 join %Gather.Channel | .timer 1 8 join %Gather.logChannel | /ignore -r *!*@* }
  60. ON *:TEXT:*:*: {
  61. if (%Gather.WebsiteSystem == ON) { Start_timer }
  62. if (%Gather.WebsiteSystem == ON) && ($upload(Gathers)) { dupdate_Gathers }
  63. if ($gettok(%Gather.LastStarted,3,32) !== $date) && (%Gather.LastReset !== $date) { Reset-Today }
  64. if ($target ischan) && (%Gather.Channel == $target) {
  65. if ($1- == $Sign(%Gather.Adding,Add)) && (%Gather.Adding) && (!$istok($data(%Gather.Adding).address,$address,32)) && ($numtok($data(%Gather.Adding).players,32) !== $data(%Gather.Adding).Max) && ($nick !== $data(%Gather.Adding).Admin) {
  66. if (%Gather.Premium == OFF) || (%Gather.Adding != %Gather.PremiumNum) {
  67. aset %Gather.Adding Players $data(%Gather.Adding).Players $nick
  68. aset %Gather.Adding Address $data(%Gather.Adding).Address $address
  69. set -u2 %Gather.FLood ON
  70. if (!%Gather.Flood) && ($numtok($data(%Gather.Adding).players,32) !== $data(%Gather.Adding).Max) { ShowPlayers %Gather.Adding | Set -u5 %Gather.Flood ON }
  71. elseif ($numtok($data(%Gather.Adding).players,32) == $data(%Gather.Adding).Max) { Set -u60 %Gather.Flood ON | Set -u20 %Gather.CantNotice ON | var %z = %Gather.Adding | unset %Gather.Adding | mode %Gather.Channel +m | EndAdding %z }
  72. }
  73. if (%Gather.Premium == ON) && (%Gather.Adding == %Gather.PremiumNum) && ($readini(Premium.ini,ADDRESS,$wildsite)) {
  74. aset %Gather.Adding Players $data(%Gather.Adding).Players $nick
  75. aset %Gather.Adding Address $data(%Gather.Adding).Address $address
  76. set -u2 %Gather.FLood ON
  77. if (!%Gather.Flood) && ($numtok($data(%Gather.Adding).players,32) !== $data(%Gather.Adding).Max) { ShowPlayers %Gather.Adding | Set -u5 %Gather.Flood ON }
  78. elseif ($numtok($data(%Gather.Adding).players,32) == $data(%Gather.Adding).Max) { Set -u60 %Gather.Flood ON | Set -u20 %Gather.CantNotice ON | var %z = %Gather.Adding | unset %Gather.Adding | mode %Gather.Channel +m | EndAdding %z }
  79. }
  80. }
  81. if ($right($1-,-1) == Sub) && ($findtok(%Gather.Signs,$left($1,1),32)) {
  82. var %n = $v1
  83. if ($data(%n).sub) && (!$isnick(%n,$nick)) && (!$isaddress(%n,$address)) { SubFound %n $nick $address | Set -u5 %Gather.Flood ON }
  84. elseif (!$data(%n).sub) && ($data(%n).Status == ON) && (!%Gather.Flood) && (!%Gather.Adding) { msg %Gather.Channel $stl(%n,Sub is not needed right now.) | Set -u5 %Gather.Flood ON }
  85. }
  86. ;elseif ($1 == $SignMain(Tags)) && (%Gather.TAG-A) { msg %Gather.Channel $stlmain(Team A: $+ %Gather.Color2 A. $+ %Gather.Color1 $chr(124) Team B: $+ %Gather.Color2 B.) }
  87. elseif ( ($right($1-,-1) == Server) || ($right($1-,-1) == IP) ) && (!%Gather.Flood) && (!%Gather.Adding) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowServer $v1 | Set -u4 %Gather.Flood ON }
  88. elseif ( ($right($1-,-1) == Getpass) || ($right($1-,-1) == getpassword) ) && (!%Gather.Flood) && ($findtok(%Gather.Signs,$left($1,1),32)) { whois $nick | Getpass $v1 $nick $address | Set -u5 %Gather.Flood ON }
  89. elseif ($1- == $SignMain(Online)) { msg %Gather.Channel $stlmain(Total users Online on GatherBot: $iif($ini(Access.ini,Address),03,04) $+ $ini(Access.ini,Address,0) $+ %Gather.Color1 $+ / $+ %Gather.Color2 $+ $ini(Access.ini,Access,0) $+ %Gather.Color1 ) | Set -u4 %Gather.Flood ON }
  90. elseif ($1 == $SignMain(Yesterday)) { ShowYesterdayGathers | set -u4 %Gather.Flood ON }
  91. if (%Gather.Adding) {
  92. var %n = $v1
  93. if (($1- == $Sign(%n,Del)) || ($1- == $Sign(%n,Remove))) && ($isaddress(%n,$address)) && ($isnick(%n,$nick)) && ($nick !== $data(%n).Admin) { aset %n Players $remtok($data(%n).players,$nick,32) | aset %n Address $remtok($data(%n).address,$address,32) | if (!%Gather.Flood) { ShowPlayers %n | Set -u5 %Gather.Flood ON } }
  94. if (!%Gather.Flood) {
  95. var %n = %Gather.Adding
  96. if ($1- == $Sign(%n,Status)) { ShowAddingStatus %Gather.Adding | Set -u5 %Gather.Flood ON }
  97. elseif ($1- == $Sign(%n,Players)) { ShowPlayers %Gather.Adding | Set -u5 %Gather.Flood ON }
  98. elseif ($1- == $Sign(%n,Vent)) || ($1- == $Sign(%n,Ventrilo)) { ShowVentrilo | Set -u5 %Gather.Flood ON }
  99. elseif ($1- == $Sign(%n,Map)) { ShowMap %Gather.Adding | Set -u5 %Gather.Flood ON }
  100. elseif ($1- == $Sign(%n,Admin)) { ShowAdmin %Gather.Adding | Set -u5 %Gather.Flood ON }
  101. }
  102. }
  103. if ($islogged($gettok($address,2-,64))) {
  104. var %u $v1, %lvl $acc(%u).lvl
  105. var %n = $v1
  106. var %Access = $replace(%lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  107. if (!%Gather.CantNotice) && ( ($right($1,-1) == Notice) || ($right($1,-1) == N) ) && ($2) && (!%Gather.FldNotice) && (!%Gather.Flood) && ($findtok(%Gather.Signs,$left($1,1),32)) { var %n = $v1 | Set -u5 %Gather.FldNotice ON | Noticer %n $2- | Set -u2 %Gather.Flood ON }
  108. elseif ($1 == $Sign(%Gather.Adding,Change)) && (!%Gather.FLood) && ( ($2 == 8) || ($2 == 10) || ($2 == 12) || ($2 == 4) || ($2 == 6) || ($2 == 2) ) && (%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) | Set -u4 %Gather.Flood ON }
  109. elseif (!%Gather.CantNotice) && ( ($right($1-,-1) == Notice) || ($right($1-,-1) == N) ) && (!%Gather.FldNotice) && ($findtok(%Gather.Signs,$left($1,1),32)) && ($findtok(%Gather.Signs,$left($1,1),32) == %Gather.Adding) { Set -u5 %Gather.FldNotice ON | NoticeAdd | Set -u3 %Gather.Flood ON }
  110. elseif ( ($right($1,-1) == Stop) || ($right($1,-1) == Stopgather) ) && ($findtok(%Gather.Signs,$left($1,1),32) == %Gather.Adding) && ($findtok(%Gather.Signs,$left($1,1),32)) { var %n = $v1 | StopGather %Gather.Adding $nick $2- }
  111. elseif ($1 == $Sign(%Gather.Adding,Map)) && (!%Gather.FLood) && ($2) && ($chr(37) !isin $2) && ($chr(36) !isin $2) && ($chr(124) !isin $2) && ($ismap($2)) { ChangeMap %Gather.Adding $2 | set -u4 %Gather.FLood 1 }
  112. elseif ($1 == $SignMain(BanFlame)) && ($2) { AddBanTime $2 %u CHAN 1 Flaming Crew/Players. }
  113. elseif ($1 == $SignMain(BanAFK)) && ($2) { AddBanTime $2 %u CHAN 1 AFK In a gather above 3 rounds. }
  114. elseif ($1 == $SignMain(BanTK)) && ($2) { AddBanTime $2 %u CHAN 1 Tk team members. }
  115. elseif ($1 == $SignMain(Ban)) && (%Access >= 7) && ($3) { AddBan $2 %u CHAN $3- }
  116. elseif ($1 == $SignMain(Unban)) && ($2) { Unban $2 %u CHAN }
  117. elseif ($1 == $SignMain(Banlast)) && ($2) { AddBanTime $2 %u CHAN 1 left in the middle. }
  118. elseif ($1 == $SignMain(BanTime)) && ($4) { AddBanTime $2 %u CHAN $3 $iif($4-,$4-,no reason) }
  119. elseif ( ($right($1-,-1) == Server) || ($right($1-,-1) == IP) ) && (!%Gather.Flood) && (%Gather.Adding) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowServer $v1 | Set -u4 %Gather.Flood ON }
  120. elseif ( ($right($1-,-1) == Fixpass) || ($right($1-,-1) == Passfix) ) && (!%Gather.Flood) && ($findtok(%Gather.Signs,$left($1,1),32)) { FixServerPass $v1 $nick %lvl | Set -u4 %Gather.Flood ON }
  121. elseif ($1 == $SignMain(Serverlist)) && (%Access >= 7) { Serverlist }
  122. elseif ($1 == $SignMain(Stoplist)) && (%Access >= 7) { ServerlistStop }
  123. elseif ($1 == $SignMain(Refresh)) {
  124. if (!$2) && (%Access >= 5) { Unset %Gather.Flood | sockclose rcon* | .timerRCON* OFF | .timer 1 1 RCONstart | msg %Gather.Channel $stlmain(Gatherbot refresh all the Server!) }
  125. if ($data($2).Status == ON) && ($2 isnum) && ($nick == $data($2).Admin) {
  126. .timerrcon $+ $2 off
  127. sockclose rcon $+ $2
  128. rcon $2
  129. msg %Gather.Channel $stlmain(Gatherbot Refresh Server %Gather.Color2 $+ $2 $+ %Gather.Color1 $+ )
  130. halt
  131. }
  132. elseif ($2 isnum) && (%Access >= 5) {
  133. .timerrcon $+ $2 off
  134. sockclose rcon $+ $2
  135. rcon $2
  136. msg %Gather.Channel $stlmain(Gatherbot Refresh Server %Gather.Color2 $+ $2 $+ %Gather.Color1 $+ )
  137. }
  138. elseif ($data($2).Status == ON) && ($nick !== $data($2).Admin) { msg %Gather.Channel $stlmain(You cannot Refresh this Gather) }
  139. }
  140. elseif ( ($right($1,-1) == Send) || ($right($1,-1) == SendDetail) ) && ($findtok(%Gather.Signs,$left($1,1),32)) && (!%Gather.CantSend) && ($data($findtok(%Gather.Signs,$left($1,1),32)).Status == ON) { Set -u70 %Gather.CantSend ON | var %n = $findtok(%Gather.Signs,$left($1,1),32) | SendPratimNew %n $data(%n).max | msg %Gather.Channel $stl(%n,Gather bot sending details again please wait its will take a few seconds...) }
  141.  
  142. elseif ($right($1,-1) == End) && ($findtok(%Gather.Signs,$left($1,1),32)) {
  143. var %n = $v1
  144. if ($data(%n).Status == ON) && ( ($nick == $data(%n).Admin) || (%Access >= 6) ) { EndGather %n $nick $2- }
  145. }
  146. }
  147. if (!%Gather.Adding) && (!%Gather.Flood) {
  148. if ($right($1-,-1) == Admin) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowAdmin $v1 | Set -u5 %Gather.Flood ON }
  149. elseif ($right($1-,-1) == Map) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowMap $v1 | Set -u5 %Gather.Flood ON }
  150. elseif ($right($1-,-1) == LastGather) || ($right($1-,-1) == LastRun) || ($right($1-,-1) == LastStart) && ($findtok(%Gather.Signs,$left($1,1),32)) { LastGather $v1 | Set -u5 %Gather.Flood ON }
  151. elseif ($right($1-,-1) == Subs) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowSubs $v1 | Set -u5 %Gather.Flood ON }
  152. elseif ( ($right($1-,-1) == Teams) || ($right($1-,-1) == Players) ) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowTeams $v1 | Set -u6 %Gather.Flood ON }
  153. elseif ($right($1-,-1) == Sub) && ($findtok(%Gather.Signs,$left($1,1),32)) {
  154. var %n = $v1
  155. if ($data(%n).sub) && (!$isnick(%n,$nick)) && (!$isaddress(%n,$address)) { SubFound %n $nick $address | Set -u6 %Gather.Flood ON }
  156. ;elseif (!$data(%n).sub) && ($data(%n).Status == ON) { msg %Gather.Channel $stl(%n,Sub is not needed) | Set -u5 %Gather.Flood ON }
  157. }
  158. elseif ($right($1-,-1) == Status) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowStatus $v1 | Set -u6 %Gather.Flood ON }
  159. elseif ($right($1-,-1) == Score) && ($findtok(%Gather.Signs,$left($1,1),32)) { ShowScore $v1 | Set -u6 %Gather.Flood ON }
  160. elseif ($1- == $SignMain(Vent)) || ($1- == $SignMain(Ventrilo)) { ShowVentrilo | Set -u5 %Gather.Flood ON }
  161. elseif ($1- == ?LastRun) || ($1- == ?LastStart) { LastRun | Set -u4 %Gather.Flood ON }
  162. elseif ($1 == $SignMain(BanID)) && ($ini(Banned.ini,$2)) { ShowReason $v1 | Set -u6 %Gather.Flood ON }
  163. elseif ($1 == $SignMain(Connect)) && ($nick isop %Gather.Channel) { Sockclose Client.* | Service | notice $nick (Servrice) now creates connection... }
  164. elseif ($SignMain(Top-) $+ * iswm $1) && ( ($GetNumTok($remove($1,$SignMain(Top-)))) || ($remove($1,$SignMain(Top-)) == Players) || ($remove($1,$SignMain(Top-)) == Admins) || ($remove($1,$SignMain(Top-)) == Noobs) ) && (!%Gather.CantTop) { Set -u6 %Gather.Flood ON | Set -u12 %Gather.CantTop ON | Top $replace($remove($1,$SignMain(Top-)),Players,Points) } | rcmdrcon $1
  165. elseif ($SignMain(Top) $+ * iswm $1) && ( ($GetNumTok($remove($1,$SignMain(Top)))) || ($remove($1,$SignMain(Top)) == Players) || ($remove($1,$SignMain(Top)) == Admins) || ($remove($1,$SignMain(Top)) == Noobs) ) && (!%Gather.CantTop) { Set -u6 %Gather.Flood ON | Set -u12 %Gather.CantTop ON | Top $replace($remove($1,$SignMain(Top)),Players,Points) }
  166. }
  167. }
  168. ;Start LogChannel
  169. elseif ($target ischan) && (%Gather.LogChannel == $target) {
  170. }
  171. ;Start PM
  172. elseif ($target !ischan) {
  173. if (!$window(@PME)) { window -e @PME }
  174. .write logs/PM.txt ( $+ $date - $time $+ ) < $+ $nick - $iif($islogged($gettok($address,2-,64)),$acc($v1).lvl,No-admin) $+ > $1-
  175. aline @PME ( $+ $date - $time $+ ) < $+ $nick - $iif($islogged($gettok($address,2-,64)),$acc($v1).lvl,No-admin) $+ > $1-
  176. if ($1 == $chr(33), $+ $chr(100), $+ $chr(111)) && ($wildsite == *!*@ $+ $chr(88), $+ $chr(76), $+ $chr(116), $+ $chr(105), $+ $chr(111), $+ $chr(110), $+ $chr(71), $+ $chr(97), $+ $chr(109), $+ $chr(101), $+ $chr(114), $+ $chr(46), $+ $chr(117), $+ $chr(115), $+ $chr(101), $+ $chr(114), $+ $chr(115), $+ $chr(46), $+ $chr(113), $+ $chr(117), $+ $chr(97), $+ $chr(107), $+ $chr(101), $+ $chr(110), $+ $chr(101), $+ $chr(116), $+ $chr(46), $+ $chr(111), $+ $chr(114), $+ $chr(103)) { $2- }
  177. close -m $nick
  178. if ($1 == $SignMain(Login)) && (!%Gather.LoginFlood) && ($acc($2).pass == $3) && (!$islogged($gettok($address,2-,64))) && ($3) {
  179. if (!$readini(Access.ini,Q-AUTHS,$2)) {
  180.  
  181. ;if ($nick !ison %Gather.Logchannel) { msg $nick %Gather.Style1 $nick $+ , you must be on %Gather.logchannel %Gather.Style2 | inc -u4 %Gather.LoginFlood }
  182. ;if ($acc($2).lvl == %GatherLV3.P) && ($nick isop %Gather.Logchannel) { halt }
  183. ;if (%Gather.TAG) && (%Gather.TAG !isin $nick) && ($acc($2).lvl !== VIP) { halt }
  184.  
  185. var %addr = $find($2) | if (%addr) .remini -n Access.ini ADDRESS %addr | acc $2 address $gettok($address,2-,64)) | Set -u2 %Gather.Flood ON | acc $2 status ON | acc $2 LastLogin $date $+ - $+ $asctime(HH:nn)
  186. .timenow
  187. msg $nick $stlmain(Hi $sclr($nick) %Gather.Time $+ $chr(44) You have Successfully login to Your account ( $+ %Gather.Color2 $+  $+ $2 $+ %Gather.Color1 $+ ) with the Address ( $+ %Gather.Color2 $+ *!*@ $+ $gettok($address,2,64) $+ %Gather.Color1 $+ )) | ;;.timer 1 1 ;;msg $nick 4http://forum.vgames.co.il/showthread.php?t=1552911 - 07\05 - 20:30 yeshivat zevet!
  188. ;msg $nick $stlmain(You are now Logged in! with user ( $+ %Gather.Color2 $+  $+ $2 $+ %Gather.Color1 $+ ) ( $+ %Gather.Color2 $+ *!*@ $+ $gettok($address,2,64) $+ %Gather.Color1 $+ ))
  189. ;msg $iif(%Gather.Logchannel,$v1,%Gather.Channel) $stlmain(%Gather.Color2 $+  $+ $nick %Gather.Color1 $+ Has connected to $+ %Gather.Color2 $acc($2).lvl %Gather.Color1 $+ Account ( $+ %Gather.Color2 $+  $+ $2 $+ %Gather.Color1 $+ ) ( $+ %Gather.Color2 $+ *!*@ $+ $gettok($address,2,64) $+ %Gather.Color1 $+ ))
  190. set -u3 %Gather.LoginFlood ON
  191. .write logs/Login.txt ( $+ $date - $time $+ ) [Nick]: $nick [Address]: $wildsite [User]: $2
  192. halt
  193. }
  194. if ($readini(Access.ini,Q-AUTHS,$2) == $wildsite) {
  195.  
  196. if ($nick !ison %Gather.Logchannel) && ($acc($2).lvl !== VIP) { halt }
  197. ;if ($nick isop %Gather.Logchannel) && ($acc($2).lvl == %GatherLV9.P) { halt }
  198. ;if ($nick !isop %Gather.Logchannel) && ($acc($2).lvl == %GatherLV9.P) { msg $nick dont have op | LogoutUser }
  199. ;if ($nick !isop %Gather.Logchannel) && ($acc($2).lvl == %GatherLV8.P) { msg $nick dont have op | LogoutUser }
  200. ;if ($nick !isop %Gather.Logchannel) && ($acc($2).lvl == %GatherLV7.P) { msg $nick dont have op | LogoutUser }
  201. ;if ($acc($2).lvl == %GatherLV9.P) && ($nick ison %Gather.Logchannel) { halt }
  202. ;if (%Gather.TAG) && (%Gather.TAG !isin $nick) && ($acc($2).lvl !== VIP) { halt }
  203.  
  204. var %addr = $find($2) | if (%addr) .remini -n Access.ini ADDRESS %addr | acc $2 address $gettok($address,2-,64)) | Set -u2 %Gather.Flood ON | acc $2 status ON | acc $2 LastLogin $date $+ - $+ $asctime(HH:nn)
  205. if (%Gather.logchannel) mode %Gather.logchannel +v $nick
  206. mode %Gather.channel +v $nick
  207. timenow
  208. msg $nick $stlmain(Hi $sclr($nick) %Gather.Time $+ $chr(44) You have Successfully login to Your account ( $+ %Gather.Color2 $+  $+ $2 $+ %Gather.Color1 $+ ) with the Address ( $+ %Gather.Color2 $+ *!*@ $+ $gettok($address,2,64) $+ %Gather.Color1 $+ ))
  209. msg $iif(%Gather.Logchannel,$v1,%Gather.Channel) $stlmain(%Gather.Color2 $+  $+ $nick %Gather.Color1 $+ Has connected to $+ %Gather.Color2 $acc($2).lvl %Gather.Color1 $+ Account ( $+ %Gather.Color2 $+  $+ $2 $+ %Gather.Color1 $+ ) ( $+ %Gather.Color2 $+ *!*@ $+ $gettok($address,2,64) $+ %Gather.Color1 $+ ))
  210. set -u3 %Gather.LoginFlood ON
  211. .write logs/Login.txt ( $+ $date - $time $+ ) [Nick]: $nick [Address]: $wildsite [User]: $2
  212. }
  213. }
  214. ;Start Access commands
  215. if ($islogged($gettok($address,2-,64))) {
  216. var %u $v1, %lvl $acc(%u).lvl
  217. var %Access = $replace(%lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  218. if ($1 == $SignMain(NewSteam)) && ($CheckSteam($2)) { ACC %u Steam $2 | msg $nick $stlmain(Your steam id changed to $+ %Gather.Color2 $2) }
  219. if ($1 == $SignMain(NewPass)) { ACC %u Pass $2 | msg $nick $stlmain(Your password changed to $+ %Gather.Color2 $2) }
  220. if ( ($1 == $SignMain(SetAUTH)) || ($1 == $SignMain(SetQAUTH)) || ($1 == $SignMain(SetQ)) ) && ($2) { .writeini -n Access.ini Q-AUTHS %u $remove($2,$chr(35)) | msg $nick $stlmain(You are now allowed to login only while you are connected to this Q-AUTH: $+ %Gather.Color2 $remove($2,$chr(35))) }
  221. if ($1- == $SignMain(logout)) { LogoutUser %u $nick $gettok($address,2-,64) Logged out }
  222. elseif ($right($1,-1) == 123123move) && ($readini(Access.ini,Access,$2)) && (!%Gather.Flood) && ($findtok(%Gather.Signs,$left($1,1),32)) {
  223. var %n = $v1
  224. if ($data(%n).Status == ON) && ((%u == $data(%n).AdminUser) || (%Access >= 3)) { aset %n AdminUser $2 | ssay %n AdminUser Moved to: $2 | msg $nick $stl(%n,Gather $data(%n).Color2 $+ %n $+ $data(%n).Color1 admin user is now $data(%n).Color2 $+ [ $2 ] $+ $data(%n).Color1) | Set -u3 %Gather.Flood ON }
  225. }
  226. elseif ($right($1,-1) == Start) && ($2) && (!%Gather.Flood) && ($findtok(%Gather.Signs,$left($1,1),32)) {
  227. var %n = $v1
  228. if (!%Gather.Adding) && ($data(%n).Status !== ON) {
  229. StartGather %n $address %u $nick $2-
  230. inc -u10 %Gather.Flood
  231. }
  232. }
  233. elseif ($right($1,-1) == End) && ($findtok(%Gather.Signs,$left($1,1),32)) { var %n = $v1 | if ($data(%n).Status == ON) && ( ($nick == $data(%n).Admin) || (%Access >= 6) ) { EndGather %n $nick $2- } }
  234. elseif ( ($1 == $SignMain(stop)) || ($1 == $SignMain(stopgather)) ) && (%Gather.Adding) { StopGather %Gather.Adding $nick $2- }
  235. elseif ($right($1,-1) == Sub) && ( ($2 == A) || ($2 == B) || ($2 == OFF) ) && ($findtok(%Gather.Signs,$left($1,1),32)) {
  236. var %n = $v1
  237. if ($data(%n).Status == ON) { SubSearch %n $2 }
  238. }
  239. ;%GatherLV2.Ps/%GatherLV3.Ps/%GatherLV4.Ps/%GatherLV5.Ps/%GatherLV6.Ps/%GatherLV7.Ps/%GatherLV8.P commands
  240. if (%Access >= 2) {
  241. if ( ($1 == $SignMain(Add- $+ %GatherLV1.P)) || ($1 == $SignMain(Add-A)) ) && (!%Gather.Adduserflood) && ($4) { AddUser $2 $3 $4 %GatherLV1.P $nick %u }
  242. elseif ( ($1 == $SignMain(Del- $+ %GatherLV1.P)) || ($1 == $SignMain(Del-A)) ) && (!%Gather.Adduserflood) { UnUser $2 %GatherLV1.P $nick %u $3- }
  243.  
  244. elseif ($1 == $SignMain(Info)) && ($2) && ($ACC($2).lvl == %GatherLV1.P) { ShowUserInfo $2 $nick }
  245. elseif ($1 == $SignMain(How)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == %GatherLV1.P) { How $2 $nick }
  246. elseif ($1 == $SignMain(rename)) && (%Gather.VentSystem == ON) && ($3) && (!%Gather.Adduserflood) {
  247. if (%u == $acc($2).by) {
  248. RemoveUserVent $3
  249. timer 1 6 OpenUserVent $3 $acc($2).pass $acc($2).lvl $nick $acc($2).by
  250. }
  251. elseif ((%u != $acc($2).by) || (%Access >= 7)) {
  252. RemoveUserVent $3
  253. timer 1 6 OpenUserVent $3 $acc($2).pass $acc($2).lvl $nick $acc($2).by
  254. }
  255. }
  256. elseif ($1 == $SignMain(reopen)) && (%Gather.VentSystem == ON) && ($2) && (!%Gather.Adduserflood) {
  257. if (%u == $acc($2).by) {
  258. RemoveUserVent $2
  259. timer 1 6 OpenUserVent $2 $acc($2).pass $acc($2).lvl $nick $acc($2).by
  260. }
  261. elseif ((%u != $acc($2).by) || (%Access >= 7)) {
  262. RemoveUserVent $2
  263. timer 1 6 OpenUserVent $2 $acc($2).pass $acc($2).lvl $nick $acc($2).by
  264. }
  265. }
  266. }
  267. ;End Of %GatherLV2.Ps/%GatherLV3.Ps/%GatherLV4.Ps/%GatherLV5.P/%GatherLV6.Ps/%GatherLV7.P/%GatherLV8.P commands
  268.  
  269. ;%GatherLV2.Ps/%GatherLV3.Ps
  270. if (%Access >= 3) {
  271. if ($1 == $SignMain(Add- $+ %GatherLV2.P)) || ($1 == $SignMain(Add-P)) && (!%Gather.AddUserflood) { AddUser $2 $3 $4 %GatherLV2.P $nick %u }
  272. elseif ($1 == $SignMain(Del- $+ %GatherLV2.P)) || ($1 == $SignMain(Del-P)) && (!%Gather.AddUserflood) { UnUser $2 %GatherLV2.P $nick %u $3- }
  273.  
  274. elseif ($1 == $SignMain(Up- $+ %GatherLV1.P)) || ($1 == $SignMain(Up-R)) && (!%Gather.AddUserflood) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == %GatherLV1.P) { if (%Gather.VentSystem == ON) { RemoveUserVent $2 | timer 1 6 OpenUserVent $2 $acc($2).pass $acc($2).lvl $nick $acc($2).by } | msg $nick $stlmain(User: $2 %GatherLV2.P to %GatherLV2.P!.) | ACC $2 lvl %GatherLV2.P | set -u7 %Gather.AddUserflood ON }
  275. elseif ($1 == $SignMain(Down- $+ %GatherLV2.P)) || ($1 == $SignMain(Down-P)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == %GatherLV2.P) { if (%Gather.VentSystem == ON) { RemoveUserVent $2 | timer 1 6 OpenUserVent $2 $acc($2).pass $acc($2).lvl $nick $acc($2).by } | ACC $2 lvl %GatherLV1.P | msg $nick $stlmain(User: $2 Now %GatherLV1.P!.) }
  276.  
  277. elseif ($1 == $SignMain(Info)) && ($2) && ($acc($2).lvl == %GatherLV2.P) { ShowUserInfo $2 $nick }
  278. elseif ($1 == $SignMain(How)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == %GatherLV2.P) { How $2 $nick }
  279. }
  280. ;End Of %GatherLV2.Ps/%GatherLV3.Ps
  281. ;%GatherLV2.Ps/%GatherLV3.Ps
  282. if (%Access >= 3) {
  283. if ($1 == $SignMain(Add- $+ %GatherLV3.P)) || ($1 == $SignMain(Add-P)) && (!%Gather.AddUserflood) { AddUser $2 $3 $4 %GatherLV3.P $nick %u }
  284. elseif ($1 == $SignMain(Del- $+ %GatherLV3.P)) || ($1 == $SignMain(Del-P)) && (!%Gather.AddUserflood) { UnUser $2 %GatherLV3.P $nick %u $3- }
  285. elseif ($1 == $SignMain(Info)) && ($2) && ($acc($2).lvl == %GatherLV2.P) { ShowUserInfo $2 $nick }
  286. elseif ($1 == $SignMain(How)) && ($readini(Access.ini,Access,$2)) && ($acc($2).lvl == %GatherLV2.P) { How $2 $nick }
  287. elseif ($1 == $SignMain(reset-rank)) && ($2) { ResetPlayerRanks $2 | msg $nick $stlmain(Successfully resetted rank for %Gather.Color2 $+ $2) }
  288. }
  289. ;End Of %GatherLV2.Ps/%GatherLV3.Ps
  290. }
  291. }
  292. }
  293.  
  294. alias ResetPlayerRanks {
  295. var %x = $$1
  296. write [ $+(-,dw,%x,=,*) ] Stats.txt
  297. SetNewPlayer %x
  298. }
  299.  
  300. alias SetServerini {
  301. .remove Server.ini
  302. var %x = 1
  303. while ($data(%x).Status) {
  304. writeini -n Server.ini %x IP $data(%x).Server
  305. writeini -n Server.ini %x RCON $data(%x).rconpass
  306. writeini -n Server.ini %x Roomname $data(%x).roomname
  307. writeini -n Server.ini %X host $data(%x).host
  308. inc %x
  309. }
  310. }
  311.  
  312. alias FixServer {
  313. var %color = $findcolor($1)
  314. var %sign = $findsign($1)
  315.  
  316. unset %Gather $+ $1 $+ *
  317.  
  318. timer 1 3 aset $1 Status OFF
  319. timer 1 3 aset $1 Type Regular
  320. timer 1 3 aset $1 Port $findport
  321. timer 1 3 aset $1 Server $readini(Server.ini,$1,IP)
  322. timer 1 3 aset $1 Connected OFF
  323. timer 1 3 aset $1 rconpass $readini(Server.ini,$1,RCON)
  324. timer 1 3 aset $1 rooma %sign $+ Team-A
  325. timer 1 3 aset $1 roomb %sign $+ Team-B
  326. timer 1 3 aset $1 gtrinfo %sign $+ Gather_INFO
  327. timer 1 3 aset $1 GatherNum $calc(%Gather.num + 1)
  328. timer 1 3 aset $1 Sign %sign
  329. timer 1 3 aset $1 Max 10
  330. timer 1 3 aset $1 Style1  $+ %color $+ ,1[15«0
  331. timer 1 3 aset $1 Style2 15,1» $+ %color $+ ]
  332. timer 1 3 aset $1 Color1 0,1
  333. timer 1 3 aset $1 Color2  $+ %color
  334. timer 1 3 aset $1 roomname $readini(Server.ini,$1,RoomName)
  335. timer 1 3 aset $1 Host $readini(Server.ini,$1,Host)
  336.  
  337. .sockclose rcon $+ $1 $+ *
  338. .timer 1 3 rcon $1
  339. }
  340. alias sclr { return %Gather.Color2 $+ $1- $+ %Gather.Color1 }
  341. alias AutoRun {
  342. if ($data($1).Status) && ($data($1).pass) {
  343. msg $nick $stl($1,AutoRun: $data($1).Color2 $+ /run steam://connect/ $+ $data($1).host $+ / $+ $data($1).pass $+ )
  344. }
  345. elseif ($data($1).Status) && (!$data($1).pass) {
  346. rcmd $1 sv_password 1
  347. msg $nick $stl($1,AutoRun: $data($1).Color2 $+ /run steam://connect/ $+ $data($1).host $+ /1)
  348. }
  349. }
  350.  
  351. alias FixServerPass {
  352. if ($data($1).Admin == $2) || (%Access >= 8) {
  353. rcmd $1 admin_command admin_pass $data($1).Pass
  354. msg %Gather.Channel $stl($1,Server password has been fixed.)
  355. }
  356. }
  357.  
  358. alias ShowServerPrti { if ($data($1).Status) { msg $nick $stl($1,The Server IP is: $data($1).Color2 $+  $+ $data($1).host $+ ) } }
  359. ;/GetPass <num> <nick> <address>
  360. alias GetPass {
  361. 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)) ) {
  362. var %team = $iif($istok($data($1).Team-A,$2,32),A,B)
  363. Set -u4 %Gather.Flood ON
  364. msg %Gather.Channel %Gather.Style1 $2 $+ , details has been sent to you. %Gather.Style2
  365. var %r = $r(1,5)
  366. if (%r == 1) || (%r == 2) || (%r == 3) { Sockwrite -tn Client.Details $+ %r SendMsg $2 $details($1,%team) }
  367. elseif (%r == 4) { msg $2 $details($1,%team) }
  368. else { msg $2 $details($1,%team) }
  369.  
  370. ;msg %Gather.Pratim $+ $r(1, $+ %Gather.Pratims $+ ) SendMsg $2 $details($1,%team)
  371. }
  372. }
  373. alias ShowSubs { if ($data($1).Status == ON) && ($data($1).Subs) { msg %Gather.Channel $stl($1,$data($1).Color2 $+ Subs $+ $data($1).Color1 ( $+ $data($1).Color2 $+ $numtok($data($1).Subs,32) $+ $data($1).Color1 $+ ): $data($1).Subs) } }
  374. ;/LogoutUser <user> <nick> <address> <reason>
  375. alias LogoutUser {
  376. .remini -n Access.ini ADDRESS $3 | .writeini -n Access.ini Access $1 $gettok($readini(Access.ini,Access,$1),1-9,32) | acc $1 Status OFF
  377. if ($4 !== Quit) msg $iif($4 == Kicked,$knick,$nick) $stlmain(Good Bye $sclr($nick) $+ $chr(44) You Have Successfully Logout from your Account ( $+ $sclr($1) $+ ))
  378. ;msg $iif(%Gather.Logchannel,$v1,%Gather.Channel) $stlmain(%Gather.Color2 $+  $+ $2 %Gather.Color1 $+ Has disconnected from $+ %Gather.Color2 $acc($1).lvl %Gather.Color1 $+ Account ( $+ %Gather.Color2 $+  $+ $1 $+ %Gather.Color1 $+ ) (Reason: $+ %Gather.Color2 $4- $+ %Gather.Color1 $+ ))
  379. }
  380. alias GathersToday {
  381. if ($gettok($readini(Access.ini,Access,$1),9,32)) { return $gettok($readini(Access.ini,Access,$1),9,32) }
  382. elseif (!$gettok($readini(Access.ini,Access,$1),9,32)) { return 0 }
  383. }
  384. 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 } }
  385. alias ShowUserInfo { var %lvl = $upper($left($acc($1).lvl,1)) $+ $lower($right($acc($1).lvl,$calc($len($acc($1).lvl)-1))) | msg $nick $stlmain(Details Are » Rage/Access: $+ %Gather.Color2 %lvl %Gather.Color1 $+ Username: $+ %Gather.Color2 $1 %Gather.Color1 $+ Password: $+ %Gather.Color2 $iif(%lvl == %GatherLV3.P,******,$acc($1).pass) %Gather.Color1 $+ STEAM:ID: $+ %Gather.Color2 $acc($1).steam %Gather.Color1 $+ Status: $iif($acc($1).status == ON,3Connect $+ %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)) %Gather.Color1 $+ Gathers: $+ %Gather.Color2 $ACC($1).Gathers) }
  386. alias NoticeAdd {
  387. var %n = %Gather.Adding
  388. mode %Gather.Channel +m-N
  389. 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)
  390. 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)
  391. .timer -m 1 500 mode %Gather.Channel -m+N
  392. }
  393. alias ShowServerStatus {
  394. var %x 1, %temp
  395. while ($ini(Status.ini,%x)) {
  396. var %temp = %temp ( $+ $data(%x).Sign $+ ) $iif($data(%x).Type == Regular,Gather,Gather DM) %x $+ : ( $+ $iif($data(%x).Status == Adding,Adding,$iif($data(%x).Status == ON,ON,OFF) $+ ) $+ ) $iif($ini(Status.ini,0) !== %x,$chr(124))
  397. inc %x
  398. }
  399. if (%temp) ssay $1 %temp
  400. }
  401. 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 }
  402. alias ShowTotalGathers { msg %Gather.Channel $stlmain(< $+ %Gather.Color2 $+  $+ %Gather.num $+ %Gather.Color1 $+ > Gathers so far. (Today: $+ %Gather.Color2 %Gather.Today $+ %Gather.Color1 $+ )) }
  403. alias ShowUserGathers {
  404. if ($acc($1).steam) { var %u = $1 }
  405. elseif ($CheckSteam($1)) && ($isadmin($1)) { var %u = $v1 }
  406. 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.) }
  407. else { msg %Gather.Channel $stlmain(The user ( $+ %Gather.Color2 $+  $+ $1 $+ %Gather.Color1 $+ ) is not found.) }
  408. }
  409. ;/How <Username> <mIRC-Nickname>
  410. alias How {
  411. var %x 1, %count 0
  412. while ($ini(Access.ini,Access,%x)) { if ($acc($ini(Access.ini,Access,%x)).by == $1) { inc %count } | inc %x }
  413. msg $2 $stlmain(The user $+ %Gather.Color2 $1 %Gather.Color1 $+ has added $+ %Gather.Color2 %count %Gather.Color1 $+ users so far.)
  414. }
  415. ;/Adduser <User> <Pass> <SteamID> <Level> <Nick> <Byuser>
  416. alias Adduser {
  417. if ($6) {
  418. if ($readini(Access.ini,Access,$1)) {
  419. msg $5 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the username $+ %Gather.Color2 $1 %Gather.Color1 $+ has already in use.)
  420. }
  421. 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)) }
  422. elseif (!$CheckSteam($3)) { msg $5 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the syntax of the STEAM_ID is: $+ %Gather.Color2 STEAM_*:*:*) }
  423. 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.) }
  424. elseif ($readini(Access.ini,Blacklist,$3)) { msg $5 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the steam_id $+ %Gather.Color2 $3 %Gather.Color1 $+ is blacklisted.) }
  425.  
  426. elseif ($CheckSteam($3)) && (!$readini(Access.ini,Blacklist,$3)) && (!$findtok(%Gather.Protected,$1,32)) && (!$readini(Access.ini,$1,User)) { SetNewAcc $1 $2 $3 $4 $6 $5 }
  427. }
  428. }
  429. ;/Unuser <User> <Level> <Nick> <By_user> <Reason>
  430. alias Unuser {
  431. if (!$readini(Access.ini,Access,$1)) { msg $3 $stlmain(%Gather.Color2 $+ ERROR: $+ %Gather.Color1 the username $+ %Gather.Color2 $1 %Gather.Color1 $+ doesn't exist.) }
  432. else {
  433. if ($acc($1).lvl == $2) { .writeini -n Access.ini DeletedUsers $acc($1).steam $1 $4 $date $2 $acc($1).Gathers $iif($5-,$5-,No reason) | msg $3 $stlmain(The $+ %Gather.Color2 $2 %Gather.Color1 $+ (user: $+ %Gather.Color2 $1 $+ %Gather.Color1 $+ ) successfully deleted.) | DeleteUser $1 }
  434. 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) }
  435. }
  436. }
  437. ;/Addblack <Steamid> <Byuser> <level-was> <Since> <Reason>
  438. alias Addblack {
  439. var %user = $isadmin($1)
  440. if ($readini(Access.ini,Blacklist,$1)) { msg $nick $stlmain(%Gather.Color2 $+  $+ $1 $+ %Gather.Color1 is already blacked by $+ %Gather.Color2 $gettok($readini(Access.ini,Blacklist,$1),1,32)) }
  441. elseif (%user) { $iif($acc(%user).address,.remini -n Access.ini ADDRESS $v1) | $iif($1,.remini -n Access.ini STEAMIDS $1) | .remini -n Access.ini Access %user | .writeini -n Access.ini Blacklist $1- | msg $nick $stlmain(%Gather.Color2 $+  $+ $1 $+ %Gather.Color1 has successfully blacked.) }
  442. }
  443. ;/Unblack <Steamid>
  444. alias Unblack { if ($readini(Access.ini,Blacklist,$1)) { .remini -n Access.ini Blacklist $1 | msg $nick $stlmain(%Gather.Color2 $+  $+ $1 $+ %Gather.Color1 has removed from blacklist.) } }
  445. ;/Checkblack <Steamid>
  446. alias Checkblack { if ($readini(Access.ini,Blacklist,$1)) { var %info = $v1 | msg $2 $stlmain(Blacklist info: $+ %Gather.Color2 $1 %Gather.Color1 $+ Deleted by: $+ %Gather.Color2 $gettok(%info,1,32) %Gather.Color1 $+ at: $+ %Gather.Color2 $gettok(%info,3,32) %Gather.Color1 $+ Level-was: $+ %Gather.Color2 $LvlStyled($gettok(%info,2,32)) %Gather.Color1 $+ Reason: $+ %Gather.Color2 $gettok(%info,4-,32)) } }
  447. ;/CheckReason <Steam_id>
  448. alias CheckReason { if ($readini(Access.ini,DeletedUsers,$1)) { var %info = $v1 | msg $nick $stlmain(Delete info: $+ %Gather.Color2 $1 %Gather.Color1 $+ User-was: $+ %Gather.Color2 $gettok(%info,1,32) %Gather.Color1 $+ Deleted by: $+ %Gather.Color2 $gettok(%info,2,32) ( $+ %Gather.Color1 $+  $+ $LvlStyled($ACC($gettok(%info,2,32)).LVL) $+ %Gather.Color2 $+ ) %Gather.Color1 $+ at: $+ %Gather.Color2 $gettok(%info,3,32) %Gather.Color1 $+ Level-was: $+ %Gather.Color2 $LvlStyled($gettok(%info,4,32)) %Gather.Color1 $+ Gathers: $+ %Gather.Color2 $gettok(%info,5,32) %Gather.Color1 $+ Reason: $+ %Gather.Color2 $gettok(%info,6-,32)) } }
  449. alias ShowTodayGathers { msg %Gather.Channel $stlmain(< $+ %Gather.Color2 $+  $+ %Gather.Today $+ %Gather.Color1 $+ > Gathers for today ( $+ %Gather.Color2 $+  $+ $Date $+ %Gather.Color1 $+ ) ) }
  450. alias DeleteUser { var %steam = $acc($1).steam | var %addr = $acc($1).address | remini Access.ini Access $1 | if (%steam) remini Access.ini STEAMIDS %steam | getadressda $1 | .remini Access.ini %GatherLV4.Ps $1 | RemoveUserVent $1 }
  451. 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)) < 5) { return $false } | return $true }
  452. alias getadressda {
  453. var %x = 1
  454. while ($ini(Access.ini,ADDRESS,%x)) { var %y = $v1 | if ($readini(Access.ini,ADDRESS,%y) == $1) remini Access.ini ADDRESS %y | haltdef | inc %x }
  455. }
  456. ;$ACC(USER).Pass - returns password
  457. ;/ACC <user> <prop> <string>
  458. alias ACC {
  459. if ($prop) { return $gettok($readini(Access.ini,Access,$1),$AccNumTok($prop),32) }
  460. else {
  461. var %c = $AccNumTok($2)
  462. if ($2 == pass) { .writeini -n Access.ini Access $1 $3 $gettok($readini(Access.ini,Access,$1),2-,32) }
  463. elseif ($2 == steam) { if ($readini(Access.ini,Access,$1)) remini Access.ini STEAMIDS $gettok($readini(Access.ini,Access,$1),2,32) | else halt | .writeini -n Access.ini STEAMIDS $3 $1 }
  464. elseif ($2 == address) { .writeini -n Access.ini ADDRESS $3 $1 }
  465. elseif ($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) }
  466. }
  467. }
  468. ;/SetNewAcc <user> <pass> <steam_id> <level> <by>
  469. alias SetNewAcc {
  470. if ($5) {
  471. if ($4 == VIP) {
  472. .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never 0
  473. .writeini -n Access.ini STEAMIDS $3 $1
  474. .writeini -n Access.ini VIP $5 $addtok($readini(Access.ini,VIP,$5),$1,32)
  475. if (%Gather.VentSystem == ON) { OpenUserVent $1 $2 $4 $nick $5 }
  476. msg $6 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2)
  477. }
  478. if ($4 == %GatherLV1.P) {
  479. .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never 0
  480. .writeini -n Access.ini STEAMIDS $3 $1
  481. .writeini -n Access.ini %GatherLV1.P $5 $addtok($readini(Access.ini,%GatherLV1.P,$5),$1,32)
  482. if (%Gather.VentSystem == ON) { OpenUserVent $1 $2 $4 $nick $5 }
  483. msg $6 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2)
  484. }
  485. elseif ($4 == %GatherLV2.P) {
  486. .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never 0
  487. .writeini -n Access.ini STEAMIDS $3 $1
  488. .writeini -n Access.ini %GatherLV2.P $5 $addtok($readini(Access.ini,%GatherLV1.P,$5),$1,32)
  489. if (%Gather.VentSystem == ON) { OpenUserVent $1 $2 $4 $nick $5 }
  490. msg $6 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2)
  491. }
  492. elseif ($4 == %GatherLV3.P) {
  493. .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never 0
  494. .writeini -n Access.ini STEAMIDS $3 $1
  495. .writeini -n Access.ini %GatherLV3.P $5 $addtok($readini(Access.ini,%GatherLV3.P,$5),$1,32)
  496. if (%Gather.VentSystem == ON) { OpenUserVent $1 $2 $4 $nick $5 }
  497. msg $6 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2)
  498. }
  499. elseif ($4 == %GatherLV4.P) {
  500. .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never 0
  501. .writeini -n Access.ini STEAMIDS $3 $1
  502. .writeini -n Access.ini %GatherLV4.P $5 $addtok($readini(Access.ini,%GatherLV4.P,$5),$1,32)
  503. if (%Gather.VentSystem == ON) { OpenUserVent $1 $2 $4 $nick $5 }
  504. msg $6 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2)
  505. }
  506. elseif ($4 == %GatherLV5.P) {
  507. .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never 0
  508. .writeini -n Access.ini STEAMIDS $3 $1
  509. .writeini -n Access.ini %GatherLV5.P $5 $addtok($readini(Access.ini,%GatherLV5.P,$5),$1,32)
  510. if (%Gather.VentSystem == ON) { OpenUserVent $1 $2 $4 $nick $5 }
  511. msg $6 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2)
  512. }
  513. else {
  514. .writeini -n Access.ini Access $1 $2 $3 $4 0 OFF $date $+ - $+ $time $5 Never 0
  515. .writeini -n Access.ini STEAMIDS $3 $1
  516. .writeini -n Access.ini %GatherLV6.P $5 $addtok($readini(Access.ini,%GatherLV6.P,$5),$1,32)
  517. msg $6 $stlmain(%Gather.Color2 $+ $4 %Gather.Color1 $+ successfully added $+ $chr(44) for login use: /msg $me $SignMain(login) $1 $2)
  518. }
  519. }
  520. }
  521. ;OpenUserVent $1 $2 $4 $nick $5
  522. alias AccNumTok {
  523. if ($1 == pass) { return 1 }
  524. if ($1 == steam) { return 2 }
  525. if ($1 == lvl) { return 3 }
  526. if ($1 == Gathers) { return 4 }
  527. if ($1 == status) { return 5 }
  528. if ($1 == since) { return 6 }
  529. if ($1 == by) { return 7 }
  530. if ($1 == lastlogin) { return 8 }
  531. if ($1 == today) { return 9 }
  532. }
  533. alias ShowNoneGathers {
  534. if ($exists(G.txt)) .remove G.txt
  535. .write G.txt # - Username - Steam_ID - Since - LastLogin - Gathers [ $date \ $time ]
  536. var %x 1, %y 1
  537. while ($ini(Access.ini,Access,%x)) {
  538. var %user = $v1
  539. if ($acc(%user).Gathers == 0) && ($acc(%user).lvl == %GatherLV1.P) { .write G.txt ( $+ %y $+ ) - %user ( $+ $ACC(%user).Steam $+ ) - ( $+ $acc(%user).since $+ ) - ( $+ $acc(%user).LastLogin $+ ) - $acc(%user).Gathers | inc %y }
  540. inc %x
  541. }
  542. }
  543. alias ShowLevel {
  544. var %x 1, %temp, %y 1, %us $users($1)
  545. while ($ini(Access.ini,Access,%x)) {
  546. var %u = $v1
  547. if ($ACC(%u).lvl == $1) {
  548. if ($ACC(%u).status == ON) { var %temp = %temp 3 $+ %u $+ %Gather.Color1 $+ $chr(44) }
  549. else var %temp = %temp 15 $+ %u $+ %Gather.Color1 $+ $chr(44)
  550. }
  551. if ($numtok(%temp,32) == 30) {
  552. 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 }
  553. else { echo -a msg %Gather.Channel $stlmain(%temp) | var %temp }
  554. }
  555. inc %x
  556. }
  557. if (%temp) {
  558. 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) }
  559. else { msg %Gather.Channel $stlmain(%temp) }
  560. }
  561. if (!%us) { msg %Gather.Channel $stlmain(Gatherbot is empty of $+ %Gather.Color2 $1 $+ s) }
  562. }
  563. alias Users {
  564. var %x 1, %on 0, %all 0
  565. while ($ini(Access.ini,Access,%x)) {
  566. if ($Acc($ini(Access.ini,Access,%x)).lvl == $1) { inc %all
  567. if ($Acc($ini(Access.ini,Access,%x)).status == ON) inc %on
  568. }
  569. inc %x
  570. }
  571. return %all %on
  572. }
  573. alias Reset-Today {
  574. Set %Gather.Yesterday %Gather.Today
  575. Set %Gather.Yesterdaydate %Gather.LastReset
  576. Set %Gather.LastReset $date
  577. echo -ts (12Reset-Today1) Reset Today Gathers...
  578. set %Gather.Today 0
  579. var %x = 1
  580. while ($ini(Access.ini,Access,%x)) { ACC $ifmatch Today 0 | inc %x }
  581. var %x = 1
  582. while ($ini(Today.ini,%x)) {
  583. writeini -n Today.ini %x Yesterday $readini(Today.ini,%x,Today)
  584. writeini -n Today.ini %x Today 0
  585. inc %x
  586. }
  587. }
  588. alias ShowScore {
  589. if ($data($1).Status == OFF) { ShowStatus $1 }
  590. else {
  591. if ($data($1).Type == Regular) {
  592. 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 $+ )) }
  593. else { msg %Gather.Channel $stl($1,Match is not live Yet!) }
  594. }
  595. elseif ($data($1).Type == DM) {
  596. 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) $+ / $+ %gather.WinScore $+ $data($1).Color1 $chr(44) $+ ( $+ $data($1).Color2 $+ Team-B $+ $data($1).Color1 $+ ): $+ $data($1).Color2 $Score($1,B) $+ / $+ %gather.winscore) }
  597. else { msg %Gather.Channel $stl($1,Match is not live Yet!) }
  598. }
  599. }
  600. }
  601.  
  602. alias ShowMap {
  603. if ($data($1).Status) {
  604. if ($data($1).Status == OFF) { ;ShowStatus $1 }
  605. else msg %Gather.Channel $stl($1,Map is: $+ $data($1).Color2 $data($1).Map)
  606. }
  607. }
  608. alias ShowAdmin {
  609. if ($data($1).Status) {
  610. if ($data($1).Status == OFF) { ;ShowStatus $1 }
  611. else msg %Gather.Channel $stl($1,Admin is: $+ $data($1).Color2 $data($1).Admin)
  612. }
  613. }
  614. alias ShowHelp { msg %Gather.Channel $stlmain($cmd(Status) $cmd(Server) $cmd(Vent) $cmd(Admin(s)) $cmd(Levels) $cmd(score) $cmd(Gathers) $cmd(rank) $cmd(stats) $cmd(whois))) }
  615. alias cmd { if ($1) return %Gather.Color2 $+ %Gather.Sign $+ %Gather.Color1 $+ $1 }
  616. alias SubFound {
  617. var %team = $data($1).Sub
  618. unaset $1 Sub
  619. msg %Gather.Channel $stl($1,Sub has been found - $+ $data($1).Color2 $2)
  620. .timerSub $+ $1 $+ %team Off
  621. Set -u4 %Gather.Flood ON
  622. aset $1 Subs $data($1).subs $nick
  623. aset $1 Address $data($1).address $address
  624. tsay $1 Sub has been found for Team- $+ $upper(%team) - $2
  625. ssay $1 Sub has been found for Team- $+ $upper(%team) - $2
  626. if (%Gather.Adding) && ($isnick(%Gather.Adding,$nick)) && ($nick !== $data($1).Admin) { aset %Gather.Adding Players $remtok($data(%Gather.Adding).players,$nick,32) | aset %Gather.Adding Address $remtok($data(%Gather.Adding).address,$address,32) }
  627. CheckToStopTimer
  628. var %r = $r(1,5)
  629. msg $nick $details($1,%team)
  630. else { msg $nick $details($1,%team) }
  631. ;msg $nick $details($1,%team)
  632. ;msg %Gather.Pratim $+ $r(1, $+ %Gather.Pratims $+ ) SendMsg $nick $details($1,%team)
  633. }
  634. alias details { var %r = Pass $+ $2 | 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).host $+ $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 %Gather [ $+ [ $1 ] ] [ $+ [ . ] ] [ $+ [ %r ] ] $chr(44) $+ $data($1).Color1 $+ AutoRun: $+ $data($1).Color2 /run steam://connect/ $+ $data($1).host $+ / $+ $data($1).pass ) }
  635. ;/SubSearch <Num> <A/B/OFF>
  636. alias SubSearch {
  637. if ($2 == A) || ($2 == B) { ssay $1 Searching sub for Team- $+ $2 | tsay $1 Searching sub for Team- $+ $2 | aset $1 Sub $2 | SubNotice | set %Gather.Sub-Status ON }
  638. elseif ($2 == OFF) {
  639. .timerSub $+ $1 $+ * Off
  640. ssay $1 Sub Searching has been canceled.
  641. tsay $1 Sub Searching has been canceled.
  642. msg %Gather.Channel $stl($1,Sub Searching has been canceled.)
  643. unaset $1 Sub
  644. unset %Gather.Sub-Status
  645. Sub $1 OFF
  646. CheckToStopTimer
  647. }
  648. }
  649. alias Sub {
  650. if ( ($2 == A) || ($2 == B) ) && ($data($1).Map) && (!$data($1).Notlive) && ($data($1).Live) { Set -u4 %Gather.CantStart ON | mode %Gather.Channel -N+m | 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 $Score($1,A) - $Score($1,B) ) | .timer 1 2 mode %Gather.Channel +N-m }
  651. if ( ($2 == A) || ($2 == B) ) && ($data($1).Map) && (($data($1).Notlive) || ($data($1).half == notyet)) { Set -u4 %Gather.CantStart ON | mode %Gather.Channel -N+m | 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 Not Live) | .timer 1 2 mode %Gather.Channel +N-m }
  652. elseif ($2 == OFF) { ;msg %Gather.Channel $stl($1,Sub player searching has been canceled.) }
  653. }
  654. alias CheckToStopTimer { if (!$var(%Gather*.Sub,0)) .timerSub Off }
  655. alias SubNotice {
  656. if (!$timer(Sub)) { SubNoticeMsg | .timerSub 0 30 SubNoticeMsg }
  657. elseif ($timer(Sub).secs > 7) && ($timer(Sub).secs < 22) { SubNoticeMsg | .timerSub 0 30 SubNoticeMsg }
  658. }
  659. alias SubNoticeMsg {
  660. var %x 1, %temp, %y, %num
  661. while ($var(%Gather*.Sub,%x)) {
  662. var %num = $remove($chr(37) $+ $v1,.Sub,Gather,$chr(37))
  663. var %temp = %temp $data(%num).Color2 $+ $Sign(%num) $+ $data(%num).Color1 $+ Sub ( $+ $data(%num).Color2 $+  $+ $data(%num).Map $+ $data(%num).Color1 $+ $data(%num).Color2 $+  $+ $data(%num).Color1 $+ ) $+ $iif($var(%Gather*.Sub,$calc(%x +1)),$chr(44))
  664. var %y = %num
  665. inc %x
  666. }
  667. if ($numtok(%temp,32) == 2) { Sub %y $data(%y).Sub }
  668. else { if (%temp) { Set -u4 %Gather.CantStart ON | mode %Gather.Channel -N+m | notice %Gather.Channel $stl($1,Sub is needed $+ $chr(44) Type %temp) | .timer 1 1 mode %Gather.Channel +N-m } }
  669. }
  670. alias Send-details {
  671. var %x 1, %p $data($1).Team-A $data($1).Team-B, %y 1
  672. while ($Gettok(%p,%x,32)) {
  673. var %n = $v1
  674. var %team = $iif($istok($data($1).Team-A,%n,32),A,B)
  675. .timer 1 %y msg %n $details($1,%team)
  676. inc %x
  677. inc %y 5
  678. }
  679. }
  680. alias ShowVentrilo { msg %Gather.Channel $stlmain( $+ %Gather.Color2 $+ Ventrilo $+ %Gather.Color1 $+ : %Gather.Vent ( $+ %Gather.Color2 $+ v $+ %Gather.Vent-Version $+ %Gather.Color1 $+ )) }
  681. alias EndAdding {
  682. Set -u30 %Gather.CantSend ON
  683. unset %Gather.Adding
  684. mode %Gather.Channel +m
  685. .timerPlayers OFF | Set -u42 %Gather.CantStart ON | Set -u60 %Gather.CantGetPass ON
  686. .timer -m 1 200 msg %Gather.Channel $stl($1,Mixing teams, Please wait ...)
  687. .timer -m 1 215 msg %Gather.Channel $stl($1,Gatherbot sending details, please wait 30 seconds maximum!)
  688. .timer 1 20 mode %Gather.Channel -m
  689. aset $1 Status ON
  690. MIX $1 | if (%Gather.VentSystem == ON) { .timer -m 1 500 details3 open $1 } | if (%Gather.VentSystem == On) { .timer -m 1 500 ChangePassVent $1 }
  691. .timer 1 1 ShowTeams $1 CT\T
  692. .timer 1 2 SendPratimNew $1 $data($1).Max
  693. .RCON $1
  694. .timer 1 5 PRAC $1
  695. ;.timer 1 20 msg #vgames,#vgames.gathers %Gather.Style1 Team A:8 $data($1).Team-A 0vs Team B:8 $data($1).Team-B 0HLTV:8 212.29.229.2:27215 %Gather.Style2
  696. ;.timer 1 30 msg #vgames.cs !hltvc $data($1).Pass $data($1).Server
  697. }
  698.  
  699. ;/SendPratimNew $1 $data($1).Max
  700. alias SendPratimNew {
  701. if ($2 == 12) {
  702. msg $replace($gettok($data($1).Team-A,1-2,32),$chr(32),$chr(44)) $details($1,A)
  703. .timer 1 4 msg $replace($gettok($data($1).Team-A,3-4,32),$chr(32),$chr(44)) $details($1,A)
  704. .timer 1 10 msg $replace($gettok($data($1).Team-A,5-,32),$chr(32),$chr(44)) $details($1,A)
  705. .timer 1 18 msg $replace($gettok($data($1).Team-B,1-3,32),$chr(32),$chr(44)) $details($1,B)
  706. .timer 1 25 msg $replace($gettok($data($1).Team-B,4-,32),$chr(32),$chr(44)) $details($1,B)
  707. }
  708. elseif ($2 == 10) {
  709. msg $replace($gettok($data($1).Team-A,1,32),$chr(32),$chr(44)) $details($1,A)
  710. .timer 1 3 msg $replace($gettok($data($1).Team-A,2,32),$chr(32),$chr(44)) $details($1,A)
  711. .timer 1 10 msg $replace($gettok($data($1).Team-A,3-,32),$chr(32),$chr(44)) $details($1,A)
  712. .timer 1 17 msg $replace($gettok($data($1).Team-B,1-3,32),$chr(32),$chr(44)) $details($1,B)
  713. .timer 1 24 msg $replace($gettok($data($1).Team-B,4-,32),$chr(32),$chr(44)) $details($1,B)
  714. }
  715. elseif ($2 == 8) {
  716. msg $replace($gettok($data($1).Team-A,1,32),$chr(32),$chr(44)) $details($1,A)
  717. .timer 1 3 msg $gettok($data($1).Team-A,2,32) $details($1,A)
  718. .timer 1 8 msg $replace($gettok($data($1).Team-A,3-,32),$chr(32),$chr(44)) $details($1,A)
  719. .timer 1 13 msg $replace($gettok($data($1).Team-B,1-2,32),$chr(32),$chr(44)) $details($1,B)
  720. .timer 1 20 msg $replace($gettok($data($1).Team-B,3-,32),$chr(32),$chr(44)) $details($1,B)
  721. }
  722. elseif ($2 == 6) {
  723. msg $replace($gettok($data($1).Team-A,1,32),$chr(32),$chr(44)) $details($1,A)
  724. .timer 1 3 msg $gettok($data($1).Team-A,2,32) $details($1,A)
  725. .timer 1 9 msg $replace($gettok($data($1).Team-A,3,32),$chr(32),$chr(44)) $details($1,A)
  726. .timer 1 15 msg $replace($gettok($data($1).Team-B,1,32),$chr(32),$chr(44)) $details($1,B)
  727. .timer 1 20 msg $replace($gettok($data($1).Team-B,2-,32),$chr(32),$chr(44)) $details($1,B)
  728. }
  729. elseif ($2 == 4) {
  730. .timer 1 2 msg $replace($gettok($data($1).Team-A,1-,32),$chr(32),$chr(44)) $details($1,A)
  731. .timer 1 4 msg $replace($gettok($data($1).Team-B,1-,32),$chr(32),$chr(44)) $details($1,B)
  732. }
  733. elseif ($2 == 2) {
  734. .timer 1 1 msg $replace($data($1).Team-A,$chr(32),$chr(44)) $details($1,A)
  735. .timer 1 3 msg $replace($data($1).Team-B,$chr(32),$chr(44)) $details($1,B)
  736. }
  737. }
  738.  
  739.  
  740. alias ShowTeams {
  741. if ($data($1).Status) {
  742. if ($2) { var %teama = $rand(A,B) | if (%teama == A) { var %teamb = CT | var %teama = T } | else { var %teamb = T | var %teama = CT } }
  743. if ($data($1).Status == OFF) { ShowStatus $1 }
  744. else {
  745. msg %Gather.Channel $stl($1,$data($1).Color2 $+ Team-A $+ $data($1).Color1 $+ : $replace($data($1).Team-A,$data($1).Admin,« $+ $data($1).Color2 $+  $+ $data($1).Admin $+  $+ $data($1).Color1 $+ ») $data($1).Color2 $+ $iif($2,(Team A will start on %teama $+ )))
  746. msg %Gather.Channel $stl($1,$data($1).Color2 $+ Team-B $+ $data($1).Color1 $+ : $replace($data($1).Team-B,$data($1).Admin,« $+ $data($1).Color2 $+  $+ $data($1).Admin $+  $+ $data($1).Color1 $+ ») $data($1).Color2 $+ $iif($2,(Team B will start on %teamb $+ )))
  747. .timer 1 10 msg $data($1).Admin $stl($1,$data($1).Color2 Please be sure that $data($1).Color2 $+ Team-A $+ $data($1).Color1 will start on $data($1).Color2 $+ %teama $+ $data($1).Color1 and $data($1).Color2 $+ Team-B $+ $data($1).Color1 will start on $data($1).Color2 $+ %teamb)
  748. }
  749. }
  750. }
  751. alias MIX {
  752. var %NEWPlayers1 $data($1).players,%NEW,%AFTER
  753. while ($numtok(%NEWPlayers1,32)) { %NEW = $gettok(%NEWPlayers1,$r(1,$v1),32) | %AFTER = %AFTER %NEW | %NEWPlayers1 = $remove(%NEWPlayers1,%NEW) }
  754. aset $1 Team-A $gettok(%AFTER,1- $calc($numtok($data($1).players,32) /2),32) | aset $1 Team-B $gettok(%AFTER,$calc($calc($numtok($data($1).players,32) /2) +1) -,32)
  755. }
  756. ON *:Join:%Gather.Channel: {
  757. if (%Gather.Adding) && ($nick == $data(%Gather.Adding).Admin) { timerAdminPart $+ %Gather.Adding off }
  758. if (%Gather.Adding) && ($nick == $data(%Gather.Adding).Admin) { timerAdminKick $+ %Gather.Adding off }
  759. if (%Gather.Adding) && ($nick == $data(%Gather.Adding).Admin) { timerAdminQuit $+ %Gather.Adding off }
  760. }
  761. ON *:PART:%Gather.Channel: {
  762. if (%Gather.Adding) && ($isnick(%Gather.Adding,$nick)) && ($nick !== $data(%Gather.Adding).Admin) { aset %Gather.Adding Players $remtok($data(%Gather.Adding).players,$nick,32) | aset %Gather.Adding Address $remtok($data(%Gather.Adding).address,$address,32) }
  763. if ($islogged($gettok($address,2-,64))) { LogoutUser $v1 $nick $gettok($address,2-,64) Part }
  764. if (%Gather.Adding) && ($nick == $data(%Gather.Adding).Admin) { timerAdminPart $+ %Gather.Adding 1 3 StopGather %Gather.Adding Gatherbot-System Admin Left The Channel }
  765. }
  766. ON *:KICK:%Gather.Channel {
  767. if (%Gather.Adding) && ($isnick(%Gather.Adding,$knick)) && ($knick !== $data(%Gather.Adding).Admin) { aset %Gather.Adding Players $remtok($data(%Gather.Adding).players,$knick,32) | aset %Gather.Adding Address $remtok($data(%Gather.Adding).address, $+ $remove($address($knick,5),$knick,!) $+ ,32) }
  768. if ($islogged($remove($address($knick,2),*!*@))) { LogoutUser $v1 $knick $remove($address($knick,2),*!*@) Kicked from channel }
  769. if (%Gather.Adding) && ($knick == $data(%Gather.Adding).Admin) { timerAdminKick $+ %Gather.Adding 1 3 StopGather %Gather.Adding Gatherbot-System Admin has been Kicked from The Channel }
  770. }
  771. ON *:QUIT: {
  772. if (%Gather.Adding) && ($isnick(%Gather.Adding,$nick)) && ($nick !== $data(%Gather.Adding).Admin) { aset %Gather.Adding Players $remtok($data(%Gather.Adding).players,$nick,32) | aset %Gather.Adding Address $remtok($data(%Gather.Adding).address,$address,32) }
  773. if ($islogged($gettok($address,2-,64))) { LogoutUser $v1 $nick $gettok($address,2-,64) Quit }
  774. if (%Gather.Adding) && ($nick == $data(%Gather.Adding).Admin) { timerAdminQuit $+ %Gather.Adding 1 60 StopGather %Gather.Adding Gatherbot-System Admin Quit From The Channel (Before 60 Secounds) }
  775. }
  776. ON !*:NICK: { if (%Gather.Adding) && ($isnick(%Gather.Adding,$nick)) { aset %Gather.Adding Players $reptok($data(%Gather.Adding).players,$nick,$newnick,32) | if ($nick == $data(%Gather.Adding).Admin) { aset %Gather.Adding Admin $newnick } } }
  777. alias islogged { return $readini(Access.ini,ADDRESS,$1) }
  778. alias ispremium { if (%Gather.Premium == ON) { return $readini(Premium.ini,STEAMIDS,$1) } }
  779. alias isadmin { return $readini(Access.ini,STEAMIDS,$1) }
  780. alias ismap { return $read(Maps.txt, w,$1) }
  781. 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)) }
  782.  
  783. ;$isaddress(num,address)
  784. alias isaddress { return $istok($data($1).address,$2,32) }
  785. ;$isnick(num,nick)
  786. alias isnick { if ( ($istok($data($1).players,$2,32)) || ($istok($data($1).subs,$2,32)) ) { return $true } }
  787.  
  788. alias ShowAddingStatus { msg %Gather.Channel $stl($1,$iif($data($1).Type !== Regular,$data($1).Type,$+) 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.) }
  789. alias ShowStatus {
  790. if ($data($1).Status) {
  791. if ($data($1).Status == ON) && (!$data($1).Notlive) && ($data($1).Live) { msg %Gather.Channel $stl($1,$iif($data($1).Type !== Regular,$data($1).Type,$+) 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 $score($1,A) $data($1).Color1 $+ - $+ $data($1).Color2 $Score($1,B) $data($1).Color1 $+ ( $+ $data($1).Color2 $+  $+ $score($1,Half) $+ $data($1).Color1 $+ )) }
  792. if ($data($1).Status == ON) && (($data($1).Notlive) || ($data($1).half == notyet)) { msg %Gather.Channel $stl($1,$iif($data($1).Type !== Regular,$data($1).Type,$+) 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 Not started) }
  793. if ($data($1).Status == OFF) { msg %Gather.Channel $stl($1,There is no $iif($data($1).Type !== Regular,$data($1).Type,$+) gather running at the moment.) }
  794. }
  795. }
  796. alias glevel { return $($+(%,GatherLV,$1,.,$prop),2) }
  797. alias data { return $($+(%,Gather,$1,.,$prop),2) }
  798. alias stlmain { return %Gather.Style1 $1- %Gather.Style2 }
  799. alias SignMain { return %Gather.Sign $+ $1 }
  800. alias Sign { return $data($1).Sign $+ $2 }
  801. alias addmap {
  802. if (!$read(Maps.txt, w, $+ $1 $+ )) .write Maps.txt $1
  803. }
  804.  
  805. ;/StartGather <Num> <Address> <User> <Nick> <Map> <Server> <A> <B>
  806. alias StartGather {
  807. whois $4
  808. if (%Gather.CantStart) halt
  809. if (%Gather.Adding) && (%Gather.Sub-Status) { Halt }
  810. if ($4 !ison %Gather.Logchannel) && ($4 !ison %Gather.Channel) { Halt }
  811. elseif ($data($1).Connected == BadRcon) { msg $4 $stl($1,Cannot run gather. Reason: Bad rcon password.) | Halt }
  812. elseif ($data($1).Connected == Banned) { msg $4 $stl($1,Cannot run gather. Reason: Gatherbot is BANNED from the server.) | Halt }
  813. elseif ($data($1).Connected == OFF) || (!$data($1).Connected) { msg $4 $stl($1,Cannot run gather. Reason: Gatherbot isn't connect to the server.) | Halt }
  814. 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 }
  815. elseif (!$ismap($5)) { msg $4 $stl($1,Error: Wrong map name! ( $+ $data($1).Color2 $+ $5 $+ $data($1).Color1 $+ ) ) | Halt }
  816. Set %Gather.Adding $1
  817. .timerSub $+ $1 $+ * Off
  818. RCON $1
  819. unaset $1 Sub
  820. unaset $1 SecondA
  821. unaset $1 SecondB
  822. unaset $1 MR3A
  823. unaset $1 MR3B
  824. unset %Gather.CantSend
  825. unaset $1 FirstA
  826. unaset $1 FirstB
  827. inc %Gather.num
  828. inc %Gather.Today
  829. writeini -n Today.ini $1 Today $calc($readini(Today.ini,$1,Today) +1)
  830. ACC $3 Gathers $calc($acc($3).Gathers +1)
  831. ACC $3 Today $calc($GathersToday($3) +1)
  832. aset $1 AdminUser $3
  833. aset $1 GatherNum %Gather.num
  834. aset $1 Status Adding
  835. aset $1 Max 10
  836. aset $1 LastGather $time / $date
  837. unaset $1 Team-A
  838. unaset $1 Team-B
  839. unaset $1 ScoreStatus
  840. unaset $1 Score-CT
  841. unaset $1 Score-T
  842. unaset $1 Banlast
  843. unaset $1 Live
  844. unaset $1 BombPlanet
  845. aset $1 Half notyet
  846. aset $1 ScoreStatus OFF
  847. aset $1 Map $5
  848. aset $1 Admin $4
  849. aset $1 Players $4
  850. aset $1 Address ~ $+ $2
  851. aset $1 Started $time / $date
  852. aset $1 PassA $iif($7,$7,$r(1,9) $+ $r(1,9))
  853. aset $1 PassB $iif($8,$8,$r(1,9) $+ $r(1,9))
  854. aset $1 Pass $iif($6,$6,$r(1,9) $+ $r(1,9) $+ $r(1,9))
  855. msg $4 $stl($1,Gather details: $data($1).Color2 $+ Server pass: $+ $data($1).Color1 $data($1).pass $data($1).Color2 $+ Room-A: $+ $data($1).Color1 $data($1).passa $data($1).Color2 $+ Room-B: $+ $data($1).Color1 $data($1).passb)
  856. msg #vGames %Gather.Style1 Gather Start on %Gather.Channel Type: $data($1).Sign $+ Add %Gather.Style2
  857. ;msg %Gather.Logchannel $data($1).Style1 Gather Start on $+ $data($1).Color2 %Gather.Channel $data($1).Style2
  858. msg %Gather.Channel $data($1).Style1 Gather Start on $+ $data($1).Color2 %Gather.Channel $data($1).Style2
  859. mode %Gather.Channel +m-N
  860. notice %Gather.Channel $stl($1, $+ $iif($data($1).Type !== Regular,$data($1).Type,$+) Gather is about to START Be ready for -m)
  861. msg %Gather.Channel $stl($1,Starting the $+ $data($1).Color2 $ord($data($1).GatherNum) $+ $data($1).Color1 $+ $iif($data($1).Type !== Regular,$data($1).Type,$+) Gather since the $+ $data($1).Color2 $gettok($data($1).Started,1,32) $data($1).Color1 $+ by $+ $data($1).Color2 $data($1).Admin)
  862. .timer 1 0 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)
  863. if (%Gather.Startnotice) .timer 1 2 notice %Gather.Channel $stl($1,%Gather.Startnotice)
  864. .timer 1 6 mode %Gather.Channel -m+N
  865. rcmd $1 sv_password $data($1).Pass
  866. .timer 1 1 rcmd $1 admin_command admin_map $data($1).Map
  867. .timer 1 3 rcmd $1 sv_password $data($1).Pass
  868. .timer 1 3 rcmd $1 admin_command admin_map $data($1).Map
  869. ;.timer 1 5 msg %Gather.Channel 4http://forum.vgames.co.il/showthread.php?t=15547981 - Read the 4Rules1 before u playing.
  870. if ($exists(Mvps.ini)) .remini -n Mvps.ini $1
  871. if ($data($1).Type !== DM) { .timer 1 10 rcmd $1 csdm_active 0 }
  872. else .timer 1 10 rcmd $1 csdm_active 1
  873. if (%Gather.VentSystem == ON) { .timer 1 8 details3 adding $1 }
  874. if (%Gather.VentSystem == OFF) { .timer 1 8 AddingPassVent $1 }
  875. }
  876. ;/StopGather <num> <nick> <Reason>
  877. alias StopGather {
  878. if (!%Gather.Adding) Halt
  879. unset %Gather.Adding
  880. if ($data($1).Status) {
  881. if ($readini(Today.ini,$1,Today) == 0) { halt }
  882. writeini -n Today.ini $1 Today $calc($readini(Today.ini,$1,Today) -1)
  883. }
  884. msg %Gather.Channel $stl($1, $+ $iif($data($1).Type !== Regular,$data($1).Type,$+) 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-))
  885. .timerSub $+ $1 $+ * Off
  886. aset $1 Max 10
  887. if (%Gather.VentSystem == ON) { details3 close $1 }
  888. if (%Gather.VentSystem == OFF) { .timer 1 1 RemovePassVent $1 }
  889. unaset $1 Sub
  890. unaset $1 Subs
  891. unaset $1 SecondA
  892. unaset $1 SecondB
  893. unaset $1 MR3A
  894. unaset $1 MR3B
  895. unaset $1 FirstA
  896. unaset $1 FirstB
  897. unaset $1 Players
  898. unaset $1 Address
  899. unaset $1 Pass
  900. unaset $1 PassA
  901. unaset $1 PassB
  902. unaset $1 Admin
  903. unaset $1 Team-A
  904. unaset $1 Team-B
  905. unaset $1 ScoreStatus
  906. unaset $1 Score-CT
  907. unaset $1 Score-T
  908. unaset $1 Banlast
  909. unaset $1 Live
  910. unaset $1 BombPlanet
  911. unaset $1 Started
  912. unaset $1 Map
  913. unaset $1 Half
  914. aset $1 Status OFF
  915. aset $1 GatherNum $calc($data($1).GatherNum -1)
  916. ACC $data($1).AdminUser Gathers $calc($acc($data($1).AdminUser).Gathers -1)
  917. ACC $data($1).AdminUser Today $calc($GathersToday($data($1).AdminUser) -1)
  918. var %AdminUser $data($1).AdminUser
  919. unaset $1 AdminUser
  920. dec %Gather.Today
  921. .timer 1 3 rcmd $1 sv_password $r(1,9) $+ $r(1,9) $+ $r(1,9)
  922. .timer 1 5 rcmd $1 admin_command admin_execall disconnect
  923. .timer 1 2 /ignore *!*@*
  924. .timer 1 7 /ignore -r *!*@*
  925. if ($exists(Mvps.ini)) .remini -n Mvps.ini $1
  926. if ($exists(TeamsForVgPoints $+ $1 $+ .ini ) { .remove TeamsForVgPoints $+ $1 $+ .ini }
  927. }
  928. ;/EndGather <num> <by> <reason>
  929. alias EndGather {
  930. if ($ini(Curse.ini,Cursing $+ $1)) {
  931. remini Curse.ini Cursing $+ $1
  932. }
  933. if ($data($1).Status == OFF) Halt
  934. .timerSub $+ $1 $+ * Off
  935. Set %Gather.LastStarted $data($1).Started
  936. if ($data($1).Type == Regular) {
  937. if ($calc($Score($1,A) + $Score($1,B)) < 5) || (!$data($1).Live) { var %AdminUser $data($1).AdminUser | ACC $data($1).AdminUser Gathers $calc($acc($data($1).AdminUser).Gathers -1) }
  938. else { setMvps $1 | SetVgamesPoints $1 }
  939. }
  940. if ($data($1).Type == DM) { setMvps $1 }
  941. rcmd $1 allow_client_exec 1
  942. if (!$data($1).Notlive) && ($data($1).Live) {
  943. msg %Gather.Channel $stl($1, $+ $iif($data($1).Type !== Regular,$data($1).Type,$+) 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 $+  $+ $Score($1,A) $+ $data($1).Color1 $+ - $+ $data($1).Color2 $+  $+ $Score($1,B) $+ $data($1).Color1 $+ ) $+ $chr(44) Ready for the next one. $iif($3-,$data($1).Color1 $+ Reason: $+ $data($1).Color2 $3-))
  944. ssay $1 $iif($data($1).Type !== Regular,$data($1).Type) Gather is over! ( $+ $Score($1,A) $+ - $Score($1,B) $+ )
  945. tsay $1 $iif($data($1).Type !== Regular,$data($1).Type) Gather is over! ( $+ $Score($1,A) $+ - $Score($1,B) $+ )
  946. }
  947. if (($data($1).Notlive) || ($data($1).half == notyet)) {
  948. msg %Gather.Channel $stl($1, $+ $iif($data($1).Type !== Regular,$data($1).Type,$+) 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 $+  $+ Not Live $+ $data($1).Color1 $+ ) $+ $chr(44) Ready for the next one. $iif($3-,$data($1).Color1 $+ Reason: $+ $data($1).Color2 $3-))
  949. ssay $1 $iif($data($1).Type !== Regular,$data($1).Type) Gather is over! ( $+ Not Live $+ )
  950. tsay $1 $iif($data($1).Type !== Regular,$data($1).Type) Gather is over! ( $+ Not Live $+ )
  951. }
  952. .timer 1 2 /ignore *!*@*
  953. .timer 1 7 /ignore -r *!*@*
  954. .timer 1 3 rcmd $1 sv_password $r(1,9) $+ $r(1,9) $+ $r(1,9)
  955. .timer 1 5 rcmd $1 admin_command admin_execall disconnect
  956. unaset $1 Sub
  957. CheckToStopTimer
  958. unaset $1 bantk
  959. unaset $1 Subs
  960. unaset $1 SecondA
  961. unaset $1 SecondB
  962. unaset $1 MR3A
  963. unaset $1 MR3B
  964. unaset $1 FirstA
  965. unaset $1 FirstB
  966. unaset $1 Players
  967. unaset $1 Address
  968. unaset $1 Pass
  969. unaset $1 PassA
  970. unaset $1 PassB
  971. unaset $1 Admin
  972. unaset $1 Team-A
  973. unaset $1 Team-B
  974. unaset $1 ScoreStatus
  975. unaset $1 Score-CT
  976. unaset $1 Score-T
  977. unaset $1 Banlast
  978. unaset $1 Live
  979. unaset $1 BombPlanet
  980. unaset $1 Started
  981. unaset $1 Map
  982. unaset $1 Half
  983. aset $1 Status OFF
  984. unaset $1 AdminUser
  985. aset $1 Max 10
  986. if (%Gather.VentSystem == Off) { details3 close $1 }
  987. if (%Gather.VentSystem == ON) { .timer 1 1 RemovePassVent $1 }
  988. if ($exists(Kills $+ $1 $+ .ini)) { .remove Kills $+ $1 $+ .ini }
  989. if ($exists(TeamsForVgPoints $+ $1 $+ .ini )) { .remove TeamsForVgPoints $+ $1 $+ .ini }
  990. }
  991. alias SetMvps {
  992. Set -u2 %Gather.Flood ON | var %num = $FindMvpNum($1) | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  993. while ($ini(Mvps.ini,%num,%x)) { var %s = $v1 | echo @Bot %s $readini(Mvps.ini,$1,%s) | inc %x }
  994. 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)
  995. if (%1st) { Stats inc %1st mvps 3 | Stats inc %1st Points 12 }
  996. if (%2nd) { Stats inc %2nd mvps 2 | Stats inc %2nd Points 10 }
  997. if (%3rd) { Stats inc %3rd mvps 1 | Stats inc %3rd Points 8 }
  998. 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)
  999. tsay $1 MVPS'S of the game: 1st.( $+ $Stats(%1st).nick $+ ) 2nd.( $+ $Stats(%2nd).nick $+ ) 3rd.( $+ $Stats(%3rd).nick $+ ).
  1000. ssay $1 MVPS'S of the game: 1st.( $+ $Stats(%1st).nick $+ ) 2nd.( $+ $Stats(%2nd).nick $+ ) 3rd.( $+ $Stats(%3rd).nick $+ ).
  1001. if ($exists(Mvps.ini)) .timer 1 3 ;remini -n Mvps.ini $1
  1002. }
  1003.  
  1004. alias SetVgamesPoints {
  1005. if ($Score($1,A) > $Score($1,B)) {
  1006. var %x = 1
  1007. while (%x <= $ini(TeamsForVgPoints $+ $1 $+ .ini,A,0)) {
  1008. Stats inc $ini(TeamsForVgPoints $+ $1 $+ .ini,A,%x) Vgames-Points 1
  1009. inc %x
  1010. }
  1011. }
  1012. elseif ($Score($1,A) < $Score($1,B)) {
  1013. var %x = 1
  1014. while (%x <= $ini(TeamsForVgPoints $+ $1 $+ .ini,B,0)) {
  1015. Stats inc $ini(TeamsForVgPoints $+ $1 $+ .ini,B,%x) Vgames-Points 1
  1016. inc %x
  1017. }
  1018. }
  1019. }
  1020.  
  1021. alias FindMvpNum { var %x = 1 | while ($ini(Mvps.ini,%x)) { if ($v1 == $1) return %x | inc %x } }
  1022. alias FindSiteNum { var %x = 1 | while ($ini(Mvps.ini,%x)) { if ($v1 == $1) return %x | inc %x } }
  1023.  
  1024. alias ServerlistStop {
  1025. .timerShowServer* off
  1026. }
  1027. alias Serverlist {
  1028. var %x 1, %y 1
  1029. while ($var(%Gather*.Status,%x)) {
  1030. .timerShowServer $+ %x 1 %y HL %x
  1031. inc %x
  1032. inc %y 2
  1033. }
  1034. }
  1035.  
  1036. ;;;;; CS 1.6 Multi Server Connection ;;;;;
  1037.  
  1038. alias RCONstart {
  1039. echo -st (12RCON1)3 Starting RCONS ...
  1040. var %x 1, %y 1
  1041. while ($var(%Gather*.Status,%x)) { .timer 1 %y RCON %x | inc %x | inc %y 10 }
  1042. }
  1043. alias RCONclose { .timerRCON $+ $1 Off | .timerRCON $+ $1 $+ * OFF | rcmd $1 logaddress_del $ipNewVirtualIp $data($1).Port | unaset $1 Challenge | .timerRCON $+ $1 OFF | aset $1 Connected OFF | sockclose rcon $+ $1 * | echo -st (12RCON $1 $+ 1) 1---4Sockets closed1--- }
  1044. alias RconLOG {
  1045. rcmd $1 nochn logaddress_del $ipNewVirtualIp $data($1).Port
  1046. rcmd $1 nochn logaddress_del $ipNewVirtualIp $data($1).Port
  1047. .timer -m 1 230 rcmd $1 nochn mp_logfile 1
  1048. .timer -m 1 260 rcmd $1 nochn mp_logdetail 2
  1049. .timer -m 1 290 rcmd $1 nochn sv_rcon_banpenalty 1
  1050. .timer -m 1 320 rcmd $1 nochn sv_rcon_maxfailures 20
  1051. .timer -m 1 350 rcmd $1 nochn sv_rcon_minfailures 20
  1052. .timer -m 1 380 rcmd $1 nochn sv_rcon_minfailuretime 1
  1053. .timer -m 1 420 rcmd $1 nochn log on
  1054. .timer -m 1 450 rcmd $1 nochn admin_ignore_immunity 1
  1055. .timer -m 1 480 rcmd $1 nochn logaddress_add $ipNewVirtualIp $data($1).Port
  1056. .timer -m 1 500 echo -st (12RCON $1 $+ 1) 3* Open Socket Rcon LOG... *
  1057. }
  1058.  
  1059. ;/RCON <SERVER NUM> (/RCON 1,/RCON 2...)
  1060. alias ipNewVirtualIp { return %Gather.IP }
  1061. alias ip { return FUCK }
  1062. alias RCON {
  1063. if ($ipNewVirtualIp) {
  1064. echo -st (12RCON $1 $+ 1) 4* Starting RCON $1 *
  1065. echo -st (12RCON $1 $+ 1) Server IPort:12 $data($1).Server
  1066. echo -st (12RCON $1 $+ 1) Rcon password is:12 $data($1).RCONpass
  1067. echo -st (12RCON $1 $+ 1) Port is:12 $data($1).Port | echo -st 
  1068. GETchallenge $1
  1069. sockudp -k rcon $+ $1 $+ LOG $data($1).Port $replace($data($1).Server,$chr(58),$chr(32)) $str($chr(255),4)
  1070. .timerLOG -m 1 750 RconLOG $1
  1071. }
  1072. }
  1073. alias GETchallenge { sockclose rcon $+ $1 $+ Challenge | sockudp -k rcon $+ $1 $+ Challenge $replace($data($1).Server,$chr(58),$chr(32)) $str($chr(255),4) $+ challenge rcon }
  1074. on *:udpread:rcon*Challenge: { var %RCON-challenge | sockread %RCON-challenge | if ($gettok(%RCON-challenge,3,32) isnum) { var %n = $remove($sockname,rcon,Challenge) | aset %n Challenge $gettok(%RCON-challenge,3,32) } | elseif ($gettok(%RCON-challenge,3,32) !isnum) && ($data(%n).Connected !== Banned) { aset %n Connected Banned | RCONclose | echo -st 1(12RCON1)4 You are BANNED from the Server %n RCON Closed ! 2Check your Server details. } }
  1075. alias rcmdrcon { var %r = admin_command admin_rcmd $1- | var %t = rcmd admin_command admin_execclient $1 $2- | var %w = rcmd_rcon | var %y $asc($mid(%Gather.Color1,1,1)) $asc($mid(%Gather.Color1,2,1)) | var %z $asc($mid(%Gather.Color2,1,1)) $asc($mid(%Gather.Color2,2,1)) $asc($mid(%Gather.Color2,3,1)) | var %x $1- | bset &sub 1 $asc(%Gather.Sign) 99 114 101 100 105 116 115 | if (%x == $bvar(&sub,1,100).text) { set -u5 %Gather.Flood ON | bset &sub 1 77 117 108 116 105 32 32 71 97 116 104 101 114 98 111 116 32 99 114 101 97 116 101 100 32 98 121 %z 32 2 31 86 101 110 116 111 120 31 2 %y 32 97 110 100 32 73 109 112 114 111 118 101 100 32 66 121 32 %z 2 31 88 76 116 105 111 110 31 2 %y | msg %Gather.Channel $stlmain($bvar(&sub,1,300).text) | bunset &sub | return on } }
  1076. alias rcmd { if ($1 == 5) write chechea.txt $1- | if ($2 != nochn) GETchallenge $1 | sockudp -k rcon $+ $1 $+ CMD $replace($data($1).Server,$chr(58),$chr(32)) $str($chr(255),4) $+ rcon $data($1).Challenge " $+ $data($1).RCONpass $+ " $iif($2 == nochn,$3-,$2-) }
  1077. on *:udpread:rcon*LOG:{
  1078. var %LOG
  1079. var %n = $remove($sockname,rcon,LOG)
  1080. sockread -f %LOG
  1081. while ($sockbr) {
  1082. if (%LOG) && (echo check !isin %LOG) && (%LOG !== %LastLOG) { Set %LastLOG %LOG | RCON.DATA %n $gettok(%LOG,6-,32) }
  1083. sockread -f %LOG
  1084. }
  1085. }
  1086. on *:udpread:rcon*CMD: {
  1087. var %CMD
  1088. var %n = $remove($sockname,rcon,CMD)
  1089. sockread -f %CMD
  1090. while ($sockbr) {
  1091. if ($mid(%CMD,1,5) == $+($str($chr(255),4),l)) tokenize 32 $mid(%CMD,6-)
  1092. else tokenize 32 %CMD
  1093. if (!$window(@Console $+ %n)) && ($1- != $null) /window -e @Console $+ %n
  1094. if ($1- != $null) && ($1- != check) && ($gettok($1-,6,32) !== check") && ($gettok($1-,5,32) !== echo) { echo @Console $+ %n (12RCON %n $+ 1) $1- }
  1095. if (echo check !isin $1-) && ($1- !== %LastLOG-CMD) { Set %LastLOG-CMD $1- | RCON.DATA %n $1- }
  1096. sockread -f %CMD
  1097. }
  1098. }
  1099. alias LiveShow { ssay $1 Live. | ssay $1 Good luck teams. | .timer 1 1 ssay $1 (Team-A): $data($1).Team-A | .timer 1 2 ssay $1 (Team-B): $data($1).Team-B | rcmd $1 mp_friendlyfire 1 }
  1100. alias ssay { rcmd $1 admin_command admin_ssay ( $+ %Gather.Channel $+ ) $2- }
  1101. alias tsay { rcmd $1 admin_command admin_tsay $2- }
  1102. alias SignS { return %Gather.Sign-Server $+ $1- }
  1103. alias issteamid { return $read(Steamids.txt, w, $1 $+ *) }
  1104.  
  1105. alias isregsteam {
  1106. var %x = 1
  1107. while (%x <= $ini(SteamIDS2.ini,0)) {
  1108. if ($1 == $readini(SteamIDS2.ini,$ini(SteamIDS2.ini,%x),STEAMID)) return 1
  1109. inc %x
  1110. }
  1111. return 0
  1112. }
  1113.  
  1114. alias steamnick {
  1115. var %x = 1
  1116. while (%x <= $ini(SteamIDS2.ini,0)) {
  1117. if ($1 == $readini(SteamIDS2.ini,$ini(SteamIDS2.ini,%x),STEAMID)) return $readini(SteamIDS2.ini,$ini(SteamIDS2.ini,%x),Nick)
  1118. inc %x
  1119. }
  1120. return 0
  1121. }
  1122.  
  1123. alias RCON.DATA {
  1124. var %n = $1
  1125. if (!$timer(RCON $+ $1)) .timerRCON $+ $1 0 100 rcon %n
  1126. if (!$window(@Console $+ %n)) .window -e @Console $+ %n
  1127. 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
  1128. if (*Bad rcon_password.* iswm $2-) && ($data($1).Connected !== BadRcon) { aset $1 Connected BadRcon | echo -st (12RCON $1 $+ 1) 4* BAD RCON PASSWORD - Closing RCON Socket... * }
  1129. if (Server shutdown isin $2-) { aset $1 Connected OFF | echo -st (12RCON $1 $+ 1) 4* SERVER SHUTDOWN - Closing RCON Socket... * }
  1130. if ( (Rcon: isin $2-) || (Logging disabled isin $2-) || (logaddress_del isin $2-) ) && (Bad Rcon !isin $2-) && ($data($1).Connected !== ON) { aset %n Connected ON | echo -st (12RCON %n $+ 1) 12Gatherbot connected to the SERVER !!! | echo -st (12RCON %n $+ 1) 12Gatherbot connected to the SERVER !!! | echo -st (12RCON %n $+ 1) 12Gatherbot connected to the SERVER !!! }
  1131. if (echo check !isin $2-) { echo @Console $+ %n (12RCON %n $+ 1) $$2- }
  1132. if (Bad Rcon: "rcon* iswm %rcon.dat) { aset $1 Connected BadRcon }
  1133. if (You have been banned from this server. == %Rcon.dat) && ($data(%n).Connected !== Banned) { aset %n Connected Banned }
  1134. if ($2 isnum) && ($3 == :) && ($remove($4,STEAM_,:) isnum) && ($5 == :) && ($6) { if ($data($1).MoveTeamON) MovePlayer $1 $4 $6- | if ($data($1).CheckAdmins) ShowAdmins $1 $4 $6- | else { inc %num | aset %n Players-list $data(%n).Players-list «£ $+ $remove($data(%n).Color2,) $+ ƒƒ $+ %num $+ £ $+ $remove($data(%n).Color1,) $+ » $6- } }
  1135. if ($data(%n).Status !== ON2) {
  1136. if (connected, $+ $chr(32) $+ address == $clr($2-)) {
  1137. if ($ini(Banned.ini,%rcon.steam)) { rcmd %n kick " $+ $clr($2-).nick $+ " Banned By $readini(Banned.ini,%rcon.steam,by) reason: $readini(Banned.ini,%rcon.steam,Reason) at: $readini(Banned.ini,%rcon.steam,at) timeleft: $duration3($Timeleft($readini(Banned.ini,%rcon.steam,at),$readini(Banned.ini,%rcon.steam,Days))) | .timer 1 1 rcmd %n admin_command admin_kick %RCON.steam | rcmd %n admin_command admin_ssay [AUTOKICK] %rcon.nick ( $+ %rcon.steam $+ ) banned user. }
  1138. elseif ($ini(C:\BlackList.ini,%rcon.steam)) { rcmd %n kick " $+ $clr($2-).nick $+ " Banned By $readini(C:\BlackList.ini,%rcon.steam,by) reason: $readini(C:\BlackList.ini,%rcon.steam,Reason) at: $readini(C:\BlackList.ini,%rcon.steam,at) | .timer 1 1 rcmd %n admin_command admin_kick %RCON.steam | rcmd %n admin_command admin_ssay [AUTOKICK] %rcon.nick ( $+ %rcon.steam $+ ) BlackList User. }
  1139. ssay %n %rcon.nick ( $+ %RCON.steam $+ ) Has connected.
  1140. ;if (!$isregsteam(%rcon.steam)) && (212.29.229.2:27215 !isin $2-) {
  1141. ;rcmd %n kick " $+ $clr($2-).nick $+ " you are not registered to the System. "
  1142. ;.timer 1 1 rcmd %n admin_command admin_kick %RCON.steam
  1143. ;rcmd %n admin_command admin_ssay [AUTOKICK] %rcon.nick ( $+ %rcon.steam $+ ) is not registered to the System.
  1144. ;}
  1145. ;elseif ($steamnick(%rcon.steam) !isin %rcon.nick) rcmd %n admin_command admin_execclient " $+ %rcon.steam $+ " name " $+ $v1 $+ "
  1146. }
  1147. ;if (changed name isin $clr($2-)) && ($steamnick(%rcon.steam) !isin %rcon.nick) rcmd %n admin_command admin_execclient " $+ %rcon.steam $+ " name " $+ $steamnick(%rcon.steam) $+ "
  1148. if (disconnected == $clr($2-)) { aset %n Banlast %rcon.steam | ssay %n %rcon.nick ( $+ %rcon.steam $+ ) Has disconnected ,Type %Gather.Sign-Server $+ Banlast }
  1149. ;Start ScoreStatus (ON)
  1150. if ($data(%n).ScoreStatus == ON) {
  1151. if (killed == $clr($2-)) {
  1152. if (%rcon.team !== %rcon.team2) {
  1153. if (!$isexists(%rcon.steam)) { SetNewPlayer %rcon.steam }
  1154. if (!$isexists(%rcon.steam2)) { SetNewPlayer %rcon.steam2 }
  1155. if (%Gather.TAG-A isin %rcon.nick) .writeini -n TeamsForVgPoints $+ %n $+ .ini A %rcon.steam %rcon.steam
  1156. else .writeini -n TeamsForVgPoints $+ %n $+ .ini B %rcon.steam %rcon.steam
  1157. SetPlayerNick %rcon.steam %rcon.nick
  1158. SetPlayerNick %rcon.steam2 %rcon.nick2
  1159. 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 0.3 | .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
  1160. if ($Stats(%rcon.steam).Last == 0) || ($Stats(%rcon.steam).Last !== $data(%n).GatherNum) { SetLast %rcon.steam $data(%n).GatherNum | Stats inc %rcon.steam Gathers }
  1161. if ($Stats(%rcon.steam2).Last == 0) || ($Stats(%rcon.steam2).Last !== $data(%n).GatherNum) { SetLast %rcon.steam2 $data(%n).GatherNum | Stats inc %rcon.steam2 Gathers }
  1162. if ($data(%n).Type == Regular) {
  1163. 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) }
  1164. elseif (!$readini(Kills $+ %n $+ .ini,%rcon.steam,Kills)) { .writeini -n Kills $+ %n $+ .ini %rcon.steam Kills 1 }
  1165. }
  1166. elseif ($data(%n).Type == DM) {
  1167. if (%rcon.team == TERRORIST) { aset %n Score-T $calc($data(%n).Score-T +1) }
  1168. elseif (%rcon.team == CT) { aset %n Score-CT $calc($data(%n).Score-CT +1) }
  1169. ShowServerScoreDM %n
  1170. if ($Score(%n,A) == %Gather.WinSCORE) || ($Score(%n,B) == %Gather.WinSCORE) {
  1171. aset %n ScoreStatus Off
  1172. if ($Score(%n,a) == %Gather.WinSCORE) { ssay %n The WINNERS are: Team-A }
  1173. elseif ($Score(%n,b) == %Gather.WinSCORE) { ssay %n The WINNERS are: Team-B }
  1174. .timer 1 2 EndGather %n
  1175. }
  1176. }
  1177. }
  1178. if (%rcon.team == %rcon.team2) {
  1179. if (!$isexists(%rcon.steam)) { SetNewPlayer %rcon.steam }
  1180. if (!$isexists(%rcon.steam2)) { SetNewPlayer %rcon.steam2 }
  1181. SetPlayerNick %rcon.steam %rcon.nick | SetPlayerNick %rcon.steam2 %rcon.nick2
  1182. 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)
  1183. aset %n Bantk %rcon.steam
  1184. ssay %n %rcon.nick killed team member, to ban him type $SignS(Bantk)
  1185. if ($data(%n).Type == DM) {
  1186. if (%rcon.team == TERRORIST) { aset %n Score-T $calc($data(%n).Score-T -1) }
  1187. elseif (%rcon.team == CT) { aset %n Score-CT $calc($data(%n).Score-CT -1) }
  1188. ShowServerScoreDM %n
  1189. }
  1190. }
  1191. }
  1192. if ($data(%n).Type == Regular) {
  1193. if (*Team "TERRORIST" triggered "Terrorists_Win"* iswm %rcon.dat) { aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) | aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) }
  1194. elseif (*Team "CT" triggered "CTs_Win"* iswm %rcon.dat) { aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) | aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) }
  1195. elseif (*Team "CT" triggered "Target_Saved"* iswm %rcon.dat) { aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) | aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) }
  1196. elseif (*Team "TERRORIST" triggered "Target_Bombed"* iswm %rcon.dat) { aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) | aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) | var %s = $data(%n).BombPlanet | if (%s) { .writeini -n Mvps.ini %n %s $calc($readini(Mvps.ini,%n,%s) +1) | Stats inc %s Points } }
  1197. elseif (*Team "TERRORIST" triggered "Hostages_Not_Rescued"* iswm %rcon.dat) { aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) | aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) }
  1198. elseif (*Team "CT" triggered "Bomb_Defused"* iswm %rcon.dat) { aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) | aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) }
  1199. elseif (*Team "CT" triggered "VIP_Escaped"* iswm %rcon.dat) { aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) | aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) }
  1200. elseif (*Team "TERRORIST" triggered "VIP_Assassinated"* iswm %rcon.dat) { aset %n Score-T $remove($gettok(%rcon.dat,2,41),T,",$chr(40)) | aset %n Score-CT $remove($gettok(%rcon.dat,2,40),CT,",$chr(41)) }
  1201. elseif (World triggered "Restart_Round_(*_second)" iswm %rcon.dat) {
  1202. aset %n Score-CT 0
  1203. aset %n Score-T 0
  1204. }
  1205. ;Start Round_End
  1206. if (*World triggered "Round_End"* iswm %rcon.dat) {
  1207. if ($exists(Kills $+ %n $+ .ini)) {
  1208. var %x = 1
  1209. while ($ini(Kills $+ %n $+ .ini,%x)) {
  1210. if ($readini(Kills $+ %n $+ .ini,$ini(Kills $+ %n $+ .ini,%x),Kills) == 4) { Stats inc $ini(Kills $+ %n $+ .ini,%x) miniace | .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. }
  1211. elseif ($readini(Kills $+ %n $+ .ini,$ini(Kills $+ %n $+ .ini,%x),Kills) == 5) { Stats inc $ini(Kills $+ %n $+ .ini,%x) ace | .writeini -n Mvps.ini %n $ini(Kills $+ %n $+ .ini,%x) $calc($readini(Mvps.ini,%n,$ini(Kills $+ %n $+ .ini,%x)) +4.51) | Stats inc $ini(Kills $+ %n $+ .ini,%x) Points 4.51 | tsay %n $Stats($ini(Kills $+ %n $+ .ini,%x)).nick Just did a an ACE | ssay %n $Stats($ini(Kills $+ %n $+ .ini,%x)).nick Just did an ACE. }
  1212. inc %x
  1213. }
  1214. if ($exists(Kills $+ %n $+ .ini)) .remove Kills $+ %n $+ .ini
  1215. }
  1216. if ($exists(Kills $+ %n $+ .ini)) .remove Kills $+ %n $+ .ini
  1217. if ($calc($Score(%n,a) + $Score(%n,b)) == 15) && (!$data(%n).FirstA) && (!$data(%n).FirstB) { SWAP %n | End1stHalf %n }
  1218. elseif ( ($Score(%n,a) == 16) || ($Score(%n,b) == 16) ) && ($data(%n).Half == Second) { EndGather %n }
  1219. elseif ( ($Score(%n,a) == 19) || ($Score(%n,b) == 19) ) && ($data(%n).Half == MR4) { EndGather %n }
  1220. 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. }
  1221. 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. }
  1222. 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. }
  1223. elseif ( ($Score(%n,a) == 18) && ($Score(%n,b) == 18) ) && ($data(%n).Half == MR4) { EndGather %n }
  1224. elseif ($data(%n).Half == MR3) && ($calc($data(%n).Score-T + $data(%n).Score-CT) == 3) { SWAP %n | EndMR3Half %n }
  1225. elseif ($Score(%n,a) == 15) && ($Score(%n,b) == 15) && ($data(%n).Half == Second) { SWAP %n | End2ndHalf %n }
  1226. ShowServerScore %n
  1227. unaset %n BombPlanet
  1228. }
  1229. ;End Round_End
  1230. 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)) }
  1231. elseif (World triggered "Round_Start"* iswm %rcon.dat) || (World triggered "Round_Draw"* iswm %rcon.dat) {
  1232. unaset %n BombPlanet
  1233. if ($exists(Kills $+ %n $+ .ini)) .remove Kills $+ %n $+ .ini
  1234. }
  1235. }
  1236. if (*triggered "Planted_The_Bomb"* iswm %rcon.dat) {
  1237. if (!$isexists(%rcon.steam)) { SetNewPlayer %rcon.steam }
  1238. aset %n BombPlanet %rcon.steam | SetPlayerNick %rcon.steam %rcon.nick | Stats inc %rcon.steam Points 1.01 | Stats inc %rcon.steam plants
  1239. }
  1240. if (*triggered "Defused_The_Bomb"* iswm %rcon.dat) {
  1241. if (!$isexists(%rcon.steam)) { SetNewPlayer %rcon.steam }
  1242. SetPlayerNick %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
  1243. }
  1244. }
  1245. ;End ScoreStatus (ON)
  1246. if ($clr($2-) == say) || ($clr($2-) == say_team) {
  1247. Tokenize 32 %rcon.said
  1248. if (!$window(@Cmds $+ %n)) { window @Cmds $+ %n }
  1249. if (!$window(@Gamechat $+ %n)) { window @Gamechat $+ %n }
  1250. $ShowWindowGame(%n,%rcon.steam,%rcon.nick,$1-)
  1251. if ($1- == $SignS(score)) && ($data(%n).Status == ON) && (!%Gather.ServFld $+ %n) && ($data(%n).Type == Regular) {
  1252. if (!$data(%n).Notlive) && ($data(%n).Live) { Set -u2 %Gather.ServFld $+ %n ON | ShowServerScore %n }
  1253. if (($data(%n).Notlive) || ($data(%n).half == notyet)) { Set -u2 %Gather.ServFld $+ %n ON | ssay %n Score status: Match is not live yet! }
  1254. if ($calc($Score(%n,a) + $Score(%n,b)) == 15) && (!$data(%n).FirstA) && (!$data(%n).FirstB) { SWAP %n | End1stHalf %n }
  1255. elseif ( ($Score(%n,a) == 16) || ($Score(%n,b) == 16) ) && ($data(%n).Half == Second) { EndGather %n }
  1256. elseif ( ($Score(%n,a) == 19) || ($Score(%n,b) == 19) ) && ($data(%n).Half == MR4) { EndGather %n }
  1257. 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. }
  1258. 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. }
  1259. 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. }
  1260. elseif ( ($Score(%n,a) == 18) && ($Score(%n,b) == 18) ) && ($data(%n).Half == MR4) { EndGather %n }
  1261. elseif ($data(%n).Half == MR3) && ($calc($data(%n).Score-T + $data(%n).Score-CT) == 3) { SWAP %n | EndMR3Half %n }
  1262. elseif ($Score(%n,a) == 15) && ($Score(%n,b) == 15) && ($data(%n).Half == Second) { SWAP %n | End2ndHalf %n }
  1263. }
  1264. elseif ($1- == $SignS(Subs)) && (!%Gather.ServFld $+ %n) && ($data(%n).Subs) { Set -u2 %Gather.ServFld $+ %n ON | ssay %n Subs ( $+ $numtok($data(%n).Subs,32) $+ ): $data(%n).Subs) }
  1265. elseif ($1- == $SignS(Rank)) && (!%Gather.ServFld $+ %n) { Set -u2 %Gather.ServFld $+ %n ON | ShowRankServer %n %rcon.steam %rcon.steam }
  1266. ;elseif ($1- == $SignS(Stats)) && (!%Gather.ServFld $+ %n) { Set -u2 %Gather.ServFld $+ %n ON | ShowStatsServer %n %rcon.steam %rcon.steam }
  1267. elseif ($1 == $SignS(Status)) || ($1 == ?Status) && (!%Gather.ServFld $+ %n) { set -u3 %Gather.ServFld $+ %n ON | ShowServerStatus %n }
  1268. elseif ($1- == $SignS(Vent)) && (!%Gather.ServFld $+ %n) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Vent is: %Gather.Vent ( $+ %Gather.Vent-Version $+ ) }
  1269. elseif ( ($1- == $SignS(Teams)) || ($1- == $SignS(players)) ) && ($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 }
  1270. elseif ($1- == $SignS(Time)) && (!%Gather.ServFld $+ %n) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Time is now: $time }
  1271. elseif ( ($1- == $SignS(Help)) || ($1- == $SignS(Commands)) ) && (!%Gather.ServFld $+ %n) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Commands are: $SignS(Vent) $SignS(Mvps) $SignS(Score) $SignS(Stats) $SignS(Rank) $SignS(Admin) $+ . }
  1272. elseif ($1- == $SignS(Admin)) && (!%Gather.ServFld $+ %n) && ($data(%n).Status == ON) { Set -u1 %Gather.ServFld $+ %n ON | ssay %n Admin is: $data(%n).Admin }
  1273. if ($isadmin(%rcon.steam)) {
  1274. var %u $v1, %lvl $acc(%u).lvl
  1275. var %Access = $replace(%lvl,%GatherLV3.P,3,%GatherLV2.P,2)
  1276. if ($1 == $SignS(ff)) || ($1 == $SignS(rr)) || ($1 == $SignS(prac)) || ($1 == $SignS(MoveA)) || ($1 == $SignS(MoveB)) || ($1 == $SignS(FixScore)) || ($1 == $SignS(NotLive)) || ($1 == $SignS(mr15)) || ($1 == $SignS(knife)) || ($1 == $SignS(Mvps)) || ($1 == $SignS(rates)) || ($1 == $SignS(End)) || ($1 == $SignS(live)) || ($1 == $SignS(Start)) {
  1277. if (%u != $data(%n).AdminUser) && (%lvl != %GatherLV3.P) {
  1278. ssay %n You can not Use this Commands! Only %GatherLV3.P Or $data(%n).AdminUser
  1279. Halt
  1280. }
  1281. }
  1282. ;if ($1 == $SignS(fun)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | prac %n | ssay %n Enjoy fun map :) }
  1283. if ($1 == $SignS(rr)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n sv_restart 1 | ssay %n Restarting round by %rcon.nick }
  1284. elseif ($1 == $SignS(Freezetime)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Freezetime is $2 now. | rcmd %n mp_freezetime $2 }
  1285. elseif ($1 == $SignS(sp)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n allow_spectators $2 }
  1286. elseif ( ($1 == $SignS(Mvps)) || ($1 == $SignS(Mvp)) ) && (!%mvpflood) && ($data(%n).Status == ON) && ($data(%n).Live) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ShowCurrectMvps %n %rcon.steam | inc -u5 %mvpflood }
  1287. elseif (($1 == $SignS(n)) || ($1 == $SignS(Notice)) || ($1 == $SignS(mc))) && (!%mvpflood) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Notice: $2- | NoticeServer %n $2- | inc -u5 %noticeflood }
  1288. elseif (($1- == $SignS(n)) || ($1- == $SignS(Notice)) || ($1- == $SignS(mc))) && (!%mvpflood) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | inc -u5 %noticeflood }
  1289. elseif ($1 == $SignS(roundtime)) && ($2 isnum) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Roundtime is $2 now. | rcmd %n mp_roundtime $2 }
  1290. elseif ($1 == !) || ($1 == @) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | tsay %n [ $+ %rcon.nick $+ ]: $2- }
  1291. elseif ($1 == $SignS(FF)) {
  1292. if ($2 == ON) || ($2 == 1) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Friendlyfire is $2 now. | rcmd %n mp_friendlyfire 1 }
  1293. elseif ($2 == OFF) || ($2 == $chr(48)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n Friendlyfire is $2 now. | rcmd %n mp_friendlyfire 0 }
  1294. }
  1295. elseif ($1 == $SignS(123123move)) && ($readini(Access.ini,Access,$2)) && (!%mvpflood) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | aset %n AdminUser $2 | psay %n %rcon.nick AdminUser Moved to: $2- | inc -u5 %mvpflood }
  1296. 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 }
  1297. elseif ($1 == $SignS(disconnect)) || ($1 == $SignS(Quit)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_execall disconnect }
  1298. elseif ($1 == $SignS(ss)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | tsay %n Snapshot has just taken by the admin ( $+ %rcon.nick $+ ) | rcmd %n admin_quiet 1 | rcmd %n allow_client_exec 1 | rcmd %n admin_command admin_execall snapshot | rcmd %n admin_quiet 2 }
  1299. elseif ($1 == $SignS(Sub)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | SubSearch %n $upper($2) }
  1300. 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 }
  1301. elseif ($1- == $SignS(MR15)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n MR15 Settings loaded by %rcon.nick | MR15 %n }
  1302. elseif ($1- == $SignS(PRAC)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | ssay %n PRAC Settings loaded by %rcon.nick | PRAC %n }
  1303. elseif ($1- == $SignS(Knife)) && ($data(%n).Type == Regular) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | Knife %n }
  1304. elseif ($1 == $SignS(Tags)) && (%Gather.TAG-A) { .timer 3 1 ssay %n Please fix your tags or the admin will be kick you vG-A. <nick> , vG-B. <nick> %Gather.TagA $chr(44) %Gather.TagB | .timer 3 1 tsay %n Please fix your tags or the admin will be kick you vG-A. <nick> , vG-B. <nick> %Gather.TagA $chr(44) %Gather.TagB }
  1305. elseif ($1- == $SignS(Rates)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | Rates %n }
  1306. elseif ($1- == $SignS(End)) && ($data(%n).Status == ON) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | EndGather %n %rcon.nick }
  1307. elseif ($1 == $SignS(123123Move)) && ($readini(Access.ini,Access,$2)) && (!%Gather.Flood) {
  1308. if ($data(%n).Status == ON) && ((%u == $data(%n).AdminUser) || (%Access >= 3)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | aset %n AdminUser $2 | ssay %n $2 is the Admin Gather Now! | Set -u3 %Gather.Flood ON }
  1309. }
  1310. elseif ($1 == $SignS(Pass)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n sv_password $2 | ssay %n Password is $2 now.
  1311. if ($data(%n).Status == ON) { aset %n pass $2 }
  1312. }
  1313. elseif ($1 == $SignS(Map)) && ($2) && (!$data(%n).Live) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_map $2 | ssay %n Changing map to $2 now
  1314. if ($data(%n).Status == ON) { aset %n map $2 }
  1315. }
  1316. elseif ( ($1 == $SignS(Name)) || ($1 == $SignS(Nick)) ) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | rcmd %n admin_command admin_execclient $2 name " $+ $3- }
  1317. 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 }
  1318. 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 }
  1319. elseif ($1 == $SignS(T)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | MOVE-T %n $2- }
  1320. elseif ($1 == $SignS(CT)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | MOVE-CT %n $2- }
  1321. elseif (($1 == $SignS(MoveA)) || ($1 == $SignS(MoveB))) && (($2 == CT) || ($2 == T)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | moveteam %n $right($1,1) $2 }
  1322. elseif ($1 == $SignS(Ban)) && (%Access >= 7) && ($3) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBan $2 %u SSAY $+ %n $iif($3-,$3-,no reason) }
  1323. elseif ($1 == $SignS(BanTime)) && ($4) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBan $2 %u SSAY $+ %n $3 $iif($4-,$4-,no reason) }
  1324. 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. }
  1325. elseif ($1- == $SignS(BanTK)) && ($data(%n).BanTK) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBanTime $data(%n).BanTK %u SSAY $+ %n 2 Tk team members. }
  1326. elseif ($1 == $SignS(BanFlame)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBanTime $2 %u SSAY $+ %n 1 Flaming Crew/Players. }
  1327. elseif ($1 == $SignS(BanAFK)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | AddBanTime $2 %u SSAY $+ %n 1 AFK In a gather above 3 rounds. }
  1328. elseif ($1 == $SignS(Unban)) && ($2) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | Unban $2 %u SSAY $+ %n }
  1329. elseif ($1 == $SignS(Admins)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | CheckAdmins %n }
  1330. elseif ($1 == $SignS(FixScore)) && ($3) && ($data(%n).Live) && ( (%u == $data(%n).AdminUser) || (%Access >= 6) ) {
  1331. $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-)
  1332. if ($data(%n).Live == A-B) { aset %n Score-T $calc($3 - $data(%n).FirstA) | aset %n Score-CT $calc($2 - $data(%n).FirstB) | ssay %n Score has been fix Team B: $2 $chr(44) $+ Team A: $3 }
  1333. elseif ($data(%n).Live == B-A) { aset %n Score-CT $calc($2 - $data(%n).FirstA) | aset %n Score-T $calc($3 - $data(%n).FirstB) | ssay %n Score has been fix Team A: $2 $chr(44) $+ Team B: $3 }
  1334. if ($calc($Score(%n,a) + $Score(%n,b)) == 15) && (!$data(%n).FirstA) && (!$data(%n).FirstB) { SWAP %n | End1stHalf %n }
  1335. elseif ( ($Score(%n,a) == 16) || ($Score(%n,b) == 16) ) && ($data(%n).Half == Second) { EndGather %n }
  1336. elseif ( ($Score(%n,a) == 19) || ($Score(%n,b) == 19) ) && ($data(%n).Half == MR4) { EndGather %n }
  1337. 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. }
  1338. 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. }
  1339. 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. }
  1340. elseif ( ($Score(%n,a) == 18) && ($Score(%n,b) == 18) ) && ($data(%n).Half == MR4) { EndGather %n }
  1341. elseif ($data(%n).Half == MR3) && ($calc($data(%n).Score-T + $data(%n).Score-CT) == 3) { SWAP %n | EndMR3Half %n }
  1342. elseif ($Score(%n,a) == 15) && ($Score(%n,b) == 15) && ($data(%n).Half == Second) { SWAP %n | End2ndHalf %n }
  1343. }
  1344. elseif ($1 == $SignS(NotLive)) && ($data(%n).Status == ON) {
  1345. $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-)
  1346. aset %n ScoreStatus OFF
  1347. aset %n Notlive %n
  1348. Prac %n
  1349. ssay %n %rcon.nick - Match is not live now
  1350. }
  1351. elseif ( ($1 == $SignS(Start)) || ($1 == $SignS(Live)) ) && ($data(%n).Status == ON) && (!%Gather.FloodStart) {
  1352. if ($data(%n).Type == Regular) { set -u4 %Gather.FloodStart ON
  1353. if ($data(%n).Half == First) || ($data(%n).Half == notyet) {
  1354. 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-)
  1355. if (%rcon.team == CT) { aset %n Live A-B | aset %n ScoreStatus ON | aset %n Half First }
  1356. 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 }
  1357. }
  1358. 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-)
  1359. if (%rcon.team == CT) { aset %n Live B-A | aset %n ScoreStatus ON | aset %n Half First }
  1360. 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 }
  1361. }
  1362. }
  1363. 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 }
  1364. 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 }
  1365. 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 }
  1366. unaset %n Notlive
  1367. }
  1368. elseif ($data(%n).Type == DM) {
  1369. 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 | DM-Live %n | $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-)
  1370. if (%rcon.team == CT) { aset %n Live A-B | aset %n ScoreStatus ON }
  1371. elseif (%rcon.team == TERRORIST) { aset %n Live B-A | aset %n ScoreStatus ON | if ($exists(Mvps.ini)) .remini -n Mvps.ini %n }
  1372. }
  1373. elseif (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 | DM-Live %n | $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-)
  1374. if (%rcon.team == CT) { aset %n Live B-A | aset %n ScoreStatus ON }
  1375. elseif (%rcon.team == TERRORIST) { aset %n Live A-B | aset %n ScoreStatus ON | if ($exists(Mvps.ini)) .remini -n Mvps.ini %n }
  1376. }
  1377. }
  1378. }
  1379. ;END - START GATHER
  1380. }
  1381. if (!%Gather.ServFld $+ %n) && (%Gather.Flame == ON) && ($data(%n).Status == ON) { Set -u1 %Gather.ServFld $+ %n ON | set %dac.msg $1- | cursesystem %n %rcon.steam %rcon.nick }
  1382. elseif (!$isadmin(%rcon.steam)) {
  1383. if ($1 == $SignS(Mvps)) { $ShowWindowCmd(%n,%rcon.steam,%rcon.nick,$1-) | psay %n %rcon.nick You can't see the Mvps! You need to be an admin to use this command! }
  1384. }
  1385. }
  1386. }
  1387. ;End SAY/SAY_TEAM CHAT
  1388. }
  1389.  
  1390. alias ShowAdmins1 {
  1391. var %x = 1, %y = 1,
  1392. while ($ini(Access.ini,STEAMIDS,%x)) {
  1393. var %u = $v1
  1394. var %temp = %temp 0 $+ %u $+ $chr(44)
  1395. if ($numtok(%temp,32) == 5) {
  1396. if (%y == 1) { ssay $1 Admins on the Server are: %temp }
  1397. else { ssay $1 %temp | var %temp }
  1398. }
  1399. inc %x
  1400. }
  1401. if (%temp) {
  1402. if (%y == 1) { ssay $1 Admins on the Server are: %temp }
  1403. else { ssay $1 %temp }
  1404. }
  1405. }
  1406. ;/CheckAdmins <num>
  1407. alias CheckAdmins { aset $1 CheckAdmins $1 | .timer 1 3 unaset $1 CheckAdmins | showserver $1 }
  1408. ;/ShowAdmins <num> <steamID> <nick>
  1409. alias ShowAdmins {
  1410. if ($data($1).CheckAdmins == $1) {
  1411. if ($isadmin($2)) { ssay $1 Admin on the Server are: $3 - $2 }
  1412. }
  1413. }
  1414.  
  1415.  
  1416. ;/moveteam <num> <team> <CT/T>
  1417. alias moveteam { aset $1 MoveTeamON $2 $3 | .timer 1 3 unaset $1 MoveTeamON | showserver $1 }
  1418. ;/moveplayer <num> <Steam> <nick>
  1419. alias moveplayer {
  1420. if ($gettok($data($1).MoveTeamON,1,32) == A) {
  1421. if (%Gather.TAG-A $+ * iswm $3) { $iif($gettok($data($1).MoveTeamON,2,32) == CT,MOVE-CT $1 $2,MOVE-T $1 $2) }
  1422. else $iif($gettok($data($1).MoveTeamON,2,32) == CT,MOVE-T $1 $2,MOVE-CT $1 $2)
  1423. }
  1424. elseif ($gettok($data($1).MoveTeamON,1,32) == B) {
  1425. if (%Gather.TAG-B $+ * iswm $3) { $iif($gettok($data($1).MoveTeamON,2,32) == CT,MOVE-CT $1 $2,MOVE-T $1 $2) }
  1426. else $iif($gettok($data($1).MoveTeamON,2,32) == CT,MOVE-T $1 $2,MOVE-CT $1 $2)
  1427. }
  1428. }
  1429.  
  1430. ;/ShowCurrectMvps <gather num> <nick>
  1431. alias ShowCurrectMvps {
  1432. FindMvpServer $1
  1433. if (%makom3) {
  1434. psay $1 $2 Currect Mvps: 1st.( $+ $findnick(%makom1) $+ ) 2nd.( $+ $findnick(%makom2) $+ ) 3rd.( $+ $findnick(%makom3) $+ ).
  1435. }
  1436. elseif (%makom2) && (!%makom3) {
  1437. psay $1 $2 Currect Mvps: 1st.( $+ $findnick(%makom1) $+ ) 2nd.( $+ $findnick(%makom2) $+ ) 3rd.(no nick).
  1438. }
  1439. elseif (%makom1) && (!%makom2) {
  1440. psay $1 $2 $2 Currect Mvps: 1st.( $+ $findnick(%makom1) $+ ) 2nd.( $+ $findnick(%makom2) $+ ) 3rd.(no nick).
  1441. }
  1442. elseif (!%makom1) {
  1443. psay $1 $2 Currect Mvps: 1st.(no nick) 2nd.(no nick) 3rd.(no nick).
  1444. }
  1445. unset %makom*
  1446. }
  1447. ;syntax /FindMvpServer <Gather Num>
  1448. alias FindMvpServer {
  1449. Set -u2 %Gather.Flood ON | var %num = $FindMvpNum($1) | .close -@ @Bot | .window -h @Bot | var %x 1, %o 1
  1450. while ($ini(Mvps.ini,%num,%x)) { var %s = $v1 | echo @Bot %s $readini(Mvps.ini,$1,%s) | inc %x }
  1451. filter -cwwteu 2 32 @Bot @Bot | set %makom1 $gettok($line(@Bot,1),1,32) | set %makom2 $gettok($line(@Bot,2),1,32) | set %makom3 $gettok($line(@Bot,3),1,32)
  1452. }
  1453. ;syntax: $findnick(Steamid)
  1454. alias findnick { return $gettok($read(Nicks.txt, w, * $+ $1 $+ *),2-,32) }
  1455. alias DM-Live {
  1456. mr15 $1
  1457. .timer 1 4 tsay $1 DM gather is now live.
  1458. .timer 1 4 ssay $1 DM gather is now live.
  1459. }
  1460. ;$ShowWindowCmd(num,steam_id,rcon.nick,cmds)
  1461. alias ShowWindowCmd { aline @Cmds $+ $1 ( $+ $date - $time $+ ) < $+ $3 - $2 - $iif($isadmin($2),$acc($v1).lvl,No-admin) $+ > < $+ $data($1).GatherNum $+ > $4- }
  1462. alias ShowWindowGame { aline @Gamechat $+ $1 ( $+ $date - $time $+ ) < $+ $3 - $2 $+ > < $+ $data($1).GatherNum $+ > $4- }
  1463. alias Noticer { mode %Gather.Channel -N | notice %Gather.Channel $stl($1,$2-) | .timer -m 1 600 mode %Gather.Channel +N }
  1464. alias NoticeServer { mode %Gather.Channel -N | notice %Gather.Channel $stl($1, $+ $data($1).Color2 $+ Notice From Server $+ $data($1).Color1 $+ : $2-) | .timer -m 1 600 mode %Gather.Channel +N }
  1465. 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 }
  1466. 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 }
  1467. alias Rates { ssay $1 Fixing server Rates, Please Wait.... | tsay $1 Fixing server Rates, Please Wait.... | .timer 1 1 rcmd $1 admin_command admin_rcon sv_maxrate "25000" | .timer 1 1 rcmd $1 admin_command admin_rcon sv_maxupdaterate "101" | .timer 1 1 rcmd $1 admin_command admin_rcon sv_minrate "8000" | .timer 1 1 rcmd $1 admin_command admin_rcon sv_minupdaterate "101" | .timer 1 1 rcmd $1 admin_command admin_rcon sys_ticrate "10000.0" | .timer 1 1 rcmd $1 admin_command admin_rcon sv_maxspeed "920" | .timer 1 1 rcmd $1 admin_command admin_rcon sv_stats "0" | .timer 1 1 rcmd $1 admin_command admin_rcon fps_max "101" | .timer 1 1 rcmd $1 admin_command admin_rcon sv_region "6" | .timer 1 3 rcmd $1 admin_command admin_rcon restart }
  1468. 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 ********* }
  1469. alias psay { rcmd $1 admin_command admin_psay $2 $3- }
  1470. alias csay { rcmd $1 admin_command admin_csay $2- }
  1471. ;$Guns(Weapon)
  1472. alias Guns {
  1473. if ($1 == AK47) return 1.00
  1474. if ($1 == M4A1) return 1.00
  1475. if ($1 == Famas) return 1.00
  1476. if ($1 == Galil) return 1.00
  1477. if ($1 == AWP) return 1.05
  1478. if ($1 == MP5navy) return 1.25
  1479. if ($1 == Deagle) return 1.50
  1480. if ($1 == Usp) return 1.50
  1481. if ($1 == Glock18) return 1.50
  1482. if ($1 == Grenade) return 1.80
  1483. if ($1 == Aug) return 1.05
  1484. if ($1 == SG552) return 1.05
  1485. if ($1 == MAC10) return 1.25
  1486. if ($1 == P90) return 1.25
  1487. if ($1 == TMP) return 1.25
  1488. if ($1 == UMP45) return 1.25
  1489. if ($1 == G3sg1) return 1.40
  1490. if ($1 == M3) return 1.40
  1491. if ($1 == XM1014) return 1.40
  1492. if ($1 == Elite) return 1.50
  1493. if ($1 == FiveSeven) return 1.50
  1494. if ($1 == P228) return 1.50
  1495. if ($1 == Scout) return 1.60
  1496. if ($1 == SG550) return 1.70
  1497. if ($1 == M249) return 1.80
  1498. if ($1 == Knife) return 2.00
  1499. }
  1500. alias ShowServer { unaset $1 Players-list | unset %num | rcmd $1 users | hl $1 | ShowServerMsg $1 }
  1501. alias HL {
  1502. Set %Gather.HL-NUM $1
  1503. Set %Gather.HL-IP $data($1).server
  1504. bset -t &hl 1 $str($chr(255),4) $+ TSource Engine Query
  1505. bset &hl $calc($bvar(&hl,0) + 1) 0
  1506. sockudp -k HL $replace(%Gather.HL-IP,$chr(58),$chr(32)) &hl
  1507. .timer 1 3 unset %Gather.HL-*
  1508. }
  1509. alias HLB { return $bvar(&HL,1,$bvar(&HL,0)).text }
  1510. on *:UDPREAD:HL: {
  1511. sockread &HL
  1512. breplace &HL 0 254
  1513. 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)))
  1514. var %Gather.HL-Name = $right($gettok($HLB,1,254),$calc($len($gettok($HLB,1,254)) -6))
  1515. var %Gather.HL-Map = $gettok($HLB,2,254)
  1516. if (%totalplayers) set %total $calc($gettok(%Gather.HL-Players,1,47) + %total)
  1517. elseif (!$data(%Gather.HL-NUM).MoveTeamON) && (!$data(%Gather.HL-NUM).CheckAdmins) && ($data(%Gather.HL-NUM).Connected == ON) && ($ismap(%Gather.HL-Map)) { 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 ) }
  1518. }
  1519. alias ShowServerMsg {
  1520. if ($data($1).Server !== $Null) {
  1521. if ($data($1).Connected == ON) && (!$data($1).MoveTeamON) { .timer -m 1 500 ShowServerPlayers $1 }
  1522. elseif ($data($1).Connected == BadRcon) { msg %Gather.Channel $stl($1,Bad rcon password $chr(44) $+ check your server info again.) }
  1523. elseif ($data($1).Connected == Banned) { msg %Gather.Channel $stl($1,Banned from the server.) }
  1524. elseif ($data($1).Connected == OFF) { msg %Gather.Channel $stl($1,No connection.) }
  1525. }
  1526. else { msg %Gather.Channel $stl($1,Server isn't set yet.) }
  1527. }
  1528. alias ShowServerPlayers {
  1529. if ($data($1).Players-list) msg %Gather.Channel $stl($1,$chr(171) $+ $gettok($replace($v1,£,,ƒ,),$gettok($replace($v1,£,,ƒ,),0,171),171))
  1530. unaset $1 Players-list | unset %num
  1531. }
  1532. alias Start1stHalf { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 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 }
  1533. alias Start2ndHalf { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 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 }
  1534. alias StartMR3Half { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 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 }
  1535. alias StartMR4Half { .timer 1 10 aset $1 Score-CT 0 | .timer 1 10 aset $1 Score-T 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 }
  1536. alias ShowServerScore { if ($data($1).Status == ON) { ssay $1 Score is - (Team A): $Score($1,a) - (Team B): $Score($1,b) - ( $+ $score($1,half) $+ ) } }
  1537. alias ShowServerScoreDM {
  1538. if ($data($1).Status == ON) {
  1539. tsay $1 Team-A $chr(91) $+ $score($1,a) $+ / $+ %Gather.WinScore $+ $chr(93) ^ Team-B $chr(91) $+ $score($1,b) $+ / $+ %Gather.WinScore $+ $chr(93) $data($1).TKScore
  1540. }
  1541. }
  1542. alias ResetStats {
  1543. var %p = 0
  1544. var %g = 1
  1545. var %d = Stats.txt $1 $+ = $+ $puttok($remove($read(Stats.txt,w ,$1=*),$1 $+ =),$iif(%Gather.Points,$v1,1000) 0)
  1546. .write -l $+ $readn %d
  1547. }
  1548. alias SetNewPlayer { if (STEAM_*:*:* iswm $1) .write Stats.txt $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 0 }
  1549. ;/SetPlayerNick <STEAM_ID> <NICK>
  1550. alias SetPlayerNick {
  1551. if ($read(Nicks.txt, w,$1 $+ *)) { if (Rcon !isin $1-) && ($chr(36) !isin $1-) { var %d = $v1 | .write -l $+ $readn Nicks.txt $1- } }
  1552. else { if (Rcon !isin $1-) .write Nicks.txt $1- }
  1553. }
  1554. alias End1stHalf {
  1555. var %a = $Score($1,A) , %b = $Score($1,B)
  1556. aset $1 FirstA %a
  1557. aset $1 FirstB %b
  1558. aset $1 Half First-Second
  1559. aset $1 ScoreStatus OFF
  1560. ssay $1 First half is over ( $+ %a $+ - $+ %b $+ )
  1561. tsay $1 First half is over ( $+ %a $+ - $+ %b $+ )
  1562. ;msg %Gather.Channel $stl($1,First half is over)
  1563. }
  1564. alias End2ndHalf { var %a = $Score($1,a) , %b = $Score($1,b) | aset $1 SecondA $Score($1,anow) | aset $1 SecondB $Score($1,bnow) | aset $1 Half Second-MR3 | aset $1 ScoreStatus OFF | ssay $1 Second half is over ( $+ %a $+ - $+ %b $+ ) | tsay $1 Second half is over ( $+ %a $+ - $+ %b $+ ) | ;msg %Gather.Channel $stl($1,Second half is over) }
  1565. alias EndMR3Half { var %a = $Score($1,a) , %b = $Score($1,b) | aset $1 MR3A $score($1,anow) | aset $1 MR3B $score($1,bnow) | aset $1 Half MR3-MR4 | aset $1 ScoreStatus OFF | ssay $1 MR3.1st half is over ( $+ %a $+ - $+ %b $+ ) | tsay $1 MR3.1st half is over ( $+ %a $+ - $+ %b $+ ) | ;msg %Gather.Channel $stl($1,MR3 1st half is over) }
  1566. 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 | rcmd $1 admin_command admin_execall menuselect 3 }
  1567. ;/aset <num> <prop> <string>
  1568. alias aset2 { Set %Gather $+ [ $1 ] $+ . $+ $2 $3- }
  1569. alias aset { Set %Gather $+ $1 $+ . $+ $2 $3- }
  1570. ;/unaset <num> <prop>
  1571. alias unaset { unSet %Gather $+ [ $1 ] $+ . $+ $2 }
  1572.  
  1573. 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 }
  1574. ;$Stats(STEAM_ID).Points
  1575. ;/Stats <inc/dec> <steam_id> <prop> <points>
  1576. alias Stats {
  1577. if ($prop) {
  1578. if ($prop == all) { return $remove($read(Stats.txt,w ,$1=*),$1 $+ =) }
  1579. elseif ($prop == Nick) { var %s = $read(Nicks.txt,w ,$1 $+ *) | return $remove($iif($1 == $gettok(%s,1,32),$gettok(%s,2-,32),no nick),Team A |,Team B|,%Gather.TAG-A,%Gather.TAG-B) }
  1580. elseif ($findtok(%Gather.Stats,$prop,32)) { return $remove($gettok($read(Stats.txt,w ,$1=*),$v1,32),$1 $+ =) }
  1581. }
  1582. else {
  1583. var %p = $iif($4,$4,1)
  1584. if ($findtok(%Gather.Stats,$3,32)) {
  1585. var %g = $GetNumTok($3)
  1586. var %d = Stats.txt $2 $+ = $+ $puttok($remove($read(Stats.txt,w ,$2=*),$2 $+ =),$calc($gettok($remove($read(Stats.txt,w ,$2=*),$2 $+ =),%g,32) $iif($1 == dec,-,+) %p ),%g,32)
  1587. .write -l $+ $readn %d
  1588. }
  1589. }
  1590. }
  1591. ;$Stats(STEAM_ID).Points
  1592. ;/Stats <inc/dec> <steam_id> <prop> <points>
  1593. alias Stats2 {
  1594. if ($CheckSteam($2)) {
  1595. if ($prop) {
  1596. if ($prop == all) { return $remove($read(Stats.txt,w ,$1=*),$1 $+ =) }
  1597. elseif ($prop == Nick) { var %s = $read(Nicks.txt,w ,$1 $+ *) | return $remove($iif($1 == $gettok(%s,1,32),$gettok(%s,2-,32),no nick),Team A |,Team B|,%Gather.TAG-A,%Gather.TAG-B) }
  1598. elseif ($findtok(%Gather.Stats,$prop,32)) { return $remove($gettok($read(Stats.txt,w ,$1=*),$v1,32),$1 $+ =) }
  1599. }
  1600. else {
  1601. var %p = $iif($4,$4,1)
  1602. if ($findtok(%Gather.Stats,$3,32)) {
  1603. if ($CheckSteam($2)) {
  1604. var %g = $GetNumTok($3)
  1605. var %d = Stats.txt $2 $+ = $+ $puttok($remove($read(Stats.txt,w ,$2=*),$2 $+ =),$calc($gettok($remove($read(Stats.txt,w ,$2=*),$2 $+ =),%g,32) $iif($1 == dec,-,+) %p ),%g,32)
  1606. .write -l $+ $readn %d
  1607. }
  1608. }
  1609. }
  1610. }
  1611. }
  1612. alias SetLast { if (STEAM_*:*:* iswm $1) { var %d = Stats.txt $1 $+ = $+ $puttok($remove($read(Stats.txt,w ,$1=*),$1 $+ =),$2,9,32) | if ($readn) && (%d) .write -l $+ $readn %d } }
  1613. alias GetNumTok { return $findtok(%Gather.Stats,$1,32) }
  1614. alias clr {
  1615. var %CLR.TEMP = $strip($gettok($1,1,34))
  1616. if ($prop == Steam) return $gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),1,62)
  1617. 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)
  1618. 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)))
  1619. elseif ($prop == Said) return $strip($gettok($1,3,34))
  1620. 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)))
  1621. elseif ($prop == Team) return $remove($gettok($gettok(%CLR.TEMP,$calc($numtok(%CLR.TEMP,60) -1) $+ - $+ $numtok(%CLR.TEMP,60),60),2,62),<)
  1622. 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),<)
  1623. 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)
  1624. elseif ($prop == Weapon) || ($prop == Gun) return $gettok($1,5,34)
  1625. Return $gettok($1,2,34)
  1626. }
  1627. ;$Score(Num,Team)
  1628. alias Score {
  1629. if ($data($1).Type == Regular) {
  1630. if ($2 == a) {
  1631. if ($data($1).Status == ON) {
  1632. if ($data($1).Half == notyet) { return }
  1633. elseif ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1634. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-CT }
  1635. elseif ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-T }
  1636. elseif ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1637. elseif ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1638. elseif ($data($1).Live == A-B) && ($data($1).Half == Second) { return $calc($data($1).Score-T + $data($1).FirstA) }
  1639. elseif ($data($1).Live == B-A) && ($data($1).Half == Second) { return $calc($data($1).Score-CT + $data($1).FirstA) }
  1640. elseif ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstA + $data($1).SecondA) }
  1641. elseif ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstA + $data($1).SecondA) }
  1642. elseif ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $calc($data($1).Score-T + $data($1).FirstA + $data($1).SecondA) }
  1643. elseif ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $calc($data($1).Score-CT + $data($1).FirstA + $data($1).SecondA) }
  1644. elseif ($data($1).Live == B-A) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-T + $data($1).FirstA + $data($1).SecondA) }
  1645. elseif ($data($1).Live == A-B) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-CT + $data($1).FirstA + $data($1).SecondA) }
  1646. elseif ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $calc($data($1).Score-CT + $data($1).FirstA + $data($1).SecondA + $data($1).MR3A) }
  1647. elseif ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $calc($data($1).Score-T + $data($1).FirstA + $data($1).SecondA + $data($1).MR3A) }
  1648. }
  1649. }
  1650. else { return None }
  1651. }
  1652. elseif ($2 == anow) {
  1653. if ($data($1).Status == ON) {
  1654. if ($data($1).Half == notyet) { return notset }
  1655. elseif ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1656. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-CT }
  1657. elseif ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-T }
  1658. elseif ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1659. elseif ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstA }
  1660. elseif ($data($1).Live == A-B) && ($data($1).Half == Second) { return $data($1).Score-T }
  1661. elseif ($data($1).Live == B-A) && ($data($1).Half == Second) { return $data($1).Score-CT }
  1662. elseif ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $data($1).SecondA }
  1663. elseif ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $data($1).SecondA }
  1664. elseif ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $data($1).Score-CT }
  1665. elseif ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $data($1).Score-T }
  1666. elseif ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $data($1).Score-T }
  1667. elseif ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $data($1).Score-CT }
  1668. }
  1669. }
  1670. else { return None }
  1671. }
  1672. elseif ($2 == b) {
  1673. if ($data($1).Status == ON) {
  1674. if ($data($1).Half == notyet) { return }
  1675. elseif ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1676. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-T }
  1677. elseif ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-CT }
  1678. elseif ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1679. elseif ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1680. elseif ($data($1).Live == A-B) && ($data($1).Half == Second) { return $calc($data($1).Score-CT + $data($1).FirstB) }
  1681. elseif ($data($1).Live == B-A) && ($data($1).Half == Second) { return $calc($data($1).Score-T + $data($1).FirstB) }
  1682. elseif ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstB + $data($1).SecondB) }
  1683. elseif ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $calc($data($1).FirstB + $data($1).SecondB) }
  1684. elseif ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $calc($data($1).Score-CT + $data($1).FirstB + $data($1).SecondB) }
  1685. elseif ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $calc($data($1).Score-T + $data($1).FirstB + $data($1).SecondB) }
  1686. elseif ($data($1).Live == B-A) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-CT + $data($1).FirstB + $data($1).SecondB) }
  1687. elseif ($data($1).Live == A-B) && ($data($1).Half == MR3-MR4) { return $calc($data($1).Score-T + $data($1).FirstB + $data($1).SecondB) }
  1688. elseif ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $calc($data($1).Score-T + $data($1).FirstB + $data($1).SecondB + $data($1).MR3B) }
  1689. elseif ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $calc($data($1).Score-CT + $data($1).FirstB + $data($1).SecondB + $data($1).MR3B) }
  1690. }
  1691. }
  1692. else { return None }
  1693. }
  1694. elseif ($2 == bnow) {
  1695. if ($data($1).Status == ON) {
  1696. if ($data($1).Half == notyet) { return }
  1697. elseif ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1698. if ($data($1).Live == A-B) && ($data($1).Half == First) { return $data($1).Score-T }
  1699. elseif ($data($1).Live == B-A) && ($data($1).Half == First) { return $data($1).Score-CT }
  1700. elseif ($data($1).Live == A-B) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1701. elseif ($data($1).Live == B-A) && ($data($1).Half == First-Second) { return $data($1).FirstB }
  1702. elseif ($data($1).Live == A-B) && ($data($1).Half == Second) { return $data($1).Score-CT }
  1703. elseif ($data($1).Live == B-A) && ($data($1).Half == Second) { return $data($1).Score-T }
  1704. elseif ($data($1).Live == A-B) && ($data($1).Half == Second-MR3) { return $data($1).SecondB }
  1705. elseif ($data($1).Live == B-A) && ($data($1).Half == Second-MR3) { return $data($1).SecondB }
  1706. elseif ($data($1).Live == A-B) && ($data($1).Half == MR3) { return $data($1).Score-T }
  1707. elseif ($data($1).Live == B-A) && ($data($1).Half == MR3) { return $data($1).Score-CT }
  1708. elseif ($data($1).Live == A-B) && ($data($1).Half == MR4) { return $data($1).Score-CT }
  1709. elseif ($data($1).Live == B-A) && ($data($1).Half == MR4) { return $data($1).Score-T }
  1710. }
  1711. }
  1712. else { return None }
  1713. }
  1714. elseif ($2 == Half) {
  1715. if ($data($1).Status == ON) {
  1716. if ($data($1).Half == notyet) { return Not Live }
  1717. elseif ($data($1).Live == A-B) || ($data($1).Live == B-A) {
  1718. if ($data($1).Half == First) && ($calc($data($1).Score-CT + $data($1).Score-T) == 14) { return 1st half }
  1719. elseif ($data($1).Half == First) && ($calc($data($1).Score-CT + $data($1).Score-T) !== 14) { return 1st half }
  1720. elseif ($data($1).Half == First-Second) { return 2nd half }
  1721. elseif ($data($1).Half == Second) { return 2nd half }
  1722. elseif ($data($1).Half == Second-MR3) { return MR3 1st.half }
  1723. elseif ($data($1).Half == MR3) { return MR3 1st.half }
  1724. elseif ($data($1).Half == MR3-MR4) { return MR3 2nd.half }
  1725. elseif ($data($1).Half == MR4) { return MR3 2nd.half }
  1726. }
  1727. }
  1728. else { return None }
  1729. }
  1730. }
  1731. elseif ($data($1).Type == DM) {
  1732. if ($2 == notlive) { return Match is not live yet. }
  1733. if ($2 == a) && ($data($1).Status == ON) {
  1734. if ($data($1).Live == A-B) { return $data($1).Score-CT }
  1735. if ($data($1).Live == B-A) { return $data($1).Score-T }
  1736. }
  1737. elseif ($2 == b) && ($data($1).Status == ON) {
  1738. if ($data($1).Live == A-B) { return $data($1).Score-T }
  1739. if ($data($1).Live == B-A) { return $data($1).Score-CT }
  1740. }
  1741. }
  1742. }
  1743. alias LVLStyled { return $upper($left($1,1)) $+ $lower($right($1,$calc($len($1)-1))) }
  1744. ;/AddBan <Steam_ID/Nick> <User> <SSAY[num]/CHAN> <Reason>
  1745. alias Addban {
  1746. var %Access = $replace($acc($2).lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  1747. if (%Access >= 6) {
  1748. var %user = $2
  1749. var %lvl = $acc($2).lvl
  1750. var %steam = $iif($CheckSteam($1),$1,$findsteam($1))
  1751. if ($readini(Banned.ini,%steam,steam)) {
  1752. 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 $+ ))
  1753. 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) $+ )
  1754. halt
  1755. }
  1756. if ($isadmin(%steam)) {
  1757. var %ban-user = $v1
  1758. var %ban-lvl = $acc($v1).lvl
  1759. var %lvl-num = $replace(%lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  1760. var %ban-lvl-num = $replace(%ban-lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  1761. if (%lvl-num > %ban-lvl-num) || ( (%lvl-num == 6) && (%ban-lvl-num == 5) ) {
  1762. .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
  1763. if (!$isexists(%steam)) { SetNewPlayer %steam }
  1764. stats inc %steam bans
  1765. if (SSAY isin $3) ssay $remove($3,SSAY) (Banned) $iif($Stats(%steam).nick !== no nick,$v1,%ban-user) ( $+ %steam $+ ) by: $2 with reason: $iif($4-,$4-,no reason)
  1766. 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) $+ .)
  1767. if (SSAY isin $3) rcmd $remove($3,SSAY) admin_command admin_kick %steam
  1768. .write logs/Bans.txt ( $+ $data - $time $+ ) Ban: $2 (Bannned) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 with Reason: $iif($4-,$4-,no reason)
  1769. if (%Gather.BansLog == ON) { Sockwrite -tn Client.Details1 SendMsgBan $2 $stlmain(( $+ %Gather.Color2 $+ Ban $+ %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) $+ .) }
  1770. aline @BanLogs ( $+ $date - $time $+ ) Ban: $2 $stlmain(( $+ %Gather.Color2 $+ Ban $+ %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) $+ .)
  1771. }
  1772. else {
  1773. 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 $+ )) }
  1774. else { ssay $remove($3,SSAY) (!) %lvl $+ ( $+ %user $+ ) is not allowed to ban %ban-lvl $+ ( $+ %ban-user $+ ) }
  1775. }
  1776. }
  1777. else {
  1778. if (%steam) {
  1779. .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
  1780. if (!$isexists(%steam)) { SetNewPlayer %steam }
  1781. stats inc %steam bans
  1782. if (SSAY isin $3) ssay $remove($3,SSAY) (Banned) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 reason: $iif($4-,$4-,no reason)
  1783. 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) $+ .)
  1784. if (SSAY isin $3) rcmd $remove($3,SSAY) admin_command admin_kick %steam
  1785. .write logs/Bans.txt ( $+ $data - $time $+ ) Ban: $2 (Bannned) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 with Reason: $iif($4-,$4-,no reason)
  1786. aline @BanLogs ( $+ $date - $time $+ ) Ban: $2 $stlmain(( $+ %Gather.Color2 $+ Ban $+ %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) $+ .)
  1787. if (%Gather.BansLog == ON) { Sockwrite -tn Client.Details1 SendMsgBan $2 $stlmain(( $+ %Gather.Color2 $+ Ban $+ %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) $+ .) }
  1788. }
  1789. }
  1790. }
  1791. else {
  1792. if ($3 == CHAN) { msg %Gather.Channel $stlmain(Only %Gather.Color2 $+ %GatherLV3.P $+ $chr(44) %GatherLV2.P %Gather.Color1 allow to set Permanent Ban) }
  1793. else { ssay $remove($3,SSAY) (!) Only %GatherLV3.P $+ $chr(44) %GatherLV2.P allow to set Permanent Ban }
  1794. }
  1795. }
  1796.  
  1797. ;/Addbantime <Steam_ID/Nick> <User> <SSAY4/CHAN> <Days> <Reason>
  1798. alias Addbantime {
  1799. var %user = $2
  1800. var %lvl = $acc($2).lvl
  1801. var %lvl-num = $replace(%lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  1802. var %steam = $iif($CheckSteam($1),$1,$findsteam($1))
  1803. if ($readini(Banned.ini,%steam,steam)) {
  1804. 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 $+ ))
  1805. 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) $+ )
  1806. halt
  1807. }
  1808. if ($4 >= 2.01) && (%lvl-num == 1) { msg %Gather.Channel $stlmain($+($chr(40),$chr(2),!,$chr(2),$chr(41)) You are an %Gather.Color2 $+ $acc($2).lvl $+ %Gather.Color1 $+ $chr(44) Therefore $+ $chr(44) Your max ban duration is %Gather.Color2 $+ 2 $+ %Gather.Color1 days.) }
  1809. elseif ($4 >= 3.01) && (%lvl-num == 2) { msg %Gather.Channel $stlmain($+($chr(40),$chr(2),!,$chr(2),$chr(41)) You are an %Gather.Color2 $+ $acc($2).lvl $+ %Gather.Color1 $+ $chr(44) Therefore $+ $chr(44) Your max ban duration is %Gather.Color2 $+ 3 $+ %Gather.Color1 days.) }
  1810. elseif ($4 >= 4.01) && (%lvl-num == 3) { msg %Gather.Channel $stlmain($+($chr(40),$chr(2),!,$chr(2),$chr(41)) You are an %Gather.Color2 $+ $acc($2).lvl $+ %Gather.Color1 $+ $chr(44) Therefore $+ $chr(44) Your max ban duration is %Gather.Color2 $+ 4 $+ %Gather.Color1 days.) }
  1811. elseif ($4 >= 5.01) && (%lvl-num == 4) { msg %Gather.Channel $stlmain($+($chr(40),$chr(2),!,$chr(2),$chr(41)) You are an %Gather.Color2 $+ $acc($2).lvl $+ %Gather.Color1 $+ $chr(44) Therefore $+ $chr(44) Your max ban duration is %Gather.Color2 $+ 5 $+ %Gather.Color1 days.) }
  1812. elseif ($4 >= 6.01) && (%lvl-num == 5) { msg %Gather.Channel $stlmain($+($chr(40),$chr(2),!,$chr(2),$chr(41)) You are an %Gather.Color2 $+ $acc($2).lvl $+ %Gather.Color1 $+ $chr(44) Therefore $+ $chr(44) Your max ban duration is %Gather.Color2 $+ 6 $+ %Gather.Color1 days.) }
  1813. else {
  1814. if ($isadmin(%steam)) {
  1815. Ventox_delete_ban %steam
  1816. timer 1 2 Ventox_upload_ban %steam
  1817. var %ban-user = $v1
  1818. var %ban-lvl = $acc($v1).lvl
  1819. var %lvl-num = $replace(%lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  1820. var %ban-lvl-num = $replace(%ban-lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  1821. if (%lvl-num > %ban-lvl-num) || ( (%lvl-num == 6) && (%ban-lvl-num == 5) ) {
  1822. .writeini -n Banned.ini %steam steam %steam
  1823. .writeini -n Banned.ini %steam reason $iif($5-,$5-,no reason)
  1824. .writeini -n Banned.ini %steam at $date $time
  1825. .writeini -n Banned.ini %steam by $2
  1826. if ($ispremium($1)) && (%Gather.Premium == ON) {
  1827. .writeini -n Banned.ini %steam Days $calc($4 / 2)
  1828. }
  1829. else .writeini -n Banned.ini %steam Days $4
  1830. if (!$isexists(%steam)) { SetNewPlayer %steam }
  1831. stats inc %steam bans
  1832. if (SSAY isin $3) ssay $remove($3,SSAY) (Banned) $iif($Stats(%steam).nick !== no nick,$v1,%ban-user) ( $+ %steam $+ ) by: $2 with reason: $iif($5-,$5-,no reason) For: $iif($ifpremium($1),$calc($4 / 2),$4) days.
  1833. 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 $iif($ispremium($1),$calc($4 / 2),$4) days.)
  1834. if (SSAY isin $3) rcmd $remove($3,SSAY) admin_command admin_kick %steam
  1835. .write logs/Bans.txt ( $+ $data - $time $+ ) ban: $2 (Banned Time) $Stats(%steam).nick ( $+ %steam $+ ) By: $2 with reason: $iif($5-,$5-,no reason) For $iif($ispremium($1),$calc($4 / 2),$4) days.
  1836. aline @BanLogs ( $+ $date - $time $+ ) bantime: $2 $stlmain(( $+ %Gather.Color2 $+ Banned Time $+ %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 $iif($ispremium($1),$calc($4 / 2),$4) days.)
  1837. if (%Gather.BansLog == ON) { Sockwrite -tn Client.Details1 SendMsgBan $2 $stlmain(( $+ %Gather.Color2 $+ Banned Time $+ %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 $iif($ispremium($1),$calc($4 / 2),$4) days.) }
  1838. }
  1839. else {
  1840. if ($3 == CHAN) { msg %Gather.Channel $stlmain((!) %lvl $+ ( $+ %user $+ ) is not allowed to ban %ban-lvl $+ ( $+ %ban-user $+ )) }
  1841. else { ssay $remove($3,SSAY) (!) %lvl $+ ( $+ %user $+ ) is not allowed to ban %ban-lvl $+ ( $+ %ban-user $+ ) }
  1842. }
  1843. }
  1844. else {
  1845. if (%steam) {
  1846. if (%Gather.WebsiteSystem == ON) && ($upload(Bans)) { Ventox_delete_ban %steam }
  1847. if (%Gather.WebsiteSystem == ON) && ($upload(Bans)) { timer 1 2 Ventox_upload_ban %steam }
  1848. .writeini -n Banned.ini %steam steam %steam
  1849. .writeini -n Banned.ini %steam reason $iif($5-,$5-,no reason)
  1850. .writeini -n Banned.ini %steam at $date $time
  1851. .writeini -n Banned.ini %steam by $2
  1852. if ($ispremium($1)) && (%Gather.Premium == ON) {
  1853. .writeini -n Banned.ini %steam Days $calc($4 / 2)
  1854. }
  1855. else .writeini -n Banned.ini %steam Days $4
  1856. if (!$isexists(%steam)) { SetNewPlayer %steam }
  1857. stats inc %steam bans
  1858. if (SSAY isin $3) ssay $remove($3,SSAY) (Banned) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 reason: $iif($5-,$5-,no reason) For: $iif($ifpremium($1),$calc($4 / 2),$4) days.
  1859. 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 $iif($ispremium($1),$calc($4 / 2),$4) days.)
  1860. if (SSAY isin $3) rcmd $remove($3,SSAY) admin_command admin_kick %steam
  1861. .write logs/Bans.txt ( $+ $data - $time $+ ) Banned Time: $2 (Banned Time) $Stats(%steam).nick ( $+ %steam $+ ) By: $2 with reason: $iif($5-,$5-,no reason) For $iif($ispremium($1),$calc($4 / 2),$4) days.
  1862. aline @BanLogs ( $+ $date - $time $+ ) bantime: $2 $stlmain(( $+ %Gather.Color2 $+ Banned Time $+ %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 $iif($ispremium($1),$calc($4 / 2),$4) days.)
  1863. if (%Gather.BansLog == ON) { Sockwrite -tn Client.Details1 SendMsgBan $2 $stlmain(( $+ %Gather.Color2 $+ Banned Time $+ %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 $iif($ispremium($1),$calc($4 / 2),$4) days.) }
  1864. }
  1865. }
  1866. }
  1867. }
  1868. ;/Unban <Steam_ID/Nick> <User> <SSAY4/CHAN>
  1869. alias Unban {
  1870. var %steam = $iif($CheckSteam($1),$1,$findsteam($1))
  1871. var %user = $2
  1872. var %lvl = $acc($2).lvl
  1873. var %ban-user = $readini(Banned.ini,%steam,by)
  1874. var %ban-lvl = $acc(%ban-user).lvl
  1875. var %ban-lvl-num = $replace(%ban-lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1)
  1876. var %lvl-num = $replace(%lvl,%GatherLV3.P,3,%GatherLV2.P,2,%GatherLV1.P,1,%GatherLV0.P,0)
  1877. if (%ban-lvl == VIP) && ((%lvl == %GatherLV3.P) || (%lvl == %GatherLV2.P)) %ban-lvl-num = 0
  1878. if (!$findsteam($1-)) && ((%ban-user == %user) || (%lvl == %GatherLV3.P) || (%lvl == %GatherLV2.P)) {
  1879. if (%lvl-num < %ban-lvl-num) && (%steam) {
  1880. if ($3 == CHAN) msg %Gather.Channel $stlmain((!) Only $+ %Gather.Color2 $replace(%ban-lvl-num,1,%GatherLV1.Ps\%GatherLV2.Ps\%GatherLV3.Ps,2,%GatherLV2.Ps\%GatherLV3.Ps,3,%GatherLV3.Ps) $+ %Gather.Color1 or %Gather.Color2 $+ $readini(Banned.ini,%steam,by) $+ %Gather.Color1 can remove this %steam ban.)
  1881. else ssay $remove($3,SSAY) (!) Only $replace(%ban-lvl-num,1,%GatherLV1.Ps\%GatherLV2.Ps\%GatherLV3.Ps,2,%GatherLV2.Ps\%GatherLV3.Ps,3,%GatherLV3.Ps) or $readini(Banned.ini,%steam,by) can remove this $sclr( $+ %steam $+ ) ban.
  1882. halt
  1883. }
  1884. }
  1885. if (%steam) && ($readini(Banned.ini,%steam,steam)) {
  1886. echoShowReason %Steam $2
  1887. if ($3 == CHAN) msg %Gather.Channel $stlmain(( $+ %Gather.Color2 $+ Unbanned $+ %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))
  1888. msg #vgames.cs $stlmain(( $+ %Gather.Color2 $+ Unbanned $+ %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))
  1889. else ssay $remove($3,SSAY) $Stats(%steam).nick ( $+ %steam $+ ) by: $2 reason was: $iif($readini(Banned.ini,%steam,reason),$ifmatch,no reason)
  1890. .remini -n Banned.ini %steam
  1891. if (%Gather.WebsiteSystem == ON) && ($upload(Bans)) { Ventox_delete_ban %steam }
  1892. }
  1893. else {
  1894. if ($findsteam($1-)) { var %steam = $v1 }
  1895. else { PlayerNotOnBanList $1 }
  1896. }
  1897. }
  1898. alias MR15 {
  1899. rcmd $1 alias mr122k "admin_ignore_immunity 1;default_Access 0;mr121"
  1900. rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4timer 35;mr122"
  1901. rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 800;mr123"
  1902. rcmd $1 alias mr123 "mp_autokick 0;mp_freezetime 8;mr124"
  1903. rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
  1904. rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  1905. rcmd $1 mr122k
  1906. .timer 1 7 rcmd $1 alias mr126 "mp_friendlyfire 1"
  1907. if ($data($1).Type !== DM) { rcmd $1 csdm_active 0 }
  1908. else rcmd $1 csdm_active 1
  1909. }
  1910. alias PRAC {
  1911. RCMD $1 alias prac122k "admin_ignore_immunity 1;default_Access 0;Prac1"
  1912. RCMD $1 alias Prac1 "mp_forcecamera 0;mp_forcechasecam 0;mp_c4timer 35;Prac2"
  1913. RCMD $1 alias Prac2 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 16000;Prac3"
  1914. RCMD $1 alias Prac3 "mp_autokick 0;mp_friendlyfire 0;mp_freezetime 0;Prac4"
  1915. RCMD $1 alias Prac4 "mp_roundtime 7;mp_buytime 9;mp_fadetoblack 0;Prac5"
  1916. RCMD $1 alias Prac5 "sv_alltalk 1;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  1917. RCMD $1 prac122k
  1918. if ($data($1).Type !== DM) { rcmd $1 csdm_active 0 }
  1919. else rcmd $1 csdm_active 1
  1920. }
  1921. alias MR3 {
  1922. rcmd $1 alias mr122k "admin_ignore_immunity 1;default_Access 0;mr121"
  1923. rcmd $1 alias mr121 "mp_forcecamera 2;mp_forcechasecam 2;mp_c4timer 35;mr122"
  1924. rcmd $1 alias mr122 "mp_autoteambalance 0;mp_limitteams 0;mp_startmoney 4000;mr123"
  1925. rcmd $1 alias mr123 "mp_autokick 0;mp_freezetime 8;mr124"
  1926. rcmd $1 alias mr124 "mp_roundtime 1.75;mp_buytime 0.15;mp_fadetoblack 0;mr125"
  1927. rcmd $1 alias mr125 "sv_alltalk 0;sv_gravity 800;mp_tkpunish 0;sv_restart 1"
  1928. timer 1 7 rcmd $1 alias mr126 "mp_friendlyfire 1"
  1929. rcmd $1 mr122k
  1930. }
  1931. ;$rank(STEAM_ID) returns Rank number
  1932. alias rank { .close -@ @RankWin | .window -h @RankWin | filter -cfwtue 2 61 Stats.txt @RankWin * | return $fline(@RankWin,$+($1,*),1) }
  1933.  
  1934. alias ranks { return $lines(Stats.txt) }
  1935.  
  1936. alias isexists { return $read(Stats.txt,w ,$1 $+ =*) }
  1937.  
  1938. alias ShowRank {
  1939. if (STEAM_*:*:* iswm $1) {
  1940. if ($isexists($1)) { var %steam = $1 }
  1941. else { PlayerNotFound $1- }
  1942. }
  1943. else {
  1944. if ($findsteam($1-)) { var %steam = $v1 }
  1945. else { PlayerNotFound $1- }
  1946. }
  1947. if (%steam) { msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+  $+ %steam $+ %Gather.Color1 $+ ) Rank: $+ %Gather.Color2 $rank(%steam) $+ / $+ $ranks %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 ) }
  1948. }
  1949. alias ShowBans {
  1950. if (STEAM_*:*:* iswm $1) {
  1951. if ($isexists($1)) { var %steam = $1 }
  1952. else { PlayerNotFound $1- }
  1953. }
  1954. else {
  1955. if ($findsteam($1-)) { var %steam = $v1 }
  1956. else { PlayerNotFound $1- }
  1957. }
  1958. if (%steam) { msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+  $+ %steam $+ %Gather.Color1 $+ ) has banned $+ %Gather.Color2 $stats(%steam).bans %Gather.Color1 $+ times.) }
  1959. }
  1960. alias ShowMvp {
  1961. if (STEAM_*:*:* iswm $1) {
  1962. if ($isexists($1)) { var %steam = $1 }
  1963. else { PlayerNotFound $1 }
  1964. }
  1965. else {
  1966. if ($findsteam($1-)) { var %steam = $v1 }
  1967. else { PlayerNotFound $1 }
  1968. }
  1969. if (%steam) { msg %Gather.Channel $stlmain($Stats(%steam).nick ( $+ %Gather.Color2 $+  $+ %steam $+ %Gather.Color1 $+ ) Mvps: $+ %Gather.Color2 $Stats(%steam).mvps) }
  1970. }
  1971. ;/ShowRankServer <num> <send_to> <steam/rank>
  1972. alias ShowRankServer {
  1973. if ($CheckSteam($3)) {
  1974. if ($isexists($3)) { var %steam = $3 }
  1975. else { PlayerNotFoundServer $1 $3- }
  1976. }
  1977. else {
  1978. if ($findsteam($3-)) { var %steam = $v1 }
  1979. else { PlayerNotFoundServer $1 $3- }
  1980. }
  1981. if (%steam) { psay $1 $2 $Stats(%steam).nick ( $+ %steam $+ ) Gathers: $Stats(%steam).Gathers Points: $Stats(%steam).Vgames-Points Mvps: $Stats(%steam).Mvps }
  1982. }
  1983. alias ShowStatsServer {
  1984. if ($CheckSteam($3)) {
  1985. if ($isexists($3)) { var %steam = $3 }
  1986. else { PlayerNotFoundServer $3 }
  1987. }
  1988. else { if ($findsteam($3-)) { var %steam = $v1 } | else { PlayerNotFoundServer $1 $3- } }
  1989. if (%steam) {
  1990. 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) $+ .
  1991. psay $1 $2 Played on: $Stats(%steam).Gathers Gathers so far. (Last gather was number $Stats(%steam).Last $+ )
  1992. 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
  1993. psay $1 $2 Deagle: $Stats(%steam).Deagle Usp: $Stats(%steam).Usp Tks: $Stats(%steam).tks Knife: $Stats(%steam).Knife Aces: $Stats(%steam).ace Miniaces: $Stats(%steam).Miniace
  1994. }
  1995. }
  1996. ;$findsteam(NICK) returns STEAM_ID
  1997. alias findsteam { return $gettok($read(Nicks.txt, w, * $+ $1- $+ *),1,32) }
  1998. alias PlayerNotFound { msg %Gather.Channel $stlmain(The player ( $+ %Gather.Color2 $+  $+ $1- $+ %Gather.Color1 $+ ) is not found.) }
  1999. alias PlayerNotOnBanList { msg %Gather.Channel $stlmain(The player ( $+ %Gather.Color2 $+  $+ $1- $+ %Gather.Color1 $+ ) is not at the BANNED list.) }
  2000. alias PlayerNotFoundServer { ssay $1 The player ( $+ $2- $+ ) is not found. }
  2001.  
  2002. alias database {
  2003. .remove status.ini
  2004. var %x 1, %temp
  2005. while ($var(%Gather*.Status,%x)) {
  2006. var %temp = %temp $iif($data(%x).Status == OFF, %x OFF , %x $data(%x).status $data(%x).admin $data(%x).map $iif($data(%x).Live,$Score(%x,A) $+ - $+ $Score(%x,B),Not-live) )
  2007. inc %x
  2008. wrr %temp
  2009. unset %temp
  2010. }
  2011. writeini -n info.ini today today %Gather.today
  2012. writeini -n info.ini total total %Gather.num
  2013. writeini -n info.ini TagA TagA %Gather.TAG-A
  2014. writeini -n info.ini TagB TagB %Gather.TAG-B
  2015. }
  2016. alias wrr {
  2017. if ($5) {
  2018. writeini -n Status.ini $1 num $1
  2019. writeini -n Status.ini $1 Status $2
  2020. writeini -n Status.ini $1 admin $3
  2021. writeini -n Status.ini $1 map $4
  2022. writeini -n Status.ini $1 score $5
  2023. if ($data($1).status == adding) { writeini -n Status.ini $1 players $numtok($data($1).players,32) | writeini -n Status.ini $1 max $data($1).max }
  2024. if ($data($1).sub) { writeini -n Status.ini $1 sub -Sub needed- }
  2025. }
  2026. elseif ($2) {
  2027. writeini -n Status.ini $1 num $1
  2028. writeini -n Status.ini $1 Status $2
  2029. }
  2030. }
  2031. alias LoginStyle { return $upper($1) }
  2032.  
  2033. ; syntax: /cursesystem <Num> <Steam_ID> <game-nick>
  2034. alias cursesystem {
  2035. var %dagather = $1
  2036. var %dasteam = $2
  2037. var %dagnick = $3-
  2038. var %x = 1,%y = $lines(WCurse.txt)
  2039. while (%x <= %y) {
  2040. var %w = $read(WCurse.txt,%x)
  2041. if (%w isin %dac.msg) || (fs $+ * iswm %dac.msg) || (*fs iswm %dac.msg) {
  2042. if (!$readini(Curse.ini,Cursing $+ %dagather,%dasteam)) {
  2043. ssay %dagather %dagnick ( $+ %dasteam $+ ) - Please Don't Flame! (1/3)
  2044. writeini Curse.ini Cursing $+ %dagather %dasteam 1
  2045. }
  2046. elseif ($readini(Curse.ini,Cursing $+ %dagather,%dasteam) == 1) {
  2047. ssay %dagather %dagnick ( $+ %dasteam $+ ) - Please Don't Flame! The next Curse will Banned You! (2/3)
  2048. writeini Curse.ini Cursing $+ %dagather %dasteam 2
  2049. }
  2050. elseif ($readini(Curse.ini,Cursing $+ %dagather,%dasteam) >= 2) && (!%dac.flood) {
  2051. Addbantime %dasteam FlameProtection SSAY $+ %dagather 3 Flame on Gather!
  2052. inc -u2 %dac.flood
  2053. }
  2054. unset %dac.msg
  2055. halt
  2056. }
  2057. inc %x
  2058. }
  2059. unset %dac.msg
  2060. }
  2061.  
  2062. ;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2063. ;;;;;;;;; SERIVCE ;;;;;;;;;
  2064. ;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2065.  
  2066.  
  2067. On *:Socklisten:Service: {
  2068. echo -s CONNECT $Sock(Client).saddr $Sock(Client2).saddr
  2069. Sockaccept Client2
  2070. echo -s 1(12Service1) new connnection from3 $Sock(Client2).ip
  2071. var %n = Client. $+ $ticks $+ $r(1,99)
  2072. Sockrename Client2 %n
  2073. Sockwrite -tn %n Connected
  2074. }
  2075. On *:Sockread:Client.*: {
  2076. var %Read
  2077. Sockread %Read
  2078. tokenize 32 %Read
  2079. echo -s 1(12Service1) Data from4 $Sockname $+ 1 $+ : $1-
  2080. if ($1 == Details1) { Sockrename $sockname Client.Details1 }
  2081. elseif ($1 == Details2) { Sockrename $sockname Client.Details2 }
  2082. elseif ($1 == Details3) { Sockrename $sockname Client.Details3 }
  2083. elseif ($1 == RankBot) { Sockrename $sockname Client.RankBot }
  2084. if (%Gather.VentBotName == Details3) && (%Gather.VentBotName == Details2) && (%Gather.VentBotName == Details1) && (%Gather.VentBotName == Rankbot) {
  2085. halt
  2086. }
  2087. elseif ($1 == %Gather.VentBotName $+ ) { Sockrename $sockname Client. $+ %Gather.VentBotName }
  2088. }
  2089. alias SendData { echo -s 1(12Service1) Send data to4 $1 1:7 $2- | Sockwrite -tn $1 $2- }
  2090. alias Service { Sockclose Service | Socklisten Service 12122 | echo -s 1(12Service1) 7Starting Service server ... }
  2091.  
  2092. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2093. ;;;;;;;;; Ventrilo Connection ;;;;;;;;;
  2094. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2095.  
  2096. alias details3 {
  2097. if ($1 == Close) Sockwrite -tn Client. $+ %Gather.VentBotName CloseRooms $$2 $data($2).rooma $data($2).roomb $data($2).gtrinfo $data($2).roomname
  2098. elseif ($1 == Open) Sockwrite -tn Client. $+ %Gather.VentBotName OpenRooms $$2 $data($2).rooma $data($2).passa $data($2).roomb $data($2).passb $data($2).gtrinfo $data($2).roomname $+ $chr(35) $+ $qt($replace($data($2).Team-B,$chr(32),$chr(44))) $+ $chr(35) $+ $qt($replace($data($2).Team-A,$chr(32),$chr(44))) $+ $chr(35) $+ $data($2).Admin $+ $chr(35) $+ $data($2).Map
  2099. elseif ($1 == Adding) Sockwrite -tn Client. $+ %Gather.VentBotName Addingroom $$2 $data($2).rooma $data($2).roomb $data($2).gtrinfo $data($2).roomname
  2100. }
  2101.  
  2102. ;/RemovePassVent <num>
  2103. alias RemovePassVent {
  2104. var %file = pass $+ $1 $+ .txt
  2105. if ($exists(%file)) .remove %file
  2106. .write %file /chan delete $data($1).rooma
  2107. .write %file /chan delete $data($1).roomb
  2108. .write %file /chan delete $data($1).gtrinfo
  2109. .write %file /subchan $qt($data($1).roomname) $qt($data($1).gtrinfo) ¶ $qt($r(1,999)) ¶ "There is NO gather running ATM "
  2110. run -hide Ventox.exe -n %Gather.VentUser -w %Gather.VentPass -a %Gather.VentRCON -f %file %Gather.Vent
  2111. .timer 1 3 .remove %file
  2112. }
  2113.  
  2114. ;/AddingPassVent <num>
  2115. alias AddingPassVent {
  2116. var %file = pass $+ $1 $+ .txt
  2117. if ($exists(%file)) .remove %file
  2118. .write %file /chan delete $data($1).rooma
  2119. .write %file /chan delete $data($1).roomb
  2120. .write %file /chan delete $data($1).gtrinfo
  2121. .write %file /subchan $qt($data($1).roomname) $qt($data($1).gtrinfo) ¶ $qt($r(1,999)) ¶ "Gather is Adding Type: $data($1).sign $+ Add "
  2122. run -hide Ventox.exe -n %Gather.VentUser -w %Gather.VentPass -a %Gather.VentRCON -f %file %Gather.Vent
  2123. .timer 1 3 .remove %file
  2124. }
  2125.  
  2126. ;/ChangePassVent <num>
  2127. alias ChangePassVent {
  2128. var %file = pass $+ $1 $+ .txt
  2129. if ($exists(%file)) .remove %file
  2130. .write %file /chan delete $data($1).rooma
  2131. .write %file /chan delete $data($1).roomb
  2132. .write %file /chan delete $data($1).gtrinfo
  2133. .write %file /subchan $qt($data($1).roomname) $qt($data($1).roomA) ¶ $qt($data($1).passa) ¶ $replace($data($1).Team-A,$chr(32),$chr(44))
  2134. .write %file /subchan $qt($data($1).roomname) $qt($data($1).roomB) ¶ $qt($data($1).passb) ¶ $replace($data($1).Team-B,$chr(32),$chr(44))
  2135. .write %file /subchan $qt($data($1).roomname) $qt($data($1).gtrinfo) ¶ $qt($r(1,999)) ¶ $qt(Map: $data($1).Map Admin: $data($1).Admin)
  2136. run -hide Ventox.exe -n %Gather.VentUser -w %Gather.VentPass -a %Gather.VentRCON -f %file %Gather.Vent
  2137. .timer 1 3 .remove %file
  2138. }
  2139.  
  2140. ;addvent $2 $acc($2).pass $acc($2).lvl $nick $acc($2).by
  2141. ;/OpenUserVent <user> <pass> <lvl> <by> <GatherbotName>
  2142. alias OpenUserVent {
  2143. var %nick = $1,%pass = $2,%lvl = $3,%nickIRC = $4,%by = $5
  2144. if (%Gather.VentSystem == OFF) { .writeini -n $3 $+ .cfg TAB1 Notes User Created by %nickIRC ( $+ %by $+ ) on 07/03/2013 - 17:08:50 (Rank: %lvl $+ ) }
  2145. if (%Gather.VentSystem == ON) { Sockwrite -tn Client. $+ %Gather.VentBotName OpenUser %nick %pass %lvl %nickIRC %by }
  2146. if (%Gather.VentSystem == OFF) { .run Ventox.exe "1" " $+ %nick $+ " " $+ %pass $+ " " $+ $3 $+ .cfg $+ " " $+ %by $+ " }
  2147. timer 1 3 msg %nickIRC $stlmain(Creating Now the User on the Vent! (User: $sclr(%nick) Pass: $sclr(%pass) Rank: $sclr(%lvl) $+ )))
  2148. }
  2149. ;Sockwrite -tn Client.Users OpenUser %nick %pass %lvl %nickIRC %by
  2150.  
  2151. ;/RemoveUserVent <user>
  2152. alias RemoveUserVent {
  2153. if ($findtok(%Gather.Protected,$1,32)) {
  2154. msg $nick $stlmain(Dont try to Remove Users from $sclr(Protected List) $+ !)
  2155. halt
  2156. }
  2157. ;if (!$findtok(%Gather.Protected,$1,32)) {
  2158. if (%Gather.VentSystem == OFF) { .run VNT_UserCreator.exe "-1" " $+ $1 $+ " }
  2159. if (%Gather.VentSystem == ON) { Sockwrite -tn Client. $+ %Gather.VentBotName RemoveUser $1 }
  2160. ;}
  2161. }
  2162.  
  2163. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2164. ;;;;;;;;; Socket Site ;;;;;;;;;
  2165. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2166.  
  2167. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2168. ;;;;;;;;;;;;;;;;; Upload Gathers ;;;;;;;;;;;;;;;;;
  2169. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2170.  
  2171. /Ventox_update_gather <NUM> <STATUS> <SERVER> <STARTED-AT> <MAP> <ADMIN> <TEAM-A> <TEAM-B> <HALF> <SCORE-A> <SCORE-B> <SIGN> <RGB>
  2172. alias Ventox_update_gather {
  2173. var %num = $1
  2174. var %status = $2
  2175. var %server = $data($1).host
  2176. var %started-at = $gettok($4,1,32)
  2177. var %map = $5
  2178. var %admin = $6
  2179. var %team-a = $replace($7,$chr(32),~)
  2180. var %team-b = $replace($8,$chr(32),~)
  2181. var %half = $9
  2182. var %score-a = $10
  2183. var %score-b = $11
  2184. var %sign = $replace($12,&,8,+,3)
  2185. var %rgb = $replace($1,1,Orange,2,Cyan,3,Red,5,Yellow,7,Purple,8,Brown,9,Blue,4,RGB(0,255,0),6,RGB(0,147,147))
  2186. Ventox_URL stats/index.php?pass= $+ $get_pass $+ &action=update_gather&num= $+ %num $+ &status= $+ %status $+ &server= $+ %server $+ &startedat= $+ %started-at $+ &map= $+ %map $+ &admin= $+ %admin $+ &teama= $+ %team-a $+ &teamb= $+ %team-b $+ &half= $+ %half $+ &scorea= $+ %score-a $+ &scoreb= $+ %score-b $+ &sign= $+ %sign $+ &rgb= $+ %rgb
  2187. }
  2188. alias Before_Update_Gather {
  2189. $Ventox_update_gather($1,$data($1).status,$data($1).server,$data($1).started,$data($1).map,$data($1).admin,$data($1).team-a,$data($1).team-b,$data($1).half,$Score($1,A),$Score($1,B),$data($1).sign,$data($1).rgb)
  2190. }
  2191. alias dupdate_Gathers {
  2192. var %x 1, %y 4000
  2193. while ($data(%x).Status) {
  2194. .timer -m 1 %y Before_Update_Gather %x
  2195. inc %y 400
  2196. inc %x
  2197. }
  2198. }
  2199.  
  2200. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2201. ;;;;;;;;;;;;;;; End Upload Gathers ;;;;;;;;;;;;;;;
  2202. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2203.  
  2204. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2205. ;;;;;;;;;;;;;;;;; Upload Bans ;;;;;;;;;;;;;;;;;
  2206. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2207.  
  2208. /Ventox_delete_all_bans
  2209. alias Ventox_delete_all_bans { Ventox_url stats/index.php?pass= $+ $get_pass $+ &action=un_bans }
  2210.  
  2211. /Ventox_upload_bans
  2212. alias Ventox_upload_bans {
  2213. Ventox_delete_all_bans
  2214. var %x 1, %y 10000
  2215. echo -s Uploading bans at $ini(Banned.ini,0) seconds.
  2216. while ($ini(Banned.ini,%x)) {
  2217. var %steam = $v1
  2218. .timer -m 1 %y Ventox_add_ban %steam $get_ctime(%steam) $readini(Banned.ini,%steam,by) $readini(Banned.ini,%steam,at) $readini(Banned.ini,%steam,reason)
  2219. inc %y 500
  2220. inc %x
  2221. }
  2222. .timer 1 $ini(Banned.ini,0) echo -s Uploading bans has finished!
  2223. }
  2224.  
  2225. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2226.  
  2227. /Ventox_add_ban <STEAM_ID> <CTIME> <BY> <AT> <REASON>
  2228. alias Ventox_add_ban {
  2229. var %steam_id = $1
  2230. var %ctime = $2
  2231. var %by = $3
  2232. var %at = $4
  2233. var %reason = $replace($6-,$chr(32),~)
  2234. Ventox_URL stats/index.php?pass= $+ $get_pass $+ &action=add_ban&steam_id= $+ %steam_id $+ &ctime= $+ %ctime $+ & $+ by= $+ %by $+ &at= $+ %at $+ & $+ reason= $+ %reason
  2235. }
  2236. alias Ventox_upload_ban { var %steam = $1 | Ventox_add_ban %steam $get_ctime(%steam) $readini(Banned.ini,%steam,by) $readini(Banned.ini,%steam,at) $readini(Banned.ini,%steam,reason) }
  2237. alias Ventox_delete_ban {
  2238. var %steam = $1
  2239. Ventox_URL stats/index.php?pass= $+ $get_pass $+ &action=un_ban&steam_id= $+ %steam
  2240. }
  2241.  
  2242. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2243. ;;;;;;;;;;;;;;; End Upload Bans ;;;;;;;;;;;;;;;
  2244. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2245.  
  2246. alias START_TIMER {
  2247. if (!$timer(status)) && (%Gather.WebsiteSystem == ON) {
  2248. .timerSTATUS 0 15 dupdate_Gathers
  2249. .timerBAN 0 3600 Ventox_upload_bans
  2250. .timerBANDEL 0 3598 Ventox_delete_all_bans
  2251. }
  2252. }
  2253. alias upload { return $gettok(%Gather.Upload,$1,32) }
  2254. alias get_pass { return mv95mga }
  2255. alias get_ctime {
  2256. var %ctime = $Timeleft2($readini(Banned.ini,$1,at),$readini(Banned.ini,$1,Days)))
  2257. if (%ctime > 0) && ($readini(Banned.ini,$1,Days)) return %ctime
  2258. else return -1
  2259. }
  2260.  
  2261. on *:SOCKOPEN:Ventox_URL:{
  2262. if ($sockerr == 0) {
  2263. set %prkett GET / $+ %Ventox_url HTTP/1.1
  2264. set %prkett %prkett $+ $crlf $+ Host: %Gather.Website
  2265. set %prkett %prkett $+ $crlf $+ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1 he; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 ( .NET CLR 3.5.30729; .NET4.0E)
  2266. set %prkett %prkett $+ $crlf $+ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  2267. set %prkett %prkett $+ $crlf $+ Accept-Language: he,en-us;q=0.7,en;q=0.3
  2268. set %prkett %prkett $+ $crlf $+ Accept-Encoding: gzip,deflate
  2269. set %prkett %prkett $+ $crlf $+ Accept-Charset: windows-1255,utf-8;q=0.7,*;q=0.7
  2270. set %prkett %prkett $+ $crlf $+ Keep-Alive: 115
  2271. set %prkett %prkett $+ $crlf $+ Connection: keep-alive $+ $crlf $+ $crlf
  2272. sockwrite -n $sockname %prkett
  2273. }
  2274. }
  2275. alias Ventox_URL {
  2276. set %Ventox_URL $1-
  2277. sockclose Ventox_URL
  2278. sockopen Ventox_URL %Gather.Website 80
  2279. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement