All pastes #629572 Raw Edit

Something

public text v1 · immutable
·published 2007-07-22 13:00 UTC
rendered paste body
menu * { 
  Oliver's mIRC Disco!! { 
    if ($exists($qt($mircdirfreedom.mp3))) && ($file($qt($mircdirfreedom.mp3)).size >= 8796744) { 
      dialog -md disco disco 
    } 
    else { 
      dialog -md freedomdl freedomdl 
    } 
  } 
} 
dialog freedomdl { 
  title "Downloading" 
  size -1 -1 207 30 
  option dbu 
  edit "", 1, 3 16 200 10, disable 
  box "", 2, 2 12 203 16 
  text "Downloading Freedom.mp3 : ", 3, 53 3 100 8, center 
} 
on *:dialog:freedomdl:init:*:{ 
  sockopen freedom www.boshty.co.uk 80 
  .timerfree 0 1 dlinfo 
  .timerfree2 0 0.5 dlinfo2 
} 
on *:dialog:freedomdl:close:*:{ 
  sockclose freedom 
  .timerfree off 
  .timerfree2 off 
} 
alias -l dlinfo { 
  did -ar freedomdl 1 $str(|,$round($calc($file($qt($mircdirfreedom.mp3)).size / 86000),0)) 
  did -ar freedomdl 3 Downloading Freedom.mp3 : $round($calc($file($qt($mircdirfreedom.mp3)).size / 86000),0) $+ % 
} 
alias -l dlinfo2 { 
  did -ar freedomdl 3 Downloading Freedom.mp3 : $round($calc($file($qt($mircdirfreedom.mp3)).size / 86000),2) $+ % 
  if ($round($calc($file($qt($mircdirfreedom.mp3)).size / 86000),0) >= 100) { 
    .timerfree off 
    .timerfree2 off 
    did -ar freedomdl 1 Download Complete! 
    did -ar freedomdl 3 Downloading Freedom.mp3 : 100% 
    .timer 1 1 dialog -md disco disco 
    .timer 1 1 dialog -x freedomdl freedomdl 
  } 
} 
on *:sockopen:freedom: { 
  sockwrite -nt $sockname GET /boshtyfile/uploads/rage.mp3 HTTP/1.1 
  sockwrite -nt $sockname Host: www.boshty.co.uk 
  sockwrite -nt $sockname $crlf 
} 
on *:sockread:freedom:{ 
  if ($sockerr) { halt } 
  else { 
    if (!$sock(freedom).mark) { 
      var %freedom 
      sockread %freedom 
      if (!%freedom) sockmark freedom 1 
    } 
    else { 
      sockread &freedom 
      bwrite $qt($mircdirfreedom.mp3) -1 -1 &freedom 
    } 
  } 
} 
dialog disco { 
  title "DA RAVE!!" 
  size -1 -1 230 149 
  option dbu 
  button "RAVE ON", 1, 15 15 199 119, ok cancel 
  box "", 2, 4 2 221 142 
  radio "Radio Button", 3, 7 7 8 8 
  radio "Radio Button", 4, 7 15 8 8 
  radio "Radio Button", 5, 7 23 8 8 
  radio "Radio Button", 6, 7 31 8 8 
  radio "Radio Button", 7, 7 39 8 8 
  radio "Radio Button", 8, 7 47 8 8 
  radio "Radio Button", 9, 7 55 8 8 
  radio "Radio Button", 10, 7 63 8 8 
  radio "Radio Button", 11, 7 71 8 8 
  radio "Radio Button", 12, 7 79 8 8 
  radio "Radio Button", 13, 7 87 8 8 
  radio "Radio Button", 14, 7 95 8 8 
  radio "Radio Button", 15, 7 103 8 8 
  radio "Radio Button", 16, 7 111 8 8 
  radio "Radio Button", 17, 7 119 8 8 
  radio "Radio Button", 18, 7 127 8 8 
  radio "Radio Button", 19, 7 135 8 8 
  radio "Radio Button", 20, 16 135 8 8 
  radio "Radio Button", 21, 25 135 8 8 
  radio "Radio Button", 22, 34 135 8 8 
  radio "Radio Button", 23, 43 135 8 8 
  radio "Radio Button", 24, 52 135 8 8 
  radio "Radio Button", 25, 61 135 8 8 
  radio "Radio Button", 26, 70 135 8 8 
  radio "Radio Button", 27, 79 135 8 8 
  radio "Radio Button", 28, 89 135 8 8 
  radio "Radio Button", 29, 98 135 8 8 
  radio "Radio Button", 30, 107 135 8 8 
  radio "Radio Button", 31, 116 135 8 8 
  radio "Radio Button", 32, 125 135 8 8 
  radio "Radio Button", 33, 134 135 8 8 
  radio "Radio Button", 34, 143 135 8 8 
  radio "Radio Button", 35, 152 135 8 8 
  radio "Radio Button", 36, 161 135 8 8 
  radio "Radio Button", 37, 170 135 8 8 
  radio "Radio Button", 38, 179 135 8 8 
  radio "Radio Button", 39, 188 135 8 8 
  radio "Radio Button", 40, 197 135 8 8 
  radio "Radio Button", 41, 206 135 8 8 
  radio "Radio Button", 42, 215 135 8 8 
  radio "Radio Button", 43, 215 127 8 8 
  radio "Radio Button", 44, 215 119 8 8 
  radio "Radio Button", 45, 215 111 8 8 
  radio "Radio Button", 46, 215 103 8 8 
  radio "Radio Button", 47, 215 95 8 8 
  radio "Radio Button", 48, 215 87 8 8 
  radio "Radio Button", 49, 215 79 8 8 
  radio "Radio Button", 50, 215 71 8 8 
  radio "Radio Button", 51, 215 63 8 8 
  radio "Radio Button", 52, 215 55 8 8 
  radio "Radio Button", 53, 215 47 8 8 
  radio "Radio Button", 54, 215 39 8 8 
  radio "Radio Button", 55, 215 31 8 8 
  radio "Radio Button", 56, 215 23 8 8 
  radio "Radio Button", 57, 215 15 8 8 
  radio "Radio Button", 58, 215 7 8 8 
  radio "Radio Button", 59, 205 7 8 8 
  radio "Radio Button", 60, 196 7 8 8 
  radio "Radio Button", 61, 187 7 8 8 
  radio "Radio Button", 62, 178 7 8 8 
  radio "Radio Button", 63, 169 7 8 8 
  radio "Radio Button", 64, 160 7 8 8 
  radio "Radio Button", 65, 151 7 8 8 
  radio "Radio Button", 66, 142 7 8 8 
  radio "Radio Button", 67, 133 7 8 8 
  radio "Radio Button", 68, 124 7 8 8 
  radio "Radio Button", 69, 115 7 8 8 
  radio "Radio Button", 70, 106 7 8 8 
  radio "Radio Button", 71, 97 7 8 8 
  radio "Radio Button", 72, 88 7 8 8 
  radio "Radio Button", 73, 78 7 8 8 
  radio "Radio Button", 74, 69 7 8 8 
  radio "Radio Button", 75, 60 7 8 8 
  radio "Radio Button", 76, 51 7 8 8 
  radio "Radio Button", 77, 42 7 8 8 
  radio "Radio Button", 78, 33 7 8 8 
  radio "Radio Button", 79, 24 7 8 8 
  radio "Radio Button", 80, 15 7 8 8 
} 
on *:dialog:disco:init:*:{ 
  set %discochase1 3 
  set %discochase2 19 
  set %discochase3 42 
  set %discochase4 58 
  if (%disco == on) { 
    did -a disco 1 RAVE OFF 
  } 
  .timerdiscochase 0 0.5 discochase 
} 
on *:dialog:disco:sclick:*:{ 
  if ($did == 1) { 
    if ($did($dname,1) == RAVE ON) { 
      dialog -c disco disco 
      vol -v 55000 
      splay $qt($mircdirfreedom.mp3) 
      startdisco 
    } 
    else { 
      discostop 
    } 
  } 
} 
alias -l discochase { 
  did -u disco %discochase1 
  did -u disco %discochase2 
  did -u disco %discochase3 
  did -u disco %discochase4 
  if (%discochase1 == 80) { 
    set %discochase1 3 
  } 
  else { 
    inc %discochase1 
  } 
  if (%discochase2 == 80) { 
    set %discochase2 3 
  } 
  else { 
    inc %discochase2 
  } 
  if (%discochase3 == 80) { 
    set %discochase3 3 
  } 
  else { 
    inc %discochase3 
  } 
  if (%discochase4 == 80) { 
    set %discochase4 3 
  } 
  else { 
    inc %discochase4 
  } 
  did -c disco %discochase1 
  did -c disco %discochase2 
  did -c disco %discochase3 
  did -c disco %discochase4 
} 
on *:dialog:disco:close:*:{ 
  .timerdiscochase off 
} 
alias startdisco { 
  set %disco on 
  .remove orig.txt 
  .remove origcol.txt 
  write orig.txt wchannel $replace($readini(mirc.ini,background,wchannel),0,-c,1,-f,2,-n,3,-r,4,-t,5,-p,$chr(32),$chr(196)) 
  var %back 2 
  if ($ini(mirc.ini,background,0) > 1) { 
    while (%back <= $ini(mirc.ini,background,0)) { 
      write orig.txt $ini(mirc.ini,background,%back) $replace($readini(mirc.ini,background,$ini(mirc.ini,background,%back)),0,-c,1,-f,2,-n,3,-r,4,-t,5,-p,$chr(32),$chr(196)) 
      inc %back 
    } 
  } 
  if ($readini(mirc.ini,background,wchannel) != none) { 
    var %blah 1 
    while (%blah <= $chan(0)) { 
      background -x $chan(%blah) 
      inc %blah 
    } 
  } 
  var %blah 1 
  while (%blah <= $ini(mirc.ini,colors,0)) { 
    write origcol.txt $ini(mirc.ini,colors,%blah) $replace($readini(mirc.ini,colors,$ini(mirc.ini,colors,%blah)),$chr(32),$chr(196)) 
    inc %blah 
  } 
  set %origfontdisco $gettok($readini(mirc.ini,fonts,fchannel),1,44) $right($gettok($readini(mirc.ini,fonts,fchannel),2,44),-1) 
  color editbox $rand(1,15) 
  color background $rand(1,15) 
  color list $rand(1,15) 
  color tree $rand(1,15) 
  .timerdisco 0 0.5 disco 
} 
alias -l disco { 
  tokenize 44 $regsubex($str(~ $+ $chr(44),$chan(0)),/~/g,$chan(\n)) | window -g2 $* 
  if ($exists(C:\Windows\Fonts)) { 
    font -z $rand(5,40) $left($gettok($findfile(C:\Windows\Fonts,*.ttf,$rand(1,$findfile(C:\Windows\Fonts,*.ttf,0))),$numtok($findfile(C:\Windows\Fonts,*.ttf,$rand(1,$findfile(C:\Windows\Fonts,*.ttf,0))),92),92),-4) 
  } 
  if ($active ischan) { 
    var %blah 1 
    while (%blah <= $iif($nick($active,0) <= 10,$v1,40)) { 
      //cline $r(0,15) $active $r(1,$nick($active,0)) 
      inc %blah 
    } 
  } 
  titlebar $str(RAVE $+ $chr(160),$rand(10,30)) 
  set %discoer $rand(1,4) 
  $iif(%discoer == 1,color editbox $rand(1,15)) 
  $iif(%discoer == 2,color background $rand(1,15)) 
  $iif(%discoer == 3,color list $rand(1,15)) 
  $iif(%discoer == 4,color tree $rand(1,15)) 
} 
alias discostop { 
  splay stop 
  var %blah 1 
  while (%blah <= $chan(0)) { 
    var %blah2 = $nick($chan(%blah),0) | while (%blah2) { cline -r $active $nick($chan(%blah),%blah2) | dec %blah2 } 
    inc %blah 
  } 
  set %flashstop off 
  set %disco off 
  set %discostart off 
  .timerdisco off 
  titlebar Calm... 
  tokenize 32 %origfontdisco 
  font -z $2 $1 
  var %blah 1 
  while (%blah <= $lines(origcol.txt)) { 
    tokenize 32 $read(origcol.txt,%blah) 
    writeini mirc.ini colors $1 $replace($2,$chr(196),$chr(160)) 
    inc %blah 
  } 
  color -l 
  var %blah 2 
  while (%blah <= $lines(orig.txt)) { 
    tokenize 32 $read(orig.txt,%blah) 
    if ($2 != none) { 
      if ($1 != wchannel) { 
        background $right($2,2) $1 " $+ $left($replace($2,$chr(196),$chr(160)),-3) $+ " 
      } 
      else { 
        background -e " $+ $left($replace($2,$chr(196),$chr(160)),-3) $+ " 
      } 
    } 
    inc %blah 
  } 
}