Eternal Darkness Mp3 V 2.0

By Darkkeeper on Feb 16, 2008

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
    }
  }
}

Comments

Sign in to comment.
TropicalMeltdown   -  Aug 22, 2008

yeah i like dis good work 10/10

 Respond  
Darkkeeper   -  Feb 23, 2008

lol i\'ll work on that, but i\'ve found that not all mp3\'s will show it like that, some dont have it organized like that so i made it read the mp3 name

 Respond  
Eugenio   -  Feb 23, 2008

i dont have a clue what to do with these variables lol i tried this \"set %artist $findfile (%dir,$did(edmp3,4\" no luck lol haha so how do i make it find the artist like %song finds the song and %length finds the length ?!?!?!?!?!?!

 Respond  
Darkkeeper   -  Feb 23, 2008

i\'ll make ver 3 alot better lol

 Respond  
guest598594   -  Feb 23, 2008

you can\'t just add random variables :|

 Respond  
Darkkeeper   -  Feb 23, 2008

lol im gonna work on ver 3 soon, to have a playlist and were you can change the spam color through the dialog itself :)

 Respond  
Eugenio   -  Feb 23, 2008

ok i added %artist i just dont have a clue how to make it find the artist of the song ! someone plz tell me ........i want it like the length ......in the variables i typed in %artist and the Linkin Park and then every song that it played had the artist Linkin Park LOLOLOL

 Respond  
Eugenio   -  Feb 23, 2008

LOL just tell me how to include the artist! do i just add %artist or $artist ?!?

 Respond  
EL   -  Feb 23, 2008

oh my days

I should smite you......

 Respond  
Eugenio   -  Feb 23, 2008

oh my days ........i cant really be bovered lol .....and do you know how to add the artist in the spam aswell ?!?

 Respond  
guest598594   -  Feb 23, 2008

i guess

 Respond  
Eugenio   -  Feb 23, 2008

yer thanks moutaindew ....i found that bit but there is like 5 alias spams lol so do i have to change all of them ?!?

 Respond  
guest598594   -  Feb 23, 2008

Eugenio, look for \"alias spam {\"

 Respond  
Eugenio   -  Feb 23, 2008

sorry about this third post but can anyone tell me how (where to find the bit that says MP3:\"song name here\") i can change the colour when it spams and i want to add $artist aswell coz just the song name is useless sometimes ...thanks

 Respond  
Eugenio   -  Feb 23, 2008

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.

 Respond  
guest598594   -  Feb 23, 2008

1) your labels are touching your list boxes
2) you should disable some buttons when impossible to use (ex. skip when no song is playing)
3) you should disable ur edit boxes

 Respond  
Eugenio   -  Feb 23, 2008

absolutely amazin! i love it! 10/10 from me! you dont beat this ! so bloody usefull! thanks mate. i wuld say more but i am too busy listening to music lol thanks again ! great script!

 Respond  
Darkkeeper   -  Feb 17, 2008

ok, fixxed, i had used Var on %length instead of using set, which killed off %length b4 it got to the spam xD

 Respond  
LucSatise   -  Feb 17, 2008

k nvm i dnt get how to fix it in ur format.

 Respond  
LucSatise   -  Feb 17, 2008

also: When it posted in the channel it wasn\'t displaying length. but in window it was counting down. i fixed this on mine but u might wanna fix it here

 Respond  
LucSatise   -  Feb 17, 2008

still no playlist option?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.