Usage: Taip /addmp3 utk masukkan senarai lagu. Script akan auto info (/ame) selepas 60s connect ke server
alias uw {
var %a = 1
while (%a <= $numtok($1-,32)) {
var %b = $gettok($1-,%a,32)
var %c = %c $+($upper($left(%b,1))) $+ $mid(%b,2)
var %a $calc(%a +1)
}
return %c
}
alias addmp3 {
var %mp3.dir $sdir="Set MP3 Dir"
if (!%mp3.dir) { return }
var %mp3.num $findfile(%mp3.dir, *.mp3, 0), %mp3.loop 1
:mp3_loop
if (%mp3.loop <= %mp3.num) {
.write mp3.txt $findfile(%mp3.dir,*.mp3,%mp3.loop)
inc %mp3.loop
goto mp3_loop
}
}
alias mp3info {
var %lagu = $qt($read(mp3.txt))
.splay -cwmp %lagu
ame sedang mendengar lagu $uw($replace($lower($remove($nopath(%lagu),.mp3)),_,$chr(32))) [ $+ $duration($calc($sound(%lagu).length / 1000)) $+ / $+ $round($calc($file(%lagu) / 1000000),2) $+ mb $+ / $+ $sound(%lagu).bitrate $+ kbps]
.timermp3info 1 $calc($sound(%lagu).length / 1000 + 60) mp3info
}
ON *:CONNECT: { .timer 1 60 mp3info }
[/sourcecode]