Bot MP3 script

By Darkkeeper on Dec 22, 2007

Well i found this script here on hawkee and didnt like the look of it, i edited and added alot. I've made it show a list and made it where you can show just one song in a list. Just load it into remotes on your bot, type /mp3 to set your directory then set yourself as the owner of the bot by typing /auser 5 (your nick/address).

alias mp3 {
  set %mp3dir $$sdir=" Set Mp3 Directory: "
  write -c mp3.txt
  noop $findfile(%mp3dir,*.mp3,0,write mp3.txt $1-)
}

on 5:text:*:*:{
  if ($isfile(mp3.txt)) {
    var %target = $iif($target ischan,$chan,$nick)
    if ($1 == `random) { splay $read(mp3.txt) | msg %target 4<14<15||14>4>15 Random Play:14 $remove($nopath($insong.fname)$1-,.mp3) 4<14<15||14>4>15 }
    if ($1 == `play) { splay $read(mp3.txt,$2) | msg %target 4<14<15||14>4>15 Now playing:14 $remove($nopath($read(mp3.txt,$2))$1-,.mp3) 4<14<15||14>4>15 }
    if ($1 == `stop) { 
      if ($insong) { splay stop | msg %target 4<14<15||14>4>15 Song Stopped 4<14<15||14>4>15 }
      else { msg %target Song not started }
    }
    if ($1 == `pause) { 
      if ($insong) && (!$insong.pause) { splay pause | msg %target 4<14<15||14>4>15 Pausing song 4<14<15||14>4>15 }
    }
    if ($1 == `resume) { 
      if ($insong) && ($insong.pause) { splay resume | msg %target 4<14<15||14>4>15 Resuming song 4<14<15||14>4>15 }
    }
    if ($1 == `List) {
      Msg $Nick 4<14<15||14>4>15 Mp3 List 4<14<15||14>4>15
      set %list 1
      :list
      if ($read(mp3.txt,%List) == $null) { goto listend }
      if ($read(mp3.txt,%List) != $null) { Msg $nick 4<14<15||14>4>15 %list 14||15 $remove($nopath($read(mp3.txt,%list))$1-,.mp3) 4<14<15||14>4>15 }
      else { Msg $nick 4<14<15||14>4>15 %list 14||15 $remove($nopath($read(mp3.txt,%list))$1-,.mp3) 4<14<15||14>4>15 }
      inc %list
      goto list
      :listend
    }
    if ($1 == `Show) {
      if ($read(mp3.txt,$2) == $null) { Msg # 4<14<15||14>4>15 The is no song $2 4<14<15||14>4>15 }
      if ($read(mp3.txt,$2) != $null) { Msg %target 4<14<15||14>4>15 Song $2 14||15 $remove($nopath($read(mp3.txt,$2))$1-,.mp3) 4<14<15||14>4>15 }     
    }
  }
}

Comments

Sign in to comment.
a careful warchild   -  Jun 17, 2008

very good? pfft for one you should of made it write to .ini\'s and the second it doesn\'t play unless you get the song name exactly word for word, and you have some unessesary coding >.>

 Respond  
SnoooP   -  May 16, 2008

good luck with that.. and if your in need of some help.. feel free to ask !

 Respond  
Fuzion   -  May 16, 2008

Im thinking of trying to start one of my own soon :)

 Respond  
SnoooP   -  May 16, 2008

its very good ;)

 Respond  
Fuzion   -  May 16, 2008

very nice and im lazy at the moment i love this script nice work fixing it up from someone esle

 Respond  
Marshtomp   -  Dec 28, 2007

Shouldn\'t.. You give credit to the one you took it from?

 Respond  
guest598594   -  Dec 22, 2007

/help /else
/help if then else The ! not prefix

 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.