Evolution Mp3
Platform: mIRC
Published Apr 04, 2008
Updated Apr 07, 2008
Ver 3 of my mp3. I had to readd this cause Hawkee deleted it -_- this is a 100% remake of my mp3, really nothing similar in design or function. If you need help just leave me a msg here.
on *:Load: {
Set %play 1
Set %Spam 4
Set %option 17
}
menu menubar,channel,status {
«{Evolution Mp3}»: dialog -dm EMp3 EMp3
}
dialog EMp3 {
title "«{Evolution Mp3}»"
size -1 -1 150 117
option dbu
menu "Settings", 1
item "Set Play Type", 2, 1
item "Set Spam Channels", 3, 1
item "Set Spam Type", 4, 1
menu "Directory", 5
item "Set Directory", 6, 5
item "Update Directory", 7, 5
menu "PlayList", 8
item "Edit PlayList", 9, 8
item "Clear PlayList", 10, 8
item "Update Mp3List", 31, 8
box "Mp3 Info", 11, 2 1 146 28
Text "Mp3 Playing:", 12, 28 8 60 8
edit "Nothing is playing", 13, 5 16 90 10, flat
Text "Time Remaining:", 14, 105 8 44 8
edit "00:00", 15, 113 16 21 10, flat
box "Play Options", 16, 80 30 65 85
radio "", 17, 84 39 9 10
radio "", 18, 84 49 9 10
radio "", 19, 84 59 9 10
radio "", 20, 84 69 9 10
Text "Normal", 21, 94 39 30 8
Text "Repeat", 22, 94 49 30 8
Text "Continuous", 23, 94 59 30 8
Text "Random", 24, 94 69 30 8
button "Play", 25, 84 85 25 10, flat
button "Stop", 26, 115 85 25 10, flat
button "Pause", 27, 84 100 25 10, flat
button "Resume", 28, 115 100 25 10, flat
box "Mp3 List", 29, 2 30 76 85
list 30, 3 38 74 80, sort
}
on *:DIALOG:EMp3:init:0: {
did -c Emp3 %option
if (%play == 1) {
var %num $findfile(%dir, *.mp3,0,did -a Emp3 30 $nopath($1-))
}
if (%play == 2) {
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a Emp3 30 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
}
}
on *:dialog:Emp3:menu:*:{
if $did = 2 {
dialog -dm Play Play
}
if $did = 3 {
dialog -dm SC SC
}
if $did = 4 {
dialog -dm Spam Spam
}
if $did = 6 {
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 Emp3 30 $nopath($1-))
}
if $did = 7 {
did -r Emp3 30
write -c mp3.txt
noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
var %num $findfile(%dir, *.mp3,0,did -a Emp3 30 $nopath($1-))
}
if $did = 9 {
dialog -dm Plist PList
}
if $did = 10 {
write -c PlayList.txt
}
if $did = 31 {
did -r Emp3 30
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a Emp3 30 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
}
}
on *:dialog:Emp3:sclick:*:{
if $did = 25 {
if (%play == 1) {
var %Playing $Remove($did(Emp3,30).seltext,.mp3)
set %song $findfile(%dir,$did(Emp3,30).seltext,1)
set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
set %songfind $read(mp3.txt, w, * $+ %song $+ *)
set %num $Readn
splay %song
did -ra Emp3 13 %playing
.timermp3 0 0 Remaining
spam
}
if (%play == 2) {
var %Playing $Remove($did(Emp3,30).seltext,.mp3)
set %song $findfile(%dir,$did(Emp3,30).seltext,1)
set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
set %songfind $read(playlist.txt, w, * $+ $did(Emp3,30).seltext $+ *)
set %num $Readn
splay %song
did -ra Emp3 13 %playing
.timermp3 0 0 Remaining
spam
}
}
if $did = 26 {
splay Stop
.timermp3 off
did -ra Emp3 13 Nothing is playing
did -ra Emp3 15 00:00
}
if $did = 27 {
splay pause
}
if $did = 28 {
splay resume
}
if ($did(17).state) { set %option 17 }
if ($did(18).state) { set %option 18 }
if ($did(19).state) { set %option 19 }
if ($did(20).state) { set %option 20 }
}
alias Remaining {
did -ra Emp3 15 $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),nn:ss),none)
}
on *:dialog:Emp3:close:* {
.timermp3 off
splay stop
}
on *:mp3end:{
if (%option == 20) {
if (%Play == 1) {
splay $read(mp3.txt)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if (%Play == 2) {
splay $findfile(%dir,$read(PlayList.txt),1)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
}
if (%option == 18) {
splay %Song
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
Remaining
}
if (%option == 19) {
if (%play == 1) {
inc %num
if ($read(mp3.txt,%num) == $null) { halt }
splay $read(mp3.txt,%num)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
if (%play == 2) {
inc %num
if ($read(PlayList.txt,%num) == $null) { halt }
splay $findfile(%dir,$read(PlayList.txt,%num),1)
var %length $gmt($round($calc($mp3($insong.fname).length / 1000),0),nn:ss)
did -ra Emp3 13 $remove($nopath($insong.fname)$1-,.mp3)
.timermp3 0 0 Remaining
spam
}
}
}
==========Spam Channel Editor=====================
dialog SC {
title "Channels"
size -1 -1 80 90
option dbu
box "Channels", 1, 2 2 76 60
list 2, 3 10 74 52, sort
edit "", 3, 2 65 76 10
button "Add", 4, 10 78 25 10, flat
button "Del", 5, 43 78 25 10, flat
}
on *:DIALOG:SC:init:0: {
var %SC 1
while (%SC <= $lines(chans.txt)) { did -a SC 2 $read(chans.txt,%SC) | inc %SC }
}
on *:dialog:SC:sclick:*:{
if $did = 4 {
var %chan = $did(SC,3) | if (%chan == $null) return | if ($left(%chan,1) != $chr(35)) %chan = $chr(35) $+ %chan
did -a SC 2 $iif(%key,%key,%chan) | write -a Chans.txt %chan | did -r SC 3
}
if $did = 5 {
if ($did(2).sel == $null) return | var %line = $did(2).sel, %text = $did(2,%line) | did -d SC 2 $did(2).sel | write -ds $+ %text chans.txt
}
}
==========Spam Control=====================
dialog Spam {
title "Spam"
size -1 -1 80 42
option dbu
radio "", 1, 2 2 9 10
radio "", 2, 2 12 9 10
radio "", 3, 2 22 9 10
radio "", 4, 2 32 9 10
Text "Some Channels", 5, 12 2 40 8
Text "Amsg", 6, 12 12 30 8
Text "Active", 7, 12 22 30 8
Text "Off", 8, 12 32 30 8
}
on *:DIALOG:Spam:init:0: {
did -c Spam %Spam
}
on *:dialog:Spam:sclick:*:{
if ($did(1).state) { set %Spam 1 }
if ($did(2).state) { set %Spam 2 }
if ($did(3).state) { set %Spam 3 }
if ($did(4).state) { set %Spam 4 }
}
alias spam {
if (%spam == 1) {
var %chan 1
while (%chan <= $lines(chans.txt)) { msg $read(chans.txt,%chan) 12«14{15Mp314:15 $Replace($remove($nopath($insong.fname)$1-,.mp3),-,12-15) $+ 14}12» «14{15Length14:15 $Replace(%Length,:,12:15) $+ 14}12» | inc %chan }
}
if (%spam == 2) {
amsg 12«14{15Mp314:15 $Replace($remove($nopath($insong.fname)$1-,.mp3),-,12-15) $+ 14}12» «14{15Length14:15 $Replace(%Length,:,12:15) $+ 14}12»
}
if (%spam == 3) {
msg $active 12«14{15Mp314:15 $Replace($remove($nopath($insong.fname)$1-,.mp3),-,12-15) $+ 14}12» «14{15Length14:15 $Replace(%Length,:,12:15) $+ 14}12» }
if (%spam == 4) {
Halt
}
}
==========Play Control=====================
dialog Play {
title "Control"
size -1 -1 80 22
option dbu
radio "", 1, 2 2 9 10
radio "", 2, 2 12 9 10
Text "Directory", 3, 12 2 40 8
Text "PlayList", 4, 12 12 30 8
}
on *:DIALOG:Play:init:0: {
did -c Play %play
}
on *:dialog:Play:sclick:*:{
if ($did(1).state) {
set %play 1
did -r Emp3 30
var %num $findfile(%dir, *.mp3,0,did -a Emp3 30 $nopath($1-)) }
if ($did(2).state) {
set %play 2
did -r Emp3 30
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a Emp3 30 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
}
}
==========PlayList=====================
dialog PList {
title "PlayList"
size -1 -1 180 90
option dbu
box "Directory", 1, 2 2 76 85
list 2, 3 10 74 80, sort
box "PlayList", 3, 102 2 76 85
list 4, 103 10 74 80, sort
button ">>", 5, 80 30 20 10, flat
button "<<", 6, 80 45 20 10, flat
}
on *:DIALOG:PList:init:0: {
var %PL 1
while (%PL <= $lines(PlayList.txt)) { did -a PList 4 $Nopath($read(PlayList.txt,%PL)) | inc %PL }
var %Direct 1
while (%Direct <= $lines(Mp3.txt)) { did -a PList 2 $Nopath($read(Mp3.txt,%Direct)) | inc %Direct }
}
on *:dialog:PList:sclick:*:{
if $did = 5 {
var %line = $did(2).sel, %text = $did(2,%line)
if ($read(playlist.txt, w, * $+ %Text $+ *) != $null) { Halt }
did -a PList 4 %text | write -a PlayList.txt %text
}
if $did = 6 {
if ($did(4).sel == $null) return | var %line = $did(4).sel | set %text $did(4,%line) | did -d PList 4 $did(4).sel | write -dw $+ " $+ %text $+ " PlayList.txt
}
}