;-=-=-=-=-=-
; DeadLy Script - WAV
;-=-=-=-=-=-
on *:LOAD: wav | s.open
alias wa return @Wav
alias wav {
  window -Ckpa +fbn $wa -1 -1 390 400 $icons(mp3)
  drawrect -fr $wa $gettok(%xrgb,1,44) 1 0 0 390 400
  but1
  titlebar $wa / Mp3 / Mdi file sound system 
}
alias sss return start,login,disconnect,exit,notice,ctcp,open window,query chat,flood,deop,nick mentioned,error,click window

alias but1 { var %x 1 
  while %x <= 13 { 
    drawchk $wa 20 $calc(%x *25) $hget(wav,chk $+ %x) $gettok($sss,%x,44)
    drawedit $wa 150 $calc(%x *25) 120 16
    drawbut $wa 280 $calc(%x *25) 25 16 ?
    drawbut $wa 310 $calc(%x *25) 40 16 play
    drawtext -c $wa 15 verdana 11 155 $calc(%x *25) 999 999 $iif($hget(wav,edt $+ %x) != $null, $nopath($hget(wav,edt $+ %x)), select sound)
    inc %x 1 
  }
}
alias wavchk {
  if ($inrect($mouse.x,$mouse.y,20 ,$2 ,110,16) = $true) { 
    hadd wav $1 $iif($hget(wav,$1) = on, off, on)
    drawchk $wa 20 $2 $hget(wav,$1)
  }
}
alias br {
  if ($inrect($mouse.x,$mouse.y,280 ,$2 ,25,16) = $true) {
    drawbutx $wa 280 $2 25 16 ?
    hadd wav $1 $$sfile($mircdirs\wavs\*.wav;*.mp3,select *.wav;*.mp3;*.mdi files,Select)
    drawedit $wa 150 $2 120 16
    drawtext -c $wa 15 verdana 11 155 $2 999 999 $nopath($hget(wav,$1))
    s.key
  }
}
alias tezt {
  if ($inrect($mouse.x,$mouse.y,310 ,$2 ,40,16) = $true) { 
    drawbutx $wa 310 $2 40 16 play
    if $isfile($hget(wav,$1)) = $true .splay $hget(wav,$1)
    else c set $style1 File not exist. click "?" to browse and select wav/mp3/mdi file
  }
}
on *:ACTIVE:@Wav: if $lactive = @edit window -c @edit
on *:CLOSE:@Wav: { unset %temp.click %editz | window -c @edit | bak.wav | unloads wav }
menu @Wav {
  sclick:{ 
    wavchk chk1 25
    wavchk chk2 50
    wavchk chk3 75
    wavchk chk4 100
    wavchk chk5 125
    wavchk chk6 150
    wavchk chk7 175
    wavchk chk8 200
    wavchk chk9 225
    wavchk chk10 250
    wavchk chk11 275
    wavchk chk12 300
    wavchk chk13 325

    br edt1 25 
    br edt2 50
    br edt3 75
    br edt4 100
    br edt5 125
    br edt6 150
    br edt7 175
    br edt8 200
    br edt9 225
    br edt10 250
    br edt11 275
    br edt12 300
    br edt13 325

    tezt edt1 25 
    tezt edt2 50
    tezt edt3 75
    tezt edt4 100
    tezt edt5 125
    tezt edt6 150
    tezt edt7 175
    tezt edt8 200
    tezt edt9 225
    tezt edt10 250
    tezt edt11 275
    tezt edt12 300
    tezt edt13 325

  }
}
on *:EXIT: unloads Wav
;-=-=-=-=-=-
;-=-=-=-=-=-
