יוצר: לא ידוע
גרסה: 1.0
תיאור: בוט קלאבים, מפרסם רשימת סרברים שבחרתם.
הפעלה: כנסו למירק ולחצו במקלדת ALT + R, לחצו למעלה בצד שמאל File ואז New, תעתיקו את הסקריפט ותאשרו.
קוד: בחר הכל
on *:text:*:%g.chan:{
unset %hl.platot
if ($1 == !players) && (!%hl.flood) {
msg %g.chan The players Are:
set %HLserver $iif($gettok(%ip,$2,32),$v1,$gettok(%ip,1,32))
hlll
set -u30 %hl.flood 1
}
elseif ($1 == !clubs) && (!%hl.flood) { hlc | set -u25 %hl.flood 1 }
}
alias hlll {
set %HLCS.queried $false
sockudp -k HLCS.playr $replace(%HLserver,$chr(58),$chr(32)) $str($chr(255),4) $+ USource Engine Query
}
on *:udpread:HLCS.playr: {
if ($sockerr > 0) return
sockread &temp
if ($count($bvar(&temp,6,6),$chr(32)) == 3) && (%HLCS.queried != $true) { sockudp -k HLCS.playr $replace(%HLserver,$chr(58),$chr(32)) ????U $+ $bvar(&temp,6,4).text | set %HLCS.queried $true | halt }
breplace &temp 255 0
var %client_start = 8, %i = 0, %clients = $bvar(&temp,6)
while (%i <= %clients) {
var %client = $bvar(&temp,%client_start,$calc($bfind(&temp,%clie nt_start,0) - %client_start)).text
var %frag = $bvar(&temp,$calc($bfind(&temp,%client_start,0) + 1),1)
var %time32 = $bvar(&temp,$calc($bfind(&temp,%client_start,%frag 0 0 0) + $iif(%frag,4,5)),4)
var %client_start = $calc($bfind(&temp,%client_start,%frag 0 0 0) + $iif(%frag,9,10))
if (%client) { .timer 1 %i msg %g.chan Name: %client Score: %frag Time: $duration($unfloat(%time32)) }
inc %i
}
}
alias hlc {
unset %hl.*
%hl.serverloop = 1
var %x = 1
while ($gettok(%ip,%x,32)) {
var %y = $gettok(%ip,%x,32)
sockclose HL.*
set %HL.IP %y
set %HL.ticks $ticks
if (!%clubreg) .timer 1 5 msg %g.chan Register: Register #Games.il Server at www.Games-il.co.il | set -u10 %clubreg 1
.timer -m 1 0 sockudp -k HL. $+ %y $replace(%y,$chr(58),$chr(32)) $str($chr(255),4) $+ TSource Engine Query
inc %x
}
}
on *:udpread:HL.*:{
set %HL.Ping $calc($ticks - %HL.ticks)
sockread &serv
breplace &serv 0 254
tokenize 254 $sbvar
if (You have been banned from this server. !isin $1) {
if ($players(1) >= $players(2)) { var %hl.playersh $+(04,$players(1),/,$players(2)) }
else {
if (!$players(2)) { var %hl.playersh 030/ $+ $players(1)) | goto b }
var %hl.playersh $+(03,$iif($players(2) > 33,0/ $+ $players(1),$+($iif($players(1),$v1,0),/,$players(2))))
}
}
:b
.timer 1 %hl.serverloop msg %g.chan %hl.serverloop $+ ) Address: $mid($sockname,4-) Host: $iif($css.yn,$remove($1,????I),$2) Map: $iif($css.yn,$2,$3) Players: %hl.playersh
.timerhl.tot 1 $calc($numtok(%ip,32) + 1) hl.tot
set %hl.pinga %hl.pinga $calc($ticks - %HL.ticks)
set %hl.platot %hl.platot $strip(%hl.playersh)
inc %hl.serverloop
}
alias sbvar { return $bvar(&serv,1,$bvar(&serv,0)).text }
alias players {
if ($1 == 1) { return $asc($mid($gettok($sbvar,6,254),1,1)) }
elseif ($1 == 2) { return $asc($mid($gettok($sbvar,6,254),2,1)) }
}
alias -l css.yn { return $iif(Source isin $gettok($sbvar,4,254),1,0) }
alias -l hl.tot {
var %x = 1,%y = 1
while ($gettok(%hl.pinga,%x,32)) {
var %p = $calc(%p + $gettok(%hl.pinga,%x,32))
inc %x
}
while ($gettok(%hl.platot,%y,32)) {
var %a = $calc(%a + $gettok($gettok(%hl.platot,%y,32),1,47)),%k = $calc(%k + $gettok($gettok(%hl.platot,%y,32),2,47))
inc %y
}
var %w = Total Clubs: $calc(%hl.serverloop - 1) Clubs Players:
if (%k <= %a) { msg %g.chan %w $+(04,%a,/,%k) }
else { msg %g.chan %w $+(03,%a,/,%k) }
}
menu channel,status {
Clubs bot
.Add server:set %ip $addtok(%ip,$$input(Choose a server to add,e,Clubs bot),32)
.Set channel:var %x = $$input(Choose a channel,e,Clubs bot) | set %g.chan $iif($left(%x,1) != $chr(35),$chr(35) $+ %x,%x)
.-
.Delete all servers:unset %ip
}
;No my alias
alias -l unfloat {
if ($gettok($1,4,32) >= 100) return
var %x 4, %f , %b
while (%x > 1) { %f = %f $+ $base($gettok($1,%x,32),10,2,8) | dec %x }
var %m 1 $+ $mid(%f,10,23) , %e $calc($base($mid(%f,2,8),2,10) -127) , %x 24
while (%x > 0) { dec %x | %b = $calc( %b + 2 ^ $calc(%x + %e) * $mid( %m , $calc(24 - %x) , 1 ) ) }
return $calc(%b / 2^23)
}
יש למצוא גם: pastebin.php?mode=view&s=43