dialog mp3 { title "mp3sys - v02 by Rabbi" size -1 -1 300 200 button "ok"1, 180 170 20 20 list 2, 10 20 100 150,sort button "add" 3, 10 172 25 20 button "del" 4, 43 172 25 20 button "play" 5, 123 50 25 20 text "Playlist" 6, 25 5 100 15 button "stop" 7, 150 50 28 20 button "pause" 8, 180 50 32 20 edit ""9, 120 20 120 20 box "Vol"10, 260 40 25 65 button "up",11, 262 55 20 20 button "low",12, 262 80 20 20 box "",13, 120 40 120 55 button "res" 14, 214 50 23 20 button "next" 15, 123 70 25 20 button "prev" 16, 150 70 28 20 button "mute" 17, 180 70 32 20 box "random",18, 120 95 120 35 radio "on",19, 123 108 40 20,group radio "off",20, 180 108 40 20 box "search mp3",21, 120 140 120 40 text "Now playing" 22, 125 5 100 15 button "search",24, 153 155 45 20 button "unm",25, 214 70 23 20 button "clear",26, 75 172 28 20 text "Length" ,27, 255 5 100 15 edit "",28, 245 20 55 20 edit "",29, 245 120 55 20 box "info on #",30, 245 140 55 50 radio "on",31, 250 151 40 20,group radio "off",32, 250 170 40 17 } menu nicklist,channel,query,status { mp3sys: ..start: { dialog -md mp3 mp3 | echo 14 -a **** welcome to $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) by Rabbi enjoy! :) } ..unload: { .unload -rs mp3.mrc } } on *:dialog:mp3:init:0:{ did -h $dname 1 var %mp3 = 1,%favmp3 while ($read(favmp3.txt,%mp3)) { %favmp3 = $ifmatch did -a $dname 2 $nopath(%favmp3) inc %mp3 } did -o $dname 6 1 playlist( $+ $did($dname,2).lines $+ ) if ($group(#random) == on) { did -c $dname 19 } else { did -c $dname 20 } if ($insong) { did -o $dname 9 1 %mp3data did -o mp3 28 1 $duration($calc($sound($insong.fname).length / 1000)) dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) } if (%showinfo == yes) { did -c mp3 31 } else { did -c mp3 32 } } on *:dialog:mp3:sclick:*: { if ($did == 3) { var %fav = $sfile(e:,browse file to add,add) if (!$read(favmp3.txt,w,%fav)) { did -a $dname 2 $nopath(%fav) write favmp3.txt %fav did -o $dname 6 1 playlist( $+ $did($dname,2).lines $+ ) did -c $dname 2 $didwm($dname,2,$+(*,$nopath(%fav),*)) } else { var %exists = $input(this file already exists!,64,information) } } if ($did == 4) { did -d $dname 2 $did($dname,2).sel write -dw $+ $+(*,$did($dname,2).seltext,*) favmp3.txt did -o $dname 6 1 playlist( $+ $did($dname,2).lines $+ ) } if ($did == 5) { if (!$did($dname,2).seltext) { var %fav = $sfile($mp3dir,play) splay $+(",%fav,") did -o $dname 9 1 $nopath(%fav) did -o mp3 28 1 $duration($calc($sound($insong.fname).length / 1000)) dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) set %mp3data $did(mp3,2).seltext mp3time showinfo } else { splay $read(favmp3.txt,w,$+(*,$did($dname,2).seltext,*)) dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) did -o mp3 9 1 $did(mp3,2).seltext did -o mp3 28 1 $duration($calc($sound($insong.fname).length / 1000)) set %mp3data $did(mp3,2).seltext mp3time showinfo } } if ($did == 7) { splay stop did -o mp3 9 1 stop did -r mp3 28 did -r mp3 29 dialog -t mp3 mp3sys - v02 by Rabbi } if ($did == 19) { .enable #mp3random } if ($did == 20) { .disable #mp3random } if ($did == 24) { set %mp3dir $sdir(search mp3) var %x 1,%y while ($findfile(%mp3dir,*.mp3,%x)) { %y = $ifmatch did -a mp3 2 $nopath(%y) write favmp3.txt %y inc %x } did -o mp3 6 1 playlist( $+ $did($dname,2).lines $+ ) } if ($did == 11) { vol -v $calc($vol(master) + 2000) } if ($did == 12) { vol -v $calc($vol(master) - 2000) } if ($did == 8) { splay pause set %mp3data $did($dname,9).text did -o mp3 9 1 pause dialog -t mp3 mp3sys - v02 by Rabbi } if ($did == 14) { splay resume did -o mp3 9 1 %mp3data dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) } if ($did == 25) { vol -wu2 } if ($did == 17) { vol -wu1 } if ($did == 26) { var %x 1 while ($did($dname,2).lines > %x) { did -r $dname 2 %x inc %x } .remove favmp3.txt did -o $dname 6 1 playlist( $+ $did($dname,2).lines $+ ) } if ($did == 15) { did -c $dname 2 $calc($did($dname,2).sel + 1) splay $read(favmp3.txt,w,$+(*,$did($dname,2).seltext,*)) did -o mp3 9 1 $did(mp3,2).seltext did -o mp3 28 1 $duration($calc($sound($insong.fname).length / 1000)) dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) set %mp3data $did(mp3,2).seltext mp3time showinfo } if ($did == 16) { did -c $dname 2 $calc($did($dname,2).sel - 1) splay $read(favmp3.txt,w,$+(*,$did($dname,2).seltext,*)) did -o mp3 9 1 $did(mp3,2).seltext did -o mp3 28 1 $duration($calc($sound($insong.fname).length / 1000)) dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) set %mp3data $did(mp3,2).seltext mp3time showinfo } if ($did == 31) { set %showinfo yes } if ($did == 32) { set %showinfo no } } alias mp3 { dialog -md mp3 mp3 echo 14 -a **** welcome to $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) by Rabbi enjoy! :) } alias mp3time { .timermp3 off .timermp3 0 1 if ($dialog(mp3)) && ($insong) { did -o mp3 29 1 $!duration($calc($insong.pos / 1000)) } } alias showinfo { if (%showinfo == yes) { if (!$sound($insong.fname).artist) && ($active ischan) { msg $active $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$did(mp3,9).text,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),unknown,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$replace($remove($did(mp3,28).text,$chr(32)),mins,m,secs,s),$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) } if ($sound($insong.fname).artist) && ($active ischan) { msg $active $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$did(mp3,9).text,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$sound($insong.fname).artist,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$replace($remove($did(mp3,28).text,$chr(32)),mins,m,secs,s),$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) } } if (%showinfo == no) { if (!$sound($insong.fname).artist) { echo -a $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$did(mp3,9).text,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),unknown,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$replace($remove($did(mp3,28).text,$chr(32)),mins,m,secs,s),$chr(31),$chr(58),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) } if ($sound($insong.fname).artist) { echo -a $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$did(mp3,9).text,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$sound($insong.fname).artist,$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)) $+($chr(31),$chr(2),$chr(58),$chr(2),$chr(31),$replace($remove($did(mp3,28).text,$chr(32)),mins,m,secs,s),$chr(2),$chr(31),$chr(58),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) } } } on *:dialog:mp3:dclick:2: { splay $read(favmp3.txt,w,$+(*,$did($dname,2).seltext,*)) splay $read(favmp3.txt,w,$+(*,$did($dname,2).seltext,*)) did -o mp3 9 1 $did(mp3,2).seltext did -o mp3 28 1 $duration($calc($sound($insong.fname).length / 1000)) dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) set %mp3data $did(mp3,2).seltext mp3time showinfo } on *:exit: { unset %mp3data } on *:load: { if (mp3.mrc isin $script) { echo 14 -a **** loaded $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) by Rabbi enjoy! :) } } on *:unload: { if (mp3.mrc isin $script) { echo 14 -a **** unloaded $replace($+($chr(2),$chr(31),$chr(91),$chr(31),$chr(2),mp3sys,$chr(31),$chr(2),$chr(93),$chr(2),$chr(31)),mp3,$+(mp,$chr(179))) cya next time! } } #mp3random on on *:mp3end: { did -c mp3 2 $rand(1,$lines(favmp3.txt)) splay $+(",$read(favmp3.txt,w,$+(*,$did(mp3,2).seltext,*)),") did -o mp3 9 1 $did(mp3,2).seltext did -o mp3 28 1 $duration($calc($sound($insong.fname).length / 1000)) dialog -t mp3 $sound($insong.fname).artist - $sound($insong.fname).title - $duration($calc($sound($insong.fname).length / 1000)) mp3time } #mp3random end