Elite Script v3.0 — File Browser

EliteScriptv3.0 / EliteScriptv3.0 / download / music.mrc

music.mrc — 14.41 KB — Download this file

on 1:LOAD:{
  if ($version < 5.4) {
    echo 4 -a * Sorry, but this script wont work with version 12' $+ $version $+ '04 You need version 5.4,
    echo 4 -a * You can get version 5.4 at 12www.mircx.com
    unload -rs music.mrc
    halt 
  }
  else {
    setfile
    window @Thanks 25 25 665 350
    titlebar @Thanks For usein' music addon v 1.4
    aline @Thanks Music addon v 1.4
    aline @Thanks 4What's New??
    aline @Thanks 021.) I fixed some erros. 
    aline @Thanks 02 $+ $chr(32) $+ $chr(32) $+ a.) Midi Random play bot 
    aline @Thanks 02 $+ $chr(32) $+ $chr(32) $+ b.) Some !finer errors
    aline @Thanks 02 $+ $chr(32) $+ $chr(32) $+ c.) The wave player.
    aline @Thanks 022.) I improved the !finder.
    aline @Thanks 02 $+ $chr(32) $+ $chr(32) $+ a.) Protection on !find floods
    aline @Thanks 02 $+ $chr(32) $+ $chr(32) $+ b.) You can turn it off.
    aline @Thanks 02 $+ $chr(32) $+ $chr(32) $+ c.) Find files faster.
    aline @Thanks 023.) You can have more folders for mp3s,Wavs,Midis.
    aline @Thanks 024.) I have a better auto get.
    aline @Thanks 025.) You can make it so when you play a sound it wont msg the channels.
    aline @Thanks -
    aline @Thanks 4What might be on the next version.
    aline @Thanks 021.) I might make it say the Length (seconds, minutes), But dont get your hopes up.  If i do add it, it might not be for all sounds, mabie just mp3's, or just waves.
    aline @Thanks 022.) I might have acouple new fetures on the windows.  Mabie popups.
    aline @Thanks 023.) I might change popups allitle, make some for status and menu bar.
    aline @Thanks -
    aline @Thanks 4Comments...
    aline @Thanks 02For all of you that liked my old version
    aline @Thanks 02Will really like this version better.
    aline @Thanks 02Sorry midi fans about the last version with the random play bot.
    aline @Thanks 02If you have any Questions, or Comments, email me @
    aline @Thanks 12sf49ers@Acronet.net
    aline @Thanks 02I will emial you the answer back, and will put it up in the next version.
    aline @Thanks 02BYE!! And have a nice day...
    aline @Thanks -
    aline @Thanks by; virus[x]
    aline @Thanks --Part of the HelpDesk scripting team. '98
  }
}
on 1:CLOSE:@:{
  if ($target == @Wave-Player) { unset %wave.l.* }
  if ($target == @Midi-Player) { unset %midi.l.* }
  if ($target == @Mp3-Player) { unset %mp3.l.* }
}
ctcp 1:MP3*:*:if ($findfile($mp3dir,$2-,0) == 1) { run $mp3dir " $+ $findfile($mp3dir,$2-,1) $+ " }
#Randomwave off
on 1:WAVEEND:{
  if (%wave.say == yes) { rwav %wav.chan }
  else { rwav no }
}
#Randomwave end
#Randommidi off
on 1:MIDIEND:{
  if (%midi.say == yes) { rmid %mid.chan }
  else { rmid no }
}
#Randommidi end
#autoget off
ctcp 1:MP3*:*:if ($exists( $mp3dir $+ $2- ) == $false) { ctcp $nick get $2- [AuTo GeT] }
on 1:NOSOUND:msg $comchan($nick,1) ! $+ $nick $filename [AuTo GeT]
#autoget end
#finder off
on 1:TEXT:*:#:{
  if ($1 == @Locator) { goto find }
  if ($1 == @Find) { goto find }
  if ($1 == !find) { goto find }
  if ($1 == `find) { goto find }
  else { halt }
  :find
  inc %find. [ $+ [ $nick ] ]
  .timer 1 60 unset %find. [ $+ [ $nick ] ]
  if (%find. [ $+ [ $nick ] ] >= 2) { notice -m $nick Please only use !find,@Find,`find, and @locator only one time every minute. (1 min ignore.) | ignore $nick 2 | unset %find. [ $+ [ $nick ] ] | halt }
  if ($2 == $null) { notice -m $nick You need to enter a 12.wav or 4.mp3 or a 12.mid to find. | halt }
  if (($2 == *.mp3) || ($2 == *.mid) || ($2 == *.wav)) { notice  $nick I will flood you useing only 12.wav or 4.mp3 or 12.mid | halt }
  if (.mp3 isin $2-) { goto mp3 }
  if (.wav isin $2-) { goto wav }
  if (.mid isin $2-) { goto mid }
  else { notice -m $nick You need to add a 12.wav or 4.mp3 or a 12.mid. (e.i. !find *metallic*.mp3) | halt }
  :mp3
  if ($findfile($mp3dir,$2-,0) == 0) { notice -m $nick Sorry I dont have any files with '4 $+ $2- $+ ' in them. | halt } 
  if ($findfile($mp3dir,$2-,0) > 5) { notice -m $nick I have04 $findfile($mp3dir,$2-,0) files with '4 $+ $2- $+ ' in them, but I will list the first 125 | goto mp3n }
  else { notice -m $nick I have04 $findfile($mp3dir,$2-,0) file(s) with '4 $+ $2- $+ ' in them. | goto mp3n }
  :mp3n 
  inc %find.n
  if (%find.n > 5) { goto end }
  if (%find.n > $findfile($mp3dir,$2-,0)) { goto end }
  else { notice -m $nick 04 $+ %find.n $+ :12 $nopath($findfile($mp3dir,$2-,%find.n)) | goto mp3n }
  :wav
  if ($findfile($wavdir,$2-,0) == 0) { notice -m $nick Sorry I dont have any files with '4 $+ $2- $+ ' in them. | halt } 
  if ($findfile($wavdir,$2-,0) > 5) { notice -m $nick I have04 $findfile($wavdir,$2-,0) files with '4 $+ $2- $+ ' in them, but I will list the first 125 | goto mp3n }
  else { notice -m $nick I have04 $findfile($wavdir,$2-,0) file(s) with '4 $+ $2- $+ ' in them. }
  :wavn
  inc %find.n
  if (%find.n > 5) { goto end }
  if (%find.n > $findfile($wavdir,$2-,0)) { goto end }
  else { notice -m $nick 04 $+ %find.n $+ :12 $nopath($findfile($wavdir,$2-,%find.n)) | goto wavn }
  :mid
  if ($findfile($middir,$2-,0) == 0) { notice -m $nick Sorry I dont have any files with '4 $+ $2- $+ ' in them. | halt } 
  if ($findfile($middir,$2-,0) > 5) { notice -m $nick I have04 $findfile($middir,$2-,0) files with '4 $+ $2- $+ ' in them, but I will list the first 125 | goto mp3n }
  else { notice -m $nick I have04 $findfile($middir,$2-,0) file(s) with '4 $+ $2- $+ ' in them. }
  :midn
  inc %find.n
  if (%find.n > 5) { goto end }
  if (%find.n > $findfile($middir,$2-,0)) { goto end }
  else { notice -m $nick 04 $+ %find.n $+ :12 $nopath($findfile($middir,$2-,%find.n)) | goto midn }
  :end
  unset %find.n
  notice -m $nick To get one of these files type 12! $+ $me 04<Filename>
}
#Finder end
menu Nicklist {
  Music
  .Get A File:{
    set %get $$?="What file?"
    if (.wav isin %get) { 
      say ! $+ $1 %get [Wave Grab]
      halt
    }
    if (.mid isin %get) {
      say ! $+ $1 %get [Midi Grab]
      halt
    }
    if (.txt isin %get) { 
      say ! $+ $1 %get [Text Grab]
      halt 
    }
    if (.mp3 isin %get) {
      say ! $+ $1 %get [Mp3 Grab]
      halt
    }
    else {
      say ! $+ $1 %get [ $+ $gettok(%get,2,46) Grab]
      halt
    }
  }
  .Auto Get 
  ..On:.enable #Autoget | say [Status:AutoGet][Curently:ON]
  ..Off:.disable #Autoget | say [Status:AutoGet][Curently:OFF]
  .-
  .Play a Wave:waveplay
  .Play a Midi:midiplay
  .Play a Mp3:mp3play
  .-
  .Random pick
  ..Wave:{
    if (%wave.say == yes) { rwav # }
    else { rwav no }
  }
  ..Midi:{
    if (%midi.say == yes) { rmid # }
    else { rmid no }
  }
  ..Mp3:{
    if (%mp3.say == yes) { rmp3 # }
    else { rmp3 no }
  }
  .Random Play Bot
  ..Wave
  ...On:{
    .enable #Randomwave
    sound $rfile($wavdir,*.wav)
    if (%wave.say == yes) {
      say [Status:Random(wave)][Curently:ON]    
      set %wave.chan #
    }
  } 
  ...Off:{
    .disable #Randomwave
    splay off
    if (%wave.say == yes) {
      say [Status:Random(wave)][Curently:OFF]
      unset %wave.chan #
    }
  }
  ..Midi
  ...On:{
    .enable #Randommidi
    sound $rfile($middir,*.,mid)
    if (%midi.say == yes) {
      say [Status:Random(midi)][Curently:ON]
      set %midi.chan #
    }
  }
  ...Off:{
    .disable #Randommidi
    splay off
    if (%midi.say == yes) { 
      say [Status:Random(midi)][Curently:OFF]
      unset %midi.chan 
    }
  }
  ..Mp3
  ...On:{
    .timermp3 99999 300 rmp3 #
    if (%mp3.say == yes) {
      say [Status:Random(mp3)][Curently:ON]
      rmp3 #
    }
    else { rmp3 no }
  }
  ...Off:{
    .timermp3 off
    if (%mp3.say == yes) { say [Status:Random(mp3)][Curently:OFF] }
  }
  .Other
  ..Finer
  ...On:.enable #finder
  ...Off:.disable #finder
  ..Say when play sound
  ...Wave
  ....Yes:set %wave.say yes
  ....No:set %wave.say no
  ...Midi
  ....Yes:set %midi.say yes 
  ....No:set %midi.say no
  ...Mp3
  ....Yes:set %mp3.say yes
  ....No:set %mp3.say no
}  
menu Channel {
  Music
  .Auto Get
  ..On:.enable #Autoget | say [Status:AutoGet][Curently:ON]
  ..Off:.disable #Autoget | say [Status:AutoGet][Curently:OFF]
  .-
  .Play a Wave:waveplay
  .Play a Midi:midiplay
  .Play a Mp3:mp3play
  .-
  .Random pick
  ..Wave:{
    if (%wave.say == yes) { rwav # }
    else { rwav no }
  }
  ..Midi:{
    if (%midi.say == yes) { rmid # }
    else { rmid no }
  }
  ..Mp3:{
    if (%mp3.say == yes) { rmp3 # }
    else { rmp3 no }
  }
  .Random Play Bot
  ..Wave
  ...On:{
    .enable #Randomwave
    sound $rfile($wavdir,*.wav)
    if (%wave.say == yes) {
      say [Status:Random(wave)][Curently:ON]    
      set %wave.chan #
    }
  } 
  ...Off:{
    .disable #Randomwave
    splay off
    if (%wave.say == yes) {
      say [Status:Random(wave)][Curently:OFF]
      unset %wave.chan #
    }
  }
  ..Midi
  ...On:{
    .enable #Randommidi
    sound $rfile($middir,*.mid)
    if (%midi.say == yes) {
      say [Status:Random(midi)][Curently:ON]
      set %midi.chan #
    }
  }
  ...Off:{
    .disable #Randommidi
    splay off
    if (%midi.say == yes) { 
      say [Status:Random(midi)][Curently:OFF]
      unset %midi.chan 
    }
  }
  ..Mp3
  ...On:{
    .timermp3 99999 300 rmp3 #
    if (%mp3.say == yes) {
      say [Status:Random(mp3)][Curently:ON]
      rmp3 #
    }
    else { rmp3 no }
  }
  ...Off:{
    .timermp3 off
    if (%mp3.say == yes) { say [Status:Random(mp3)][Curently:OFF] }
  }
  .Other
  ..Finer
  ...On:.enable #finder
  ...Off:.disable #finder
  ..Say when play sound
  ...Wave
  ....Yes:set %wave.say yes
  ....No:set %wave.say no
  ...Midi
  ....Yes:set %midi.say yes 
  ....No:set %midi.say no
  ...Mp3
  ....Yes:set %mp3.say yes
  ....No:set %mp3.say no
}  
menu @midi-Player {
  dclick {
    aline @midi-Player 3*** Now playing $nopath( %midi.l. [ $+ [ $1 ] ] ) $+ ,
    aline @midi-Player 3*** That is $klof( %midi.l. [ $+ [ $1 ] ] ) $+ k.
    splay %midi.l. [ $+ [ $1 ] ] 
    if (%midi.say == yes) { amsg [Midi][Name: $+ $nopath( %midi.l. [ $+ [ $1 ] ] ) $+ ][Size: $+ $klof( %midi.l. [ $+ [ $1 ] ] ) $+ k]  }
  }  
}
menu @Mp3-Player { 
  dclick {
    aline @mp3-Player 3*** Now playing $nopath( %mp3.l. [ $+ [ $1 ] ] ) $+ ,
    aline @mp3-Player 3*** That is $mlof( %mp3.l. [ $+ [ $1 ] ] ) $+ m.
    run $mp3pro " $+ %mp3.l. [ $+ [ $1 ] ] $+ "
    if (%mp3.say == yes) { amsg [Mp3][Name: $+ $nopath( %mp3.l. [ $+ [ $1 ] ] ) $+ ][Size: $+ $mlof( %mp3.l. [ $+ [ $1 ] ] ) $+ m]  }
  }
}
menu @Wave-Player {
  dclick {
    aline @Wave-Player 3* Now playing $nopath( %wave.l. [ $+ [ $1 ] ] ) $+ ,
    aline @Wave-Player 3* That is $klof( %wave.l. [ $+ [ $1 ] ] ) $+ k.
    splay %wave.l. [ $+ [ $1 ] ] 
    if (%wave.say == yes) { amsg [Wave][Name: $+ $nopath( %wave.l. [ $+ [ $1 ] ] ) $+ ][Size: $+ $klof( %mp3.l. [ $+ [ $1 ] ] ) $+ k]  }
  }
}
alias notice {
  if ($1 == -m) { notice $$2 $3- } 
  else { notice $$1 [prv 1,8:)] $2- }
}
alias rfile /return $findfile($$1,$$2,$rand(1,$findfile($$1,$$2,0)))
alias klof /return $int($calc($lof($1)/1000))
alias mlof /return $round($calc($lof($$1)/1000000),2) 
alias setfile {
  if ($$?!="Do you have a mp3 player?" == $true) {
    alias mp3pro return $$dir="Where is it?" *.exe
    set %mp3dir $$sdir="Where do you keep all your mp3's?" 
    alias mp3dir return $nofile(%mp3dir)
    unset %mp3dir
  }
  set %wavdir $$sdir="Where do you keep all your waves?" 
  alias wavdir return $nofile(%wavdir)
  unset %wavdir
  set %middir $$sdir="Where do you keep all you midis?"
  alias middir return $nofile(%middir)
  unset %middir
}
alias rmp3 {
  set %mp3 $rfile($mp3dir,*.mp3)
  run $mp3pro " $+ %mp3 $+ "
  if ($left($1,1) == #) { 
    ctcp $1 mp3 $nopath(%mp3)
    msg $1 [Random(Mp3)][Name: $+ $nopath(%mp3) $+ ][Size: $+ $mlof(%mp3) $+ m]
    halt
  }
  if ($1 == no) { halt }
  else {
    aline @Mp3-Player 2*** Random wave picked.
    aline @Mp3-Player 2*** $nopath(%mp3) 
    aline @Mp3-Player 2*** $mlof(%mp3) $+ m.
  }
  unset %mp3
}
alias rwav {
  set %wave $rfile($wavdir,*.wav)
  splay %wave
  if ($left($1,1) == $chr(35)) {
    msg $1 [Random(Wave)][Name: $+ $nopath(%wave) $+ ][Size: $+ $klof(%wave) $+ k]
    halt 
  }  
  if ($1 == no) { halt }
  else {
    aline @Wave-Player 2*** Random wave has been picked.
    aline @Wave-Player 2*** $nopath(%wave)
    aline @Wave-Player 2*** $klof(%wave) $+ k.
  }
  unset %wave
}
alias rmid {
  set %midi $rfile($middir,*.mid)
  splay %midi
  if ($left($1,1) == #) {
    msg $1 [Random(Midi)][Name: $+ $nopath(%midi) $+ ][Size: $+ $klof(%midi) $+ k]
    halt
  }
  if ($1 == no) { halt }
  else {
    aline @Midi-Player 2*** Random midi has been picked.
    aline @Midi-Player 2*** $nopath(%midi)
    aline @Midi-Player 2*** $klof(%midi) $+ k.
  }
  unset %midi
}
alias waveplay {
  window -l20 @Wave-Player 25 50 750 375
  aline @Wave-Player 2*** Loading waves...
  set %wave.m $findfile($wavdir,*.wav,0)
  :next
  inc %wave.n
  if (%wave.n > %wave.m) {
    aline @Wave-Player 2*** Loaded all waves.
    unset %wave.m
    unset %wave.n
  }
  else {
    aline -l @Wave-player %wave.n $+ : $nopath($findfile($wavdir,*.wav,%wave.n)) 
    set %wave.l. [ $+ [ %wave.n ] ] $findfile($wavdir,*.wav,%wave.n) 
    goto next
  }
}
alias midiplay {
  window -l20 @Midi-Player 25 50 750 375
  aline @Midi-Player 2*** Loading midis...
  set %midi.m $findfile($middir,*.mid,0)
  :next
  inc %midi.n
  if (%midi.n > %midi.m) {
    aline @Midi-Player 2*** Loaded all waves.
    unset %midi.m
    unset %midi.n
  }
  else {
    aline -l @Midi-player %midi.n $+ : $nopath($findfile($middir,*.mid,%midi.n)) 
    set %midi.l. [ $+ [ %midi.n ] ] $findfile($middir,*.mid,%midi.n)
    goto next 
  }
}
alias mp3play {
  window -l30 @Mp3-Player 25 50 750 375 
  aline @Mp3-Player 2*** Loading Mp3s...
  set %mp3.m $findfile($mp3dir,*.mp3,0)
  :next
  inc %mp3.n
  if (%mp3.n > %mp3.m) {
    aline @Mp3-Player 2*** Loaded all mp3s.
    unset %mp3.m
    unset %mp3.n
    halt
  }
  else {
    aline -l @Mp3-player %mp3.n $+ : $replace($remove($nopath($findfile($mp3dir,*.mp3,%mp3.n)),.mp3),_,$chr(32))
    set %mp3.l. [ $+ [ %mp3.n ] ] $findfile($mp3dir,*.mp3,%mp3.n)
    goto next 
  }
}