This is version 2 of my mp3 player, i added in spam options, random play and continuous play. The Continuous play will start off at the first mp3 in your list. just load the script into a new remotes page, set your directory and select a spam option under Options. Report bugs, script errors or flawls to me please, and i will keep editing this one once i think of new things.
menu menubar,channel,status {
Eternal Darkness Mp3: dialog -dm EDMp3 EDMp3 | var %num $findfile(%dir, *.mp3,0,did -a edmp3 4 $nopath($1-)) |
}
dialog EDMp3 {
title "Eternal Darkness Mp3"
size -1 -1 200 150
option dbu
tab "General" , 1, 0 0 200 149
tab "Other" , 2, 0 0 200 149
box "Mp3 List", 3, 2 16 76 133, Tab 1
list 4, 3 23 74 125, sort, Tab 1
;Tab 1
box "Mp3 Player Info", 5, 80 16 119 51, Tab 1
Text "Mp3 Playing:", 6, 83 22 60 8, Tab 1
edit "Nothing is playing", 7, 82 30 70 10, flat, Tab 1
Text "Time Remaining:", 8, 155 22 44 8, Tab 1
edit "00:00", 9, 165 30 21 10, flat, Tab 1
Text "----Other----", 10, 122 41 40 8, Tab 1
Text "Continuous Play:", 11, 83 50 44 8, Tab 1
Text "Off", 12, 125 50 8 8, Tab 1
Text "Random Play:", 13, 83 58 44 8, Tab 1
Text "Off", 14, 118 58 8 8, Tab 1
Text "----Mp3 Commands----", 15, 110 69 70 8, Tab 1
button "Play", 16, 83 79 25 10, flat, Tab 1
button "Stop", 17, 112 79 25 10, flat, Tab 1
button "Pause", 18, 141 79 25 10, flat, Tab 1
button "Resume", 19, 170 79 25 10, flat, Tab 1
Text "----Continous Play----", 20, 110 91 70 8, Tab 1
button "On", 21, 90 99 25 10, flat, Tab 1
button "Off", 22, 125 99 25 10, flat, Tab 1
button "Skip", 23, 158 99 25 10, flat, Tab 1
Text "----Random Play----", 24, 110 111 70 8, Tab 1
button "On", 25, 90 119 25 10, flat, Tab 1
button "Off", 26, 125 119 25 10, flat, Tab 1
button "Skip", 27, 158 119 25 10, flat, Tab 1
Text "----Directory Settings----", 28, 110 130 70 8, Tab 1
button "Set", 29, 105 138 25 10, flat, Tab 1
button "Update", 30, 142 138 25 10, flat, Tab 1
;Tab 2
box "Spam To Channels", 31, 2 16 76 82, Tab 2
list 32, 3 23 74 78, sort, Tab 2
box "Spam Options", 33, 80 16 90 51, Tab 2
radio "", 34, 85 22 9 10, Tab 2
Text "Some Channels", 35, 94 23 70 8, Tab 2
radio "", 36, 85 33 9 10, Tab 2
Text "Amsg", 37, 94 34 70 8, Tab 2
radio "", 38, 85 44 9 10, Tab 2
Text "Active", 39, 94 45 70 8, Tab 2
radio "", 40, 85 55 9 10, Tab 2
Text "Off", 41, 94 56 70 8, Tab 2
box "Spam To Channels Options", 42, 2 100 76 47, Tab 2
edit "", 43, 7 110 65 10, Tab 2
button "Add", 44, 10 130 25 10, flat, Tab 2
button "Del", 45, 43 130 25 10, flat, Tab 2
box "Creator", 46, 100 85 76 47, Tab 2
Text "Created By Abarai/Renji irc.scrollrack.com #SubZer0", 47, 108 100 70 40, Tab 2
}
on *:dialog:edmp3:sclick:*:{
if $did = 16 {
if (%rplay == off) && (%cplay == off) {
var %Playing $Remove($did(edmp3,4).seltext,.mp3)
var %song $findfile(%dir,$did(edmp3,4).seltext,1)
set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
splay %song
did -ra edmp3 7 %playing
.timermp3 0 0 Remaining
spam
}
}
if $did = 17 {
splay Stop
msg $active 4{14- Mp3 Stopped 14-4}
.timermp3 off
did -ra edmp3 7 Nothing is playing
did -ra edmp3 9 00:00
set %rplay off
set %cplay off
}
if $did = 18 {
splay pause
msg $active 4{14- Mp3 Paused 14-4}
}
if $did = 19 {
splay resume
msg $active 4{14- Resuming Mp3 14-4}
}
if $did = 21 {
splay stop
did -ra edmp3 14 On
did -ra edmp3 12 Off
set %cplay on
set %rplay off
Echo $active 4{14- Continuous Play Enabled 14-4}
set %songnum 1
splay $read(mp3.txt,%songnum)
set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra edmp3 7 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if $did = 22 {
splay stop
did -ra edmp3 12 Off
splay stop
set %cplay off
Echo $active 4{14- Continuous Play Disabled 14-4}
.timermp3 off
did -ra edmp3 7 Nothing is playing
did -ra edmp3 9 00:00
}
if $did = 23 {
if (%cplay == off) { Halt }
splay stop
Echo $active 4{14- Song Skipped 14-4}
inc %songnum
splay $read(mp3.txt,%songnum)
set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra edmp3 7 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if $did = 25 {
splay stop
did -ra edmp3 14 On
did -ra edmp3 12 Off
set %cplay off
set %rplay on
Echo $active 4{14- Random Play Enabled 14-4}
splay $read(mp3.txt)
set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra edmp3 7 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if $did = 26 {
splay stop
did -ra edmp3 14 Off
splay stop
set %rplay off
Echo $active 4{14- Random Play Disabled 14-4}
.timermp3 off
did -ra edmp3 7 Nothing is playing
did -ra edmp3 9 00:00
}
if $did = 27 {
if (%rplay == off) { Halt }
splay stop
Echo $active 4{14- Song Skipped 14-4}
splay $read(mp3.txt)
set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra edmp3 7 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if $did = 29 {
set %dir $sdir="Mp3 Directory"
write -c mp3.txt
noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
var %num $findfile(%dir, *.mp3,0,did -a edmp3 4 $nopath($1-))
}
if $did = 30 {
did -r edmp3 4
write -c mp3.txt
noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
var %num $findfile(%dir, *.mp3,0,did -a edmp3 4 $nopath($1-))
Echo $active 4{14- Mp3 List Updated! 14-4}
}
if $did = 44 {
var %chan = $did(edmp3,43) | if (%chan == $null) return | if ($left(%chan,1) != $chr(35)) %chan = $chr(35) $+ %chan
did -a edmp3 32 $iif(%key,%key,%chan) | write -a Chans.txt %chan | did -r edmp3 43
}
if $did = 45 {
if ($did(32).sel == $null) return | var %line = $did(32).sel, %text = $did(32,%line) | did -d edmp3 32 $did(32).sel | write -ds $+ %text chans.txt
}
if ($did(34).state) { set %spam 34 }
if ($did(36).state) { set %spam 36 }
if ($did(38).state) { set %spam 38 }
if ($did(40).state) { set %spam 40 }
}
on *:DIALOG:edmp3:init:0: {
var %chan = 1
while (%chan <= $lines(chans.txt)) { did -a edmp3 32 $read(chans.txt,%chan) | inc %chan }
did -c edmp3 %spam
}
alias Remaining {
did -ra edmp3 9 $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),nn:ss),none)
}
on *:dialog:edmp3:close:* {
.timermp3 off
set %rplay off
set %cplay off
splay stop
}
on *:mp3end:{
if (%rplay == on) {
splay $read(mp3.txt)
set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra edmp3 7 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if (%cplay == on) {
inc %songnum
splay $read(mp3.txt,%songnum)
set %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra edmp3 7 $remove($nopath($insong.fname)$1-,.mp3)
spam
}
}
alias spam {
if (%cplay == off) && (%rplay == off) {
if (%spam == 34) {
var %chan 1
while (%chan <= $lines(chans.txt)) { msg $read(chans.txt,%chan) 4{14- Mp3:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4} | inc %chan }
}
if (%spam == 36) {
amsg 4{14- Mp3:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4}
}
if (%spam == 38) {
msg $active 4{14- Mp3:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4}
}
if (%spam == 40) {
Halt
}
}
if (%cplay == on) {
if (%spam == 34) {
var %chan 1
while (%chan <= $lines(chans.txt)) { msg $read(chans.txt,%chan) 4{14- Continuous Play:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4} | inc %chan }
}
if (%spam == 36) {
amsg 4{14- Continuous Play:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4}
}
if (%spam == 38) {
msg $active 4{14- Continuous Play:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4}
}
if (%spam == 40) {
Halt
}
}
if (%rplay == on) {
if (%spam == 34) {
var %chan 1
while (%chan <= $lines(chans.txt)) { msg $read(chans.txt,%chan) 4{14- Random Play:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4} | inc %chan }
}
if (%spam == 36) {
amsg 4{14- Random Play:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4}
}
if (%spam == 38) {
msg $active 4{14- Random Play:4 $remove($nopath($insong.fname)$1-,.mp3) 14-4}{14- 4L14ength:4 %Length 14-4}
}
if (%spam == 40) {
Halt
}
}
}
actually 9/10 because i dont really like the colour when it spams and i cant find where to chnage it and i liked the other MP3 script i had because i could change the tags for the songs.......because unless the name of the artist is in the name of the song ppl dont know who the artist is when it spams! other than that great ! thanks again.