PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
on @*:text:*:#kanal:{
;muaf nickler buraya
if $me !isop $1 { return }
if ($istok(nick1 nick2 nick3,$nick,32)) { halt }
if (!$hget(topten)) { hmake topten }
if ($1 == !toplist) { msg $chan $toplist | halt }
if ($1 == !puan) { msg $chan $nick Senin Puanın: $iif($hget(topten,$nick),$hget(topten,$nick),Yok) | halt }
if ($len($1-) <= 50) { hinc topten $nick 1 | hsave -o topten $shortfn($mircdirtopten.data) }
}
on *:start:{
if (!$hget(topten)) { hmake topten | hload topten $shortfn($mircdirtopten.data) }
}
on *:exit:hsave -o topten $shortfn($mircdirtopten.data)
on *:disconnect:hsave -o topten $shortfn($mircdirtopten.data)
alias toplist {
unset %top10puan
hsave topten $shortfn($mircdirtopten.data)
.hfree -sw topten | hmake topten | hload topten $shortfn($mircdirtopten.data)
var %xc = $hget(topten,0).data,%ss = 1
while (%ss <= %xc) {
set %top10puan $addtok(%top10puan,$hget(topten,%ss).data,46)
inc %ss 1
}
var %sira = $sorttok(%top10puan,46,nr)
var %1 = 1,%2 = 1,%3 = 1,%4 = 1,%5 = 1,%6 = 1,%7 = 1,%8 = 1,%9 = 1,%10 = 1
%1 = $fazlaise($gettok(%sira,1,46)) $gettok(%sira,1,46)
%2 = $fazlaise($gettok(%sira,2,46)) $gettok(%sira,2,46)
%3 = $fazlaise($gettok(%sira,3,46)) $gettok(%sira,3,46)
%4 = $fazlaise($gettok(%sira,4,46)) $gettok(%sira,4,46)
%5 = $fazlaise($gettok(%sira,5,46)) $gettok(%sira,5,46)
%6 = $fazlaise($gettok(%sira,6,46)) $gettok(%sira,6,46)
%7 = $fazlaise($gettok(%sira,7,46)) $gettok(%sira,7,46)
%8 = $fazlaise($gettok(%sira,8,46)) $gettok(%sira,8,46)
%9 = $fazlaise($gettok(%sira,9,46)) $gettok(%sira,9,46)
%10 = $fazlaise($gettok(%sira,10,46)) $gettok(%sira,10,46)
return 0,10Top10 Puan $+(0,$chr(44),4,#10,$chr(44),10,$chr(32),%1) $+(0,$chr(44),4,#20,$chr(44),10,$chr(32),%2) $+(0,$chr(44),4,#30,$chr(44),10,$chr(32),%3) $+(0,$chr(44),4,#40,$chr(44),10,$chr(32),%4) $+(0,$chr(44),4,#50,$chr(44),10,$chr(32),%5) $+(0,$chr(44),4,#60,$chr(44),10,$chr(32),%6) $+(0,$chr(44),4,#70,$chr(44),10,$chr(32),%7) $+(0,$chr(44),4,#80,$chr(44),10,$chr(32),%8) $+(0,$chr(44),4,#90,$chr(44),10,$chr(32),%9) $+(0,$chr(44),4,#100,$chr(44),10,$chr(32),%10)
}
alias -l fazlaise {
unset %y | unset %w
var %i = $hfind(topten,$1,0,w).data
while (%i) {
%y = $hfind(topten,$1,%i,w).data
%w = %y %w
dec %i
}
return $replace($sorttok(%w,32,a),$chr(32),$chr(44))
}