TakeOver Pro — File Browser

TakeOverProv1.0 / TakeOverProv1.0 / ToPro / gotillamp3-2.mrc

gotillamp3-2.mrc — 28.34 KB — Download this file

;GoTilla MP3 v3.22
;ID3 ALIASES(below) coutesy of w|dget(widget01@hotmail.com)
;by Bucksmack(buckaroo@rochester.rr.com)


alias -l a { if ( $got.read(mp3nocunt) == on ) { return [ } | else { return [ } }
alias -l b { if ( $got.read(mp3nocunt) == on ) { return ] } | else { return ] } }
alias -l c { if ( $got.read(mp3nocunt) == on ) { return < } | else { return < } }
alias -l d { if ( $got.read(mp3nocunt) == on ) { return > } | else { return > } }
alias bghatesme2 { unload -rs $got.q($script) }
alias gottotal { set %got.temp $1- | if ( $1 == $null ) { return $got.color.1 $+ N $+ $got.color.2 $+ / $+ $got.color.1 $+ A } 
else if ( %got.temp >= 1000000024 ) { return $round($calc( %got.temp / 1000000024 ),2) $+ GB } | else if ( %got.temp >= 1000024 ) { return $round($calc( %got.temp / 1000024 ),2) $+ MB } | else { return $round($calc( %got.temp / 1024 ),0) $+ KB } }
alias bgrancolor { got.write mp3color1 $replace($rand(1,15),8,7,9,3,11,12,15,14) | got.write mp3color2 $replace($rand(1,15),8,7,9,3,11,12,15,14) | if ( $got.read(mp3color2) == $&
$got.read(mp3color1) ) { got.write mp3color2 $replace($got.read(mp3color2),1,2,2,3,3,4,4,5,5,6,6,7,7,10,10,12,12,13,13,14,14,2) } }
alias got.under { if ( $got.read(mp3ison4) == on ) { return $replace($1-,_,$chr(32)) } | else { return $1- } }
alias got.txtlist4 { inc %got.temp.2 | write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($nopath($$2-),.mp3) </td><td bgcolor=FF9D9D> $$iif( $lof($$2-) != $null,$gottotal($lof($$2-)),N/A) </td></tr> | got.write mp3size $calc( $got.read(mp3size) + $lof($$2-) ) }
alias got.txtlist1 { inc %got.temp.2 | write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($nopath($$2-),.mp3) </td><td bgcolor=FF9D9D> $$iif( $lof($$2-) != $null,$gottotal($lof($$2-)),N/A) </td><td bgcolor=FF9D9D> $duration($mpegtime($got.q($$1))) </td></tr> | got.write mp3size $calc( $got.read(mp3size) + $lof($$2-) ) }
alias got.txtlist3 { inc %got.temp.2 | write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($nopath($$2-),.mp3) </td></tr> | got.write mp3size $calc( $got.read(mp3size) + $lof($$2-) ) }
alias got.txtlist2 { inc %got.temp.2 | write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($nopath($$2-),.mp3) </td><td bgcolor=FF9D9D> $duration($mpegtime($got.q($$1))) </td></tr> | got.write mp3size $calc( $got.read(mp3size) + $lof($$2-) ) }
alias bgstop { .remove $got.read(mp3dir) $+ temp.m3u | .run $got.read(mp3player) $got.read(mp3dir) $+ temp.m3u }
alias got.color.1 { if ( $got.read(mp3nocunt) == on ) { return } | else { return  $+ $got.read(mp3color1) $+  } }
alias got.read { return $readini $got.q($mircdirgotilla.ini) mp3 $1- }
alias got.write { writeini $got.q($mircdirgotilla.ini) mp3 $$1 $$2- }
alias got.del { remini $got.q($mircdirgotilla.ini) mp3 $$1 }
alias got.color.2 { if ( $got.read(mp3nocunt) == on ) { return } | else { return  $+ $got.read(mp3color2) $+  } }
alias bgreplace { return $replace($1-,-,$bgreplace2(-),_,$bgreplace2(_),$chr(40),$bgreplace2($chr(40)),$chr(41),$bgreplace2($chr(41)),[,$bgreplace2([),],$bgreplace2(]),$chr(64),$bgreplace2($chr(64)),$chr(35),$bgreplace2($chr(35)) $&
,$chr(33),$bgreplace2($chr(33)),$chr(37),$bgreplace2($chr(37)),$chr(39),$bgreplace2($chr(39)),$chr(96),$bgreplace2($chr(96)),$chr(38),$bgreplace2($chr(38)),$chr(44),$bgreplace2($chr(44))) }
alias bgreplace2 { return $got.color.2 $+ $1 $+ $got.color.1 }
alias bglength { return $replace( $1- ,wks,$bgreplace2(w),wk,$bgreplace2(w),days,$bgreplace2(d),day,$bgreplace2(d),hrs,$bgreplace2(h),hr,$bgreplace2(h),mins,$bgreplace2(m),min,$bgreplace2(m),secs,$bgreplace2(s),sec,$bgreplace2(s)) }
alias got.q { return " [ $+ [ $1- ] $+ ] " }
alias got.com { if ( $chr(32) $+ $chr(32) isin %got.file ) { return $shortfn(%got.file) } | if ( $chr(44) isin %got.file ) { return $shortfn(%got.file) } | else { return %got.file } }
alias got.na { return $got.color.1 $+ N $+ $got.color.2 $+ / $+ $got.color.1 $+ A }
alias bgquick { if ( $1 == 1 ) { return on } | else { return off } }
alias got.end { if ( $got.read(mp3advert) == on ) { msg $$1 $got.mp3($$2) $theend } | else if ( $got.read(mp3advert) == off ) { bgnoshow } | else { amsg $got.mp3($$2) $theend } | unset %got.* }
alias BGtest0r { 
  unset %got.*.* 
  if ( $timer(foldplay) != $null ) { got.damnuwoman foldplay Folder Play }
  if (( $timer(bgshuffle) != $null ) && ( $1 != 2 )) { got.damnuwoman bgshuffle Shuffle Play }
  if (( $timer(playlist) != $null ) && ( $1 != 1 )) { got.damnuwoman playlist Playlist }
  if (( $got.read(mp3dir) == $null ) || ( $exists($shortfn($got.read(mp3dir))) != $true )) { got.eco You need to have an MP3 directory set | halt } | if (( $got.read(mp3player) == $null ) || ( $exists($shortfn($got.read(mp3player))) != $true )) { got.eco You must select the location of your MP3 player | halt } 
}
alias got.damnuwoman { if ( $?!=" $$2- is currently in progress, continuing will halt it. Are you sure you want to do this?" ) { .timer [ $+ [ $$1 ] ] off } | else { halt } }
alias got.folderskip { if ( $timer(foldplay) == $null ) { got.eco Folder play isn't on | halt } | bgfolderz2 }
alias bgfoldkill { if ( $timer(foldplay) == $null ) { got.eco Folder play isn't on | halt } | .timerfoldplay off | got.eco Folder play has been stopped | bgstop }


alias bgfileplay {
  if ( $got.read(mp3ctcpsend) == on ) { .ctcp $$1 SOUND $nopath($replace(%got.file,$chr(32),$chr(160))) }
  if ( $got.read(mp3rancolor) == on ) { bgrancolor } 
  got.write mp3replay $replace(%got.file,$chr(32),$chr(42))
  set %got.addy1 $nopath(%got.file)
  ; set %got.addy1 $iif( $got.read(mp3id3shiat) == on,$nopath(%got.file),$remove($nopath(%got.file),.mp3)) 
  run -n $got.read(mp3player) $got.q($got.com)  
  set %got.id3.done $bgid3shiat($$2-) 
  set %got.length.1 $got.color.1 $+ $bglength($duration($mpegtime($got.q($got.com)))) 
  if ( $strip(%got.length.1) == $null ) { set %got.length.1 $got.na }
  set %got.size $c $+ $got.color.1 $+ $replace($gottotal($file($got.com).size),MB,$bgreplace2(mb),KB, $bgreplace2(kb),GB, $bgreplace2(gb)) $+ $d
  got.write mp3favplace $deltok($instok($got.read(mp3favplace),$got.read(mp3replay),1,124),6,124)
}
alias bgfolderz {
  bgtest0r   
  var %got.tempy = $got.read(mp3dir) $+ *.mp3  
  got.write mp3foldplay $sdir="Choose a Folder" %got.tempy
  if ( $findfile($got.read(mp3foldplay),*.mp3,*) == 0 ) { got.eco No mp3's in $got.read(mp3foldplay) | halt }
  got.write mp3foldnum 0  
  bgfolderz2
}

alias bgfolderz2 {
  got.write mp3foldnum $calc( $got.read(mp3foldnum) + 1 )
  if ( $got.read(mp3foldnum) == $calc($findfile($got.read(mp3foldplay),*.mp3,*) + 1 )) { .timerfoldplay off | got.eco Finished playing from $got.read(mp3foldplay) | halt }
  set %got.file $findfile($got.read(mp3foldplay),*.mp3,$got.read(mp3foldnum))
  bgfileplay # %got.file
  if ( $got.read(mp3advert) == on ) { msg # $got.mp3(folder) $a $+ $got.color.1 $+ $bgreplace($gettok($got.read(mp3foldplay),$gettok($got.read(mp3foldplay),0,92),92)) $+ $b $theend } | else if ( $got.read(mp3advert) == off ) { bgnoshow } | else { amsg $got.mp3(folder) $a $+ $got.color.1 $+ $bgreplace($gettok($got.read(mp3foldplay),$gettok($got.read(mp3foldplay),0,92),92)) $+ $b $theend } | unset %got.*.*
  if ( $mpegtime($got.q($got.com(%got.file))) == $null ) { if ( $lof(%got.file) == $null ) { got.eco Could not use id3 tag, next mp3 in 3min 30sec... | .timerfoldplay 1 210 bgfolderz2 } | else { got.eco Could not use id3 tag, next mp3 in $duration($calc($lof(%got.file) / 16000)) $+ ... | .timerfoldplay 1 $calc($lof(%got.file) / 16000) bgfolderz2 } }
  else { .timerfoldplay 1 $mpegtime($got.q($got.com(%got.file))) bgfolderz2 }

}
alias BGplay { BGtest0r | set %got.file $$dir="Choose an MP3 to play" [ [ $got.read(mp3dir) $+ *.mp3 ] ] | bgfileplay # %got.file | got.end # n }
alias BGreplay {
  BGtest0r
  if ( $exists($shortfn($replace($got.read(mp3replay),$chr(42),$chr(32)))) == $false ) { got.eco Cannot find last file played | halt } 
  set %got.file $replace($got.read(mp3replay),$chr(42),$chr(32))
  bgfileplay # %got.file
  got.end # $iif( $$1 == 1,favorite,replay )
}
alias bgNEWRAN {
  set %got.number.1 $findfile($shortfn($got.read(mp3dir)) ,*.mp3,*)  
  if (( %got.number.1 == 0 ) &&  ( $got.read(mp32dir) != on )) { got.eco Could not locate an mp3 | halt }
  if ( $got.read(mp32dir) == on ) { 
    set %got.number.2 $findfile($shortfn($got.read(mp3dir2)) ,*.mp3,*) 
    if (( %got.number.1 == 0 ) && ( %got.number.2 == 0 )) { got.eco Could not locate an mp3 | halt }
    set %got.number.3 $calc( %got.number.1 + %got.number.2 )
    set %got.number.4 $rand(1,%got.number.3)
    if ( %got.number.4 > %got.number.1 ) {
      set %got.number.4 $calc( %got.number.4 - %got.number.1 )
      set %got.file $findfile($shortfn($got.read(mp3dir2)) ,*.mp3,%got.number.4 ) 
    }
    else { got.mp3ran }
  }
  else { set %got.file $findfile($shortfn($got.read(mp3dir)) ,*.mp3,$rand(1,%got.number.1)) }
}  
alias got.mp3ran { set %got.file $findfile($shortfn($got.read(mp3dir)),*.mp3,%got.number.4 ) }
alias BGranplay { BGtest0r | bgnewran | bgfileplay # %got.file | got.end # random }
alias bgshuffle {
  BGtest0r 2
  bgnewran
  bgfileplay # %got.file
  if ( $mpegtime($got.q($got.com(%got.file))) == $null ) { if ( $lof(%got.file) == $null ) { got.eco Could not use id3 tag, next mp3 in 3min 30sec... | .timerbgshuffle 1 210 bgshuffle } | else { got.eco Could not use id3 tag, next mp3 in $duration($calc($lof(%got.file) / 16000)) $+ ... | .timerbgshuffle 1 $calc($lof(%got.file) / 16000) bgshuffle } }
  else { .timerbgshuffle 1 $mpegtime($got.q($got.com(%got.file))) bgshuffle }
  got.end # shuffle
}


alias mp3 {
  if ( $$1 == $null ) { got.eco Please supply keyword(s) | halt }
  if ( $chr(35) !isin # ) { got.eco Please use in a channel | halt }
  BGtest0r
  set %got.short.cut $replace($1-,$chr(32),$chr(42))
  set %got.short.cut.1 * $+ %got.short.cut $+ *.mp3
  set %got.short.cut1 $findfile($shortfn($got.read(mp3dir)),%got.short.cut.1,1)
  if (( %got.short.cut1 == $null ) && ( $got.read(mp32dir) == on )) { set %got.short.cut1 $findfile($got.read(mp3dir2),%got.short.cut.1,1) }
  if ( %got.short.cut1 == $null ) { got.eco No MP3's found | halt }
  if ( $calc( $findfile($shortfn($got.read(mp3dir)),%got.short.cut.1,*) + $findfile($shortfn($got.read(mp3dir2)),%got.short.cut.1,*) )  == 1 ) { set %got.file %got.short.cut1 | bgfileplay # %got.file | got.end # n }
  else { 
    got.write mp3winchan #  
    if ( $dialog(gotilla.mp3short) != $null ) { dialog -x gotilla.mp3short gotilla.mp3short }
    dialog -m gotilla.mp3short gotilla.mp3short 
    did -ra gotilla.mp3short 1 Total Matches: $calc( $findfile($shortfn($got.read(mp3dir)),%got.short.cut.1,*) + $findfile($shortfn($got.read(mp3dir2)),%got.short.cut.1,*) )
    set %got.t $findfile($shortfn($got.read(mp3dir)),%got.short.cut.1,*,bgmp3short $$1-) 
    if ( $got.read(mp32dir) == on ) { set %got.t $findfile($shortfn($got.read(mp3dir2)),%got.short.cut.1,*,bgmp3short $$1-) }
  }
}
alias bgmp3short { did -a gotilla.mp3short 2 $remove($nopath($$1-),.mp3) }
dialog gotilla.mp3short {
  title "Double Click file to play"
  size -1 -1 280 168
  button "CLOSE",8,2 143 277 24,ok
  text "",1,3 3 277 16
  list 2,1 19 278 149,extsel
}
alias got.tsavr {
  set %got.file.1 $replace($$1-,$chr(32),$chr(42))
  set %got.file.1 %got.file.1 $+ *.mp3
  set %got.file $findfile($shortfn($got.read(mp3dir)),%got.file.1,1)
  if (( %got.file == $null ) && ( $got.read(mp32dir) == on )) { set %got.file $findfile($got.read(mp3dir2),%got.file.1,1) }
}
on *:dialog:gotilla.mp3short:dclick:2:{
  got.tsavr $did(gotilla.mp3short,2,$did(gotilla.mp3short,2).sel).text   
  if ( %got.file == $null ) { .timer -m 1 1 did -d gotilla.mp3short 2 $did(2).sel | halt }
  bgfileplay $got.read(mp3winchan) %got.file
  if ( $chr(35) !isin $got.read(mp3winchan) ) { bgnoshow | goto end }
  got.end $got.read(mp3winchan) n
  :end
  dialog -x gotilla.mp3short gotilla.mp3short
}
alias theend { var %1 = $got.color.2 $+ ! $+ $me | return $iif( $got.read(mp3autosend) == on,%1) $iif( $got.read(mp3nocunt) != on,$got.color.1) $+ $bgreplace($got.under(%got.addy1)) $iif( $got.read(mp3want) == on, %got.size ) $&
$iif( $got.read(mp3length) == on, [ $c ] [ $+ [ %got.length.1 ] ] [ $+ [ $d ] ] ) $iif( %got.id3.done != $null, %got.id3.done ) }
alias bgid3shiat {
  set %got.id3.bitrate $got.color.1 $+ $mpegbitrate($got.q($got.com($1-))) $+ $bgreplace2(kbps) 
  set %got.id3.plate $got.color.1 $+ $mpegsmplrate($got.q($got.com($1-))) $+ $bgreplace2(khz)  
  set %got.id3.stereo $got.color.1 $+ $mpegcmode($got.q($got.com($1-)))
  if ( $strip($remove(%got.id3.bitrate,kbps)) == $null ) { return $c $+ $got.na $+ $d }
  set %got.temp $iif($got.read(mp3ison1) == on, [ %got.id3.bitrate ] ) $iif($got.read(mp3ison2) == on,%got.id3.plate) $iif($got.read(mp3ison3) == on,%got.id3.stereo) 
  if ( %got.temp == $null ) { return $null }  
  return $c $+ %got.temp $+ $d
}
alias bgkillshuf { if ( $timer(bgshuffle) == $null ) { got.eco Shuffle play isn't on | halt } | .timerbgshuffle off | got.eco Shuffle play has been stopped | bgstop }
alias bgadvertise { 
  if ( $got.read(mp3rancolor) == on ) { bgrancolor } 
  msg # $got.mp3(n) $got.color.1 $+ I am using $got.color.2 $+ $iif($got.read(mp3nocunt) != on,) $+ GoTilla $got.color.1 $+ MP3 $+ $got.color.2 v3.22 $+ $iif($got.read(mp3nocunt) != on,) $+ $got.color.1 by $+ $got.color.2 $&
  Bucksmack $+ $got.color.1 $+ . To get type $+ $got.color.2 ! $+ $me $+ -gotmp3 $got.color.1 $+ or goto $got.color.2 $+ http://gotilla.cjb.net/ 
}
alias bglistorcopy { if (( $got.read(mp3list) == $null ) || ( $exists($shortfn($got.read(mp3list))) != $true )) { got.eco You need to create a list first | halt } | bglistor 1 }
dialog gotilla.listsetup {
  title "GoTilla List Setup"
  size -1 -1 360 67
  box "Color Scheme",2,2 2 250 39
  button "&OK",1,3 43 123 22
  button "&Cancel:",8,127 43 124 22,ok
  check "Show Filesize",4,258 3 100 16
  check "Aphabetize List",5,258 26 100 16
  check "Show Filelength",7,258 49 100 16
  combo 6, 4 17 246 150,drop
}
on *:dialog:gotilla.listsetup:init:0:{
  did -a gotilla.listsetup 6 Green - Blue - Pink (default) | did -a gotilla.listsetup 6 White - Grey - Orange | did -a gotilla.listsetup 6 Red - White - Blue
  did -a gotilla.listsetup 6 White - Green - Red | did -a gotilla.listsetup 6 Lt. Purple - Aqua - Orange | did -a gotilla.listsetup 6 Pastel Blue - Lt. Purple - Pastel Brown | did -a gotilla.listsetup 6 Blue - Baby Shit Green - Lt. Green
  if ( $got.read(mp3listcolor) == $null ) { did -c gotilla.listsetup 6 1 } 
  else { did -c gotilla.listsetup 6 $got.read(mp3listcolor) }
  if ( $got.read(mp3listalpha) == on ) { did -c gotilla.listsetup 5 } | if ( $got.read(mp3listsize) == on ) { did -c gotilla.listsetup 4 } | if ( $got.read(mp3listlength) == on ) { did -c gotilla.listsetup 7 } 
}
on *:dialog:gotilla.listsetup:sclick:1:{
  got.write mp3listalpha $bgquick($did(5).state) | got.write mp3listsize $bgquick($did(4).state)
  got.write mp3listcolor $did(6).sel | got.write mp3listlength $bgquick($did(7).state) 
  dialog -x gotilla.listsetup gotilla.listsetup
}
on *:dialog:gotilla.listsetup:sclick:7:{ if ( $did(7).state == 1 ) { .timer -m 1 1 bggot.test } }
alias bggot.test { if ( $?!="This option may significantly decrease the speed in which the list is created and possibly freeze mIRC, are u sure u want to do this?" == $true ) { halt } | else { did -u gotilla.listsetup 7 } } 
alias got.listcolor {
  if ( $got.read(mp3listcolor) == 2 ) { set %got.color.1 FFFFFF | set %got.color.2 FFD300 | set %got.color.3 E6E4E4 }
  else if ( $got.read(mp3listcolor) == 3 ) { set %got.color.1 FF4D4D | set %got.color.2 FFFFFF | set %got.color.3 15ACFF }
  else if ( $got.read(mp3listcolor) == 4 ) { set %got.color.1 FFFFFF | set %got.color.2 91E900 | set %got.color.3 FF6666 }
  else if ( $got.read(mp3listcolor) == 5 ) { set %got.color.1 FF00FF | set %got.color.2 83FFFF | set %got.color.3 FFC400 }
  else if ( $got.read(mp3listcolor) == 6 ) { set %got.color.1 E1FFFF | set %got.color.2 E1B9FF | set %got.color.3 E1B9B9 }
  else if ( $got.read(mp3listcolor) == 7 ) { set %got.color.1 00E9FF | set %got.color.2 74C498 | set %got.color.3 74FF98 }
  else { set %got.color.1 00A7A0 | set %got.color.2 FF9DFF | set %got.color.3 1FC8FF }
}
alias got.listsetup { if ( $dialog(got.listsetup) == $null) { dialog -m gotilla.listsetup gotilla.listsetup } }

alias bglistor {
  set %got.tick $ticks
  if ( $$1 != 1 ) {  
    if (( $got.read(mp3dir) == $null ) || ( $exists($shortfn($got.read(mp3dir))) != $true )) { got.eco You need to have an MP3 directory set | halt }
    set %got.temp $shortfn($mircdir) $+ $replace($$?="Choose a name for the list (no extension)",$chr(32),$chr(95)) $+ .html
    if ( %got.temp == $null ) { got.eco Please choose a name for the list | halt }   
    .remove $shortfn(%got.temp)
    got.write mp3list $shortfn(%got.temp)
  }
  else { .remove $shortfn($got.read(mp3list)) } 
  got.write mp3size 1
  set %got.temp.2 0 | got.listcolor | got.listdec
  got.eco Creating list... 
  write $shortfn($got.read(mp3list)) <html><head><title>My List</title><style>
  write $shortfn($got.read(mp3list)) A:link {text-decoration: none}
  write $shortfn($got.read(mp3list)) A:visited {text-decoration: none}
  write $shortfn($got.read(mp3list)) A:hover {color:yellow}
  write $shortfn($got.read(mp3list)) </style></head><BODY bgcolor=" $+ %got.color.1 $+ " TEXT="#000000"><center>
  write $shortfn($got.read(mp3list)) <table border=0 cellpadding=3 cellspacing=1 width=100%>
  write $shortfn($got.read(mp3list)) <caption><font size=+4><a href="http://gotilla.cjb.net/">GoTilla MP3</a></font><br><font size=+2>by <b><a href="mailto:buckaroo@rochester.rr.com">Bucksmack</a></b></font></caption> 
  write $shortfn($got.read(mp3list)) <tr bgcolor= $+ %got.color.2 $+ ><td colspan=2><b>Name</b></td> $+ $iif( $got.read(mp3listsize) == on ,<td width=100><b>Size</b></td>) $+ $iif( $got.read(mp3listlength) == on ,<td width=130><b>Length</b></td>) $+ </tr>
  if ( $got.read(mp3listalpha) == on ) { got.sortedlist2 }
  else {
    unset %got.temp.3
    if ( $got.read(mp32dir) == on ) { set %got.temp.3 $findfile($got.read(mp3dir2),*.mp3,*,got.txtlist $+ %1 $shortfn($$1-) $$1- ) }
    got.eco Finished! Created list of $calc( $findfile($shortfn($got.read(mp3dir)),*.mp3,*,got.txtlist $+ %1 $shortfn($$1-) $$1- ) + %got.temp.3 ) mp3's in $calc($calc($ticks - %got.tick) / 1000) secs -( $+ $got.read(mp3list) $+ )- 
  }
  write $shortfn($got.read(mp3list)) <tr><td colspan="4" bgcolor= $+ %got.color.2 $+ ><center>Back to <a href="#top">top</a></center></table><br><p><br><p>
  write $shortfn($got.read(mp3list)) There are a total of<b> %got.temp.2 </b>mp3's, totaling<b> $gottotal($got.read(mp3size)) </b><br>
  write $shortfn($got.read(mp3list)) Last updated on<b> $adate </b>at<b> $asctime(hh:nn)  </b><br><p><br>
  write $shortfn($got.read(mp3list)) <font size=-1>This list was generated by GoTilla MP3 v3.22 get it at<a href="http://gotilla.cjb.net/"> http://gotilla.cjb.net </a>.
  write $shortfn($got.read(mp3list)) </center></body></html> | unset %got.*
}
alias got.listdec { if (( $got.read(mp3listsize) == on ) && ( $got.read(mp3listlength) == on )) { set %1 1 } | if (( $got.read(mp3listsize) != on ) && ( $got.read(mp3listlength) == on )) { set %1 2 } | if (( $got.read(mp3listsize) != on ) && ( $got.read(mp3listlength) != on )) { set %1 3 } | if (( $got.read(mp3listsize) == on ) && ( $got.read(mp3listlength) != on )) { set %1 4 } }
alias testicular.cancer4 { aline @temp $nopath($$2-) $+ $chr(42) $+ $lof($$2-) }
alias testicular.cancer2 { aline @temp $nopath($$2-) $+ $chr(42) $+ $lof($$2-) $+ $chr(42) $+ $duration($mpegtime($got.q($$1))) }
alias got.sortedlist2 { 
  window -c @temp | window -hns @temp | got.listdec
  if (( %1 == 1 ) || ( %1 == 2 )) { set %2 2 } | if (( %1 == 3 ) || ( %1 == 4 )) { set %2 4 }
  set %got.temp.2 $findfile($got.read(mp3dir),*.mp3,*,testicular.cancer $+ %2 $shortfn($$1-) $$1- ) 
  if ( $got.read(mp32dir) == on ) { set %got.temp.2 $findfile($got.read(mp3dir2),*.mp3,*,testicular.cancer $+ %2 $shortfn($$1-) $$1- ) }
  set %got.temp.1 $line(@temp,0) | set %got.temp.2 0 | got.write mp3size 0  
  :toperz
  inc %got.temp.2
  if ( %got.temp.2 == $calc( %got.temp.1 + 1 ) ) { goto end }
  got.write mp3size $calc( $got.read(mp3size) + $gettok($line(@temp,%got.temp.2),2,42) )
  ; code is not compressed for faster use
  if ( %1 == 1 ) { write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($gettok($line(@temp,%got.temp.2),1,42),.mp3) </td><td bgcolor=FF9D9D> $$iif( $gettok($line(@temp,%got.temp.2),2,42) != $null,$gottotal($gettok($line(@temp,%got.temp.2),2,42)),N/A) </td><td bgcolor=FF9D9D> $iif( $gettok($line(@temp,%got.temp.2),3,42) != $null,$gettok($line(@temp,%got.temp.2),3,42),N/A) </td></tr> }
  if ( %1 == 2 ) { write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($gettok($line(@temp,%got.temp.2),1,42),.mp3) </td><td bgcolor=FF9D9D> $$iif( $gettok($line(@temp,%got.temp.2),3,42) != $null,$gettok($line(@temp,%got.temp.2),3,42),N/A) </td></tr> }
  if ( %1 == 3 ) { write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($gettok($line(@temp,%got.temp.2),1,42),.mp3) </td></tr> }
  if ( %1 == 4 ) { write $shortfn($got.read(mp3list)) <tr><td bgcolor=FF9D9D width=50> %got.temp.2 </td><td bgcolor= $+ %got.color.3 $+ > $remove($gettok($line(@temp,%got.temp.2),1,42),.mp3) </td><td bgcolor=FF9D9D> $$iif( $gettok($line(@temp,%got.temp.2),2,42) != $null,$gottotal($gettok($line(@temp,%got.temp.2),2,42)),N/A) </td></tr> }
  ; end
  goto toperz
  :end
  dec %got.temp.2 | window -c @temp
  got.eco Finished! Created list of %got.temp.2 mp3's in $calc($calc($ticks - %got.tick) / 1000) secs -( $+ $got.read(mp3list) $+ )-
}
alias bglistaddy {
  if ( $exists($shortfn($got.read(mp3list))) != $true ) { got.eco You must create a list first! | goto end }
  if ( $got.read(mp3size) == $null ) { got.eco You must (re)create a list first! | goto end }
  if ( $got.read(mp3rancolor) == on ) { bgrancolor } 
  msg # $got.mp3(n) $+ $got.color.1 To get my list of $+ $got.color.2 $calc( $lines($got.read(mp3list)) - 13 ) $got.color.1 $+ mp3's, totaling $got.color.2 $+ $&
  $gottotal($got.read(mp3size)) $+ $got.color.1 type $+ $got.color.2 ! $+ $me $+ -list 
  :end
}
alias bgnoshow { window -anl @gotillaPLAYED 20 20 500 200 | aline @gotillaPLAYED $got.mp3(n) $theend }
alias got.shuffleskip {
  if ( $timer(bgshuffle) == $null ) { got.eco Shuffle play isn't on | halt }
  bgshuffle 1
}
on 1:text:*:*:{
  if ( $1 == ! $+ $me $+ -gotmp3 ) { 
    .notice $nick $got.mp3(n) $got.color.1 $+ You MUST accept both files for GoTilla MP3, and unload any previous versions, for it to work correctly. Download these to the same directory, and type: $got.color.2 $+ /load -rs c:\directory where u put them\gotillamp3-1.mrc
    dcc send $nick $got.q($script) 
  }
  if ( $1 == ! $+ $me $+ -list ) { if ( $exists($got.read(mp3list)) == $true ) { dcc send $nick $got.read(mp3list) } }
  if (( $1 == ! $+ $me ) && ( $got.read(mp3autosend) == on )) {
    inc %gotflood [ $+ [ $nick ] ] | .timer 1 30 unset %gotflood [ $+ [ $nick ] ] | if ( %gotflood [ $+ [ $nick ] ] >= 2 ) { halt }   
    if ( $2- == $null ) { halt }
    got.tsavr $remove($2-,.mp3)
    if ( $send(0) >= $got.read(mp3dccmax) ) { .notice $nick $got.mp3(n) $got.color.1 $+ Sorry but the maximum number of sends $+ $got.color.2 $+ ( $+ $got.read(mp3dccmax) $+ ) $+ $got.color.1 has been reached, please try again later | halt }
    if ( %got.file != $null ) { dcc send $nick $got.q(%got.file) }
    unset %got.*
  }
  if (( $1 == @locator ) || ( $1 == @find ) && ( $got.read(mp3locator) == on )) {
    if (( $2- == $null ) || ( $2- == * )) { halt } 
    inc %gotflood [ $+ [ $nick ] ]
    .timer 1 10 unset %gotflood [ $+ [ $nick ] ]
    if ( %gotflood [ $+ [ $nick ] ] == 2 ) { .notice $nick $got.mp3(n) $got.color.1 $+ Please wait $got.color.2 $+ 10 seconds $got.color.1 $+ then try again. | halt }     
    if ( %gotflood [ $+ [ $nick ] ] == 7 ) { got.eco $nick is being ignored for 30 seconds due to a $lower($1) flood. | .ignore -u30 $nick 3 }
    if ( %gotflood [ $+ [ $nick ] ] >= 3 ) { halt }
    unset %got.temp.*
    set %got.temp.1 * $+ $remove($replace($2-,$chr(32),$chr(42)),.mp3) $+ *.mp3
    set %got.wanker.1 $calc( $findfile($shortfn($got.read(mp3dir)),%got.temp.1,*) + 1 )
    set %got.temp.3 11
    if ( $got.read(mp32dir) == on ) { set %got.wanker.2 $calc( $findfile($shortfn($got.read(mp3dir2)),%got.temp.1,*) + 1 ) }
    if (( $got.read(mp32dir) != on ) && ( %got.wanker.1 == 1 ))  { halt }
    if (( $got.read(mp32dir) == on ) && ( %got.wanker.2 == 1 ) && ( %got.wanker.1 == 1 )) { halt }
    :toperz
    dec %got.wanker.1 | dec %got.temp.3
    if ( %got.temp.3  == 0 ) { .msg $nick $got.mp3(n) $got.color.2 $+ Your search has more than $got.color.1 $+ 10 $+ $got.color.2 matches, please try something more specific | goto end } 
    if (( %got.wanker.1 == 0 ) && ( $got.read(mp32dir) == on )) { goto toperz2 }
    if (( %got.wanker.1 == 0 ) && ( $got.read(mp32dir) != on )) { goto end }
    .msg $nick $got.mp3(n) $got.color.1 $+ $bgreplace($remove($nopath($findfile($shortfn($got.read(mp3dir)),%got.temp.1,%got.wanker.1)),.mp3))   
    goto toperz
    :toperz2
    dec %got.wanker.2 | dec %got.temp.3
    if ( %got.temp.3  == 0 ) { .msg $nick $got.mp3(n) $got.color.2 $+ Your search has more than $got.color.1 $+ 10 $+ $got.color.2 matches, please try something more specific | goto end } 
    if ( %got.wanker.2 == 0 ) { goto end }
    .msg $nick $got.mp3(n) $got.color.1 $+ $bgreplace($remove($nopath($findfile($shortfn($got.read(mp3dir2)),%got.temp.1,%got.wanker.2)),.mp3))   
    :end
    if ( $got.read(mp3autosend) != on ) { .msg $nick $got.mp3(n) $got.color.2 $+ Autosending for me is $got.color.1 $+ off | halt }
    else { .msg $nick $got.mp3(n) $got.color.2 $+ To get a file type: $+ $got.color.1 ! $+ $me (filename) $+ $got.color.2 $+ . There are currently $got.color.1 $+ $iif( $calc( $got.read(mp3dccmax) - $send(0) )  > 0,$calc( $got.read(mp3dccmax) - $send(0) ),no) $got.color.2 $+ open slots. }
    if ( $send(0) == $got.read(mp3dccmax) ) { .msg $nick $got.mp3(n) $got.color.2 $+ The maximum number of sends $+ $got.color.1 $+ ( $+ $got.read(mp3dccmax) $+ ) $+ $got.color.2 has been reached, please try again later | halt }
  }
}
alias got.mp3 { if ( $$1 == n ) { return $a $+ $got.color.1 $+ mp $+ $got.color.2 $+ 3 $+ $b } | else { return $a $+ $got.color.1 $+ mp $+ $got.color.2 $+ 3 $+ $got.color.1 $+ - $+ $$1 $+ $b } }
alias got.eco { echo -a   $+ $colour(info) $+ *** $$1- }

ctcp *:sound:*:{ bgrequest $nick $2- }
ctcp *:mp3:*:{ bgrequest $nick $2- }
alias bgrequest {
  if ( %gotflood.req != $null ) { halt }     
  if ( $got.read(mp3request) != on ) { halt }
  set %got.request.1 $replace($2-,$chr(160),$chr(42),$chr(45),$chr(42),$chr(95),$chr(42),$chr(32),$chr(42))
  if ( $right($2-,4) != .mp3 ) { set %got.request.1 %got.request.1 $+ *.mp3 }
  set %got.request $findfile($got.read(mp3dir),%got.request.1,1)
  if (( %got.request == $null ) && ( $got.read(mp32dir) == on )) { set %got.request $findfile($got.read(mp3dir2),%got.request.1,1) }
  if ( %got.request == $null ) { halt }
  if ( $got.read(mp3replay) iswm %got.request ) { halt }
  bgtest0r
  set %got.file %got.request
  bgfileplay # %got.request
  inc %gotflood.req
  if ( $mpegtime($got.q($got.com(%got.file))) == $null ) { if ( $lof(%got.file) == $null ) { .timer 1 210 unset %gotflood.req } | else { .timer 1 $calc($lof(%got.file) / 16000) unset %gotflood.req } }
  else { .timer 1 $mpegtime($got.q($got.com(%got.file))) unset %gotflood.req }
  got.eco Playing at request of: $1
  if ( $got.read(mp3advert) == on ) { msg # $got.mp3(request) $a $+ $got.color.1 $+ by $got.color.2 $+ $$1 $+ $b $theend } | else if ( $got.read(mp3advert) == off ) { bgnoshow } | else { amsg $got.mp3(request) $a $+ $got.color.1 $+ by $got.color.2 $+ $$1 $+ $b $theend } | unset %got.*.*
}

on *:connect: {
  if ( $nopath($script) != gotillamp3-2.mrc ) { .timer 1 2 rename $got.q($script) " $+ $nofile($script) $+ gotillamp3-2.mrc $+ " } 
  if (( $version < 5.6 ) || ( $bits < 32 )) { got.eco GoTilla MP3 v3.22 requires mIRC v5.6(32bit) or higher | unload -rs $script | halt } 
}