;-=-=-=-=-=-
; DeadLy Script - INPUT DIALOG
;-=-=-=-=-=-
dialog input {
  title Input Settings - $sc
  size -1 -1 160 170
  icon $icons(colors)
  option dbu
  text F11, 999, 151 164 30 10, 
  button OK, 1000, 68 154 24 13, ok

  tab Text Styler, 1001, 0 0 160 150

  text Text Color, 1, 5 35 30 10, tab 1001
  text Prefix, 2, 5 100 15 10, tab 1001
  text Suffix, 3, 5 110 15 10, tab 1001
  text Stripe 1, 21, 105 44 20 10, tab 1001
  text Stripe 2, 22, 105 54 20 10, tab 1001
  text Color 1, 23, 105 44 20 10, tab 1001
  text Color 2, 24, 105 54 20 10, tab 1001
  box Auto Color, 4, 1 16 95 55, tab 1001
  box Prefix - Suffix Style, 5, 1 75 158 51, tab 1001
  box Input Style, 6, 95 16 64 55, tab 1001
  check ON/OFF, 101, 5 23 30 10, tab 1001
  check Back Color, 102, 5 55 40 10, tab 1001
  check ON/OFF, 103, 5 85 30 10, tab 1001
  check Bold, 104, 60 35 30 10, tab 1001
  check Underline, 105, 60 45 35 10, tab 1001
  edit "", 501, 20 98 30 10, autohs, tab 1001
  edit "", 502, 20 108 30 10, autohs, tab 1001
  icon 900, 20 132 160 12, $bmps(txt.bmp) , tab 1001 noborder left
  icon 901, 45 36 5 5 , $jpg(00) , tab 1001 noborder 
  icon 902, 45 57 5 5 , $jpg(00) , tab 1001 noborder 
  icon 908, 130 45 5 5, $jpg(00) , tab 1001 noborder left
  icon 909, 137 45 5 5, $jpg(00) , tab 1001 noborder left
  icon 910, 130 55 5 5, $jpg(00) , tab 1001 noborder left
  icon 911, 137 55 5 5, $jpg(00) , tab 1001 noborder left
  icon 912, 130 45 5 5, $jpg(00) , tab 1001 noborder left
  icon 913, 130 55 5 5, $jpg(00) , tab 1001 noborder left
  combo 401, 100 25 50 100, tab 1001 drop
  button ?, 203, 151 26 7 8, tab 1001 

  tab Nick Completer, 1002

  text Left, 7, 5 50 15 10, tab 1002
  text Right, 8, 55 50 15 10, tab 1002
  text "<", 11, 3 101 7 10, tab 1002
  text "@", 12, 25 101 7 10, tab 1002
  text "Nick", 13, 50 101 15 10, tab 1002
  text ">", 14, 79 101 15 10, tab 1002
  box Nick Completion, 15, 1 16 105 55, tab 1002
  box Completion Style, 16, 105 16 54 55, tab 1002
  box Nick's Color, 17, 1 75 158 51, tab 1002
  check ON/OFF, 106, 5 35 30 10, tab 1002
  check ON/OFF, 107, 5 85 30 10, tab 1002
  check Use Effect, 109, 5 60 38 10, tab 1002
  check Use Random, 110, 110 60 43 10, tab 1002 
  edit "", 503, 20 48 30 10, autohs, tab 1002
  edit "", 504, 70 48 30 10, autohs, tab 1002
  edit "", 505, 7 100 15 10, autohs, tab 1002
  edit "", 506, 32 100 15 10, autohs, tab 1002
  edit "", 507, 62 100 15 10, autohs, tab 1002
  edit "", 508, 82 100 15 10, autohs, tab 1002
  icon 905, 5 23 120 12, $bmps(nc.bmp) , tab 1002 noborder left
  icon 906, 55 85 120 10, $bmps(nix.bmp) , tab 1002 noborder left
  combo 402, 110 25 45 100, tab 1002 drop
  button edit, 204, 45 61 18 8, tab 1002 

  tab Abbreviation, 1003
  box Words, 18, 1 16 44 66, tab 1003
  box Replace, 19, 44 16 58 100, tab 1003
  box With:, 20, 101 16 58 100, tab 1003
  text edit your msg here in editbox to update the text, 25, 105 40 50 38, tab 1003
  check ON/OFF, 108, 5 26 30 10, tab 1003
  edit "", 509, 103 26 54 10, autohs, tab 1003
  list 403, 46 26 54 90, sort tab 1003 
  button Add, 201, 10 41 30 10, tab 1003
  button Remove, 202, 10 56 30 10 , tab 1003
  icon 907, 40 125 120 12, $bmps(txt1.bmp) , tab 1003 noborder left
}

on 1:DIALOG:input:*:*: {
  if $devent = init { if deadly isin $read(s\alias01.a,2) init7 | dial input }
  if $devent = sclick {
    if $did = 1000 { bak.input | bak.replace }
    inp.chk 101 chk1
    inp.chk 102 chk2
    inp.chk 103 chk3
    inp.chk 104 chk4
    inp.chk 105 chk5
    inp.chk 106 chk6
    inp.chk 107 chk7
    inp.chk 108 chk8
    inp.chk 109 chk9
    inp.chk 110 chk10
    if $did = 101 { did $iif($hget(input,chk1) = on, -e, -b) input 901,902,102,104,105 }
    if $did = 102 { did $iif($hget(input,chk2) = on, -e, -b) input 902 }
    if $did = 103 { did $iif($hget(input,chk3) = on, -e, -b) input 501,502 }
    if $did = 106 { nc.view | did $iif($hget(input,chk6) = on, -e, -b) input 503,504,402,109,204,110 }
    if $did = 107 { nix.view | did $iif($hget(input,chk7) = on, -e, -b) input 505,506,507,508 }
    if $did = 108 { did $iif($hget(input,chk8) = on, -e, -b) input 201,202,403,509 }
    if $did = 109 { nc.view | did $iif($hget(input,chk9) = on, -e, -b) input 204 }
    if $did = 110 { did $iif($hget(input,chk10) = off, -e, -b) input 402 | if $hget(input,chk10) = on did -c input 402 1 | set %st.comp 1 }
    if $did isnum 901-902 { set %tc $did | pick1 }
    if $did isnum 908-913 { set %tc $did | pick1 }
    if $did = 401 { combos $did(input,401).sel input | did $iif(%st.input = 10, -v, -h) input 908,909,910,911,21,22 | did $iif(%st.input = 6 || %st.input = 7, -v, -h) input 912,913,23,24 }
    if $did = 402 { combos $did(input,402).sel comp | did -r input 503,504 | hadd input edt3 | hadd input edt4 }
    if $did = 403 { did -ra input 509 $hget(replace,$did(input,403).seltext) | tc.view $hget(replace,$did(input,403).seltext) }
    if $did = 201 { var %a $$?="word to be replace ? " | var %b $$?="replace with ? " 
      hadd -m replace %a %b | replace | hadd input all %a $+ , $+ $hget(input,all)
    }
    if $did = 202 { var %a $$did(input,403).seltext | hdel replace %a | replace | hadd input all $remtok($hget(input,all),%a,1,44) }
    if $did = 203 { pley styler }
    if $did = 204 { dialog -m efek efek }
    else window -c @msg
  }
  if $devent = edit {
    inp.edt 501 edt1
    inp.edt 502 edt2
    inp.edt 503 edt3
    inp.edt 504 edt4
    inp.edt 505 edt5
    inp.edt 506 edt6
    inp.edt 507 edt7
    inp.edt 508 edt8
    inp.edt 509 edt9
    if $did isnum 501-502 txt.view 
    if $did isnum 503-504 nc.view1
    if $did isnum 505-508 nix.view
    if $did = 509 { hadd replace $$did(input,403).seltext $$did(input,509) | prev.msg input $$did(input,509) }
  }
  if $devent = close { window -c @msg | bak.input | bak.replace }
}
;-=-=-=-=-=-
; DeadLy Script - COLOR/EFFECTS DIALOG
;-=-=-=-=-=-
dialog pick1 {
  title Pick One
  size -1 -1 166 46
  icon $icons(colors)
  icon 1, 3 3 20 20, $jpg(00)
  icon 2, 23 3 20 20, $jpg(01)
  icon 3, 43 3 20 20, $jpg(02)
  icon 4, 63 3 20 20, $jpg(03)
  icon 5, 83 3 20 20, $jpg(04)
  icon 6, 103 3 20 20, $jpg(05)
  icon 7, 123 3 20 20, $jpg(06)
  icon 8, 143 3 20 20, $jpg(07)
  icon 9, 3 23 20 20, $jpg(08)
  icon 10, 23 23 20 20, $jpg(09)
  icon 11, 43 23 20 20, $jpg(10)
  icon 12, 63 23 20 20,  $jpg(11)
  icon 13, 83 23 20 20, $jpg(12)
  icon 14, 103 23 20 20, $jpg(13)
  icon 15, 123 23 20 20, $jpg(14)
  icon 16, 143 23 20 20, $jpg(15)
  button "ok", 200, 0 0 0 0, ok hide
}
on 1:dialog:pick1:sclick:*:{
  if $did isnum 1-16 { did -g input %tc s\bmp\ $+ $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) $+ .jpg 
    if %tc = 901 { set %txt.col $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
    if %tc = 902 { set %bak.col $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
    if %tc = 908 { set %str1.txt $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
    if %tc = 909 { set %str1.bak $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
    if %tc = 910 { set %str2.txt $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
    if %tc = 911 { set %str2.bak $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
    if %tc = 912 { set %col1 $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
    if %tc = 913 { set %col2 $iif($did <= 10, 0 $+ $calc($did - 1),$calc($did - 1)) }
  }
  txt.view | pick1
}

dialog efek {
  title Nick's Effect
  size -1 -1 150 175
  icon $icons(colors)
  box Select Nick's Effect, 1, 1 1 148 148
  radio effect 1, 101, 5 25 55 14
  radio effect 2, 102, 5 45 55 14
  radio effect 3, 103, 5 65 55 14
  radio effect 4, 104, 75 25 55 14
  radio effect 5, 105, 75 45 55 14
  radio effect 6, 106, 75 65 55 14
  check Use Random, 107, 15 85 90 14
  check Use Multi Colors, 108, 15 105 90 14
  button ok, 109, 50 153 50 18, ok
  icon 901, 50 125 50 20, $bmps(01.jpg) , tab 1002 noborder center
}
on *:DIALOG:efek:*:*:{
  if $devent = init { efef | did -g efek 901 s\bmp\efek.bmp | did -c efek %efek | did $iif($hget(input,efek.rand) = on,-c,-u) efek 107 | did $iif($hget(input,efek.color) = on,-c,-u) efek 108 | disef }
  if $devent = sclick { 
    if $did isnum 101-107 { set %efek $did | efef | did -g efek 901 s\bmp\efek.bmp }
    if $did = 107 {
      hadd input efek.rand $iif($hget(input,efek.rand) = on,off,on) | disef 
      if $hget(input,efek.rand) = off { did -u efek 101,102,103,104,105,106 | did -c efek 101 | set %efek 101 }
    }
    if $did = 108 {
      hadd input efek.color $iif($hget(input,efek.color) = on,off,on) 
      efef | did -g efek 901 s\bmp\efek.bmp
    }
    if $did = 109 { .remove s\bmp\efek.bmp | nc.view }
  }
  if $devent = close { .remove s\bmp\efek.bmp }
}
alias disef did $iif($hget(input,efek.rand) = on,-b,-e) efek 101,102,103,104,105,106
;-=-=-=-=-=-
; DeadLy Script - FAVORITE CHANNELS
;-=-=-=-=-=-
dialog ajoin {
  title Favorite Channels
  size 75 70 240 250
  icon $icons(online)
  list 1, 120 10 110 180, sort vsbar
  box Channels,  101, 1 10 118 60
  box Info Channel,  102, 1 120 118 95
  edit "", 2, 10 33 100 20, autohs
  button &join, 201, 10 80 100 20, default ok
  button &names, 202, 10 135 100 20
  button list &who, 203, 10 160 100 20
  button view &log, 204, 10 185 100 20
  button &add, 205, 130 185 40 18
  button &del, 206, 185 185 40 19
  check open on connect, 301, 1 230 100 20
  text "Shift+F5", 1001, 200 238 100 20
}
on 1:dialog:ajoin:*:*: {
  if ($devent = init) { ajoin.init }
  if ($devent = sclick) { 
    if ($did = 1) { did -ra ajoin 2 $$did(ajoin,1).seltext }
    if ($did = 201) { .join $$did(ajoin,2) }
    if ($did = 202) { .enable #namez | .names $$did(ajoin,2) }
    if ($did = 203) { .enable #lwho | lwho $$did(ajoin,2) }
    if ($did = 204) { viewlog $$did(ajoin,2) | s.open }
    if ($did = 205) { set %chan $addtok(%chan,#$$?="channel ?",44) | ajoin.init }
    if ($did = 206) { set %chan $remtok(%chan,$gettok($did(ajoin,1).seltext,1,32),1,44) | ajoin.init }
    if ($did = 301) { if ($did(ajoin,301 ).state = 1) .enable #aj on | else .disable #aj }  
  }
  if ($devent = dclick) { .join $$did(ajoin,1).seltext }
}
#aj off
on 1:connect: sf5
#aj end
;-=-=-=-=-=-
; DeadLy Script - nick list color
;-=-=-=-=-=-
dialog nicklist {
  title "Pick One"
  size -1 -1 166 46
  icon $icons(colors)
  icon 1, 3 3 20 20, $jpg(00)
  icon 2, 23 3 20 20, $jpg(01)
  icon 3, 43 3 20 20, $jpg(02)
  icon 4, 63 3 20 20, $jpg(03)
  icon 5, 83 3 20 20, $jpg(04)
  icon 6, 103 3 20 20, $jpg(05)
  icon 7, 123 3 20 20, $jpg(06)
  icon 8, 143 3 20 20, $jpg(07)
  icon 9, 3 23 20 20, $jpg(08)
  icon 10, 23 23 20 20, $jpg(09)
  icon 11, 43 23 20 20, $jpg(10)
  icon 12, 63 23 20 20, $jpg(11)
  icon 13, 83 23 20 20, $jpg(12)
  icon 14, 103 23 20 20, $jpg(13)
  icon 15, 123 23 20 20, $jpg(14)
  icon 16, 143 23 20 20, $jpg(15)
  button "ok", 200, 0 0 0 0, ok hide
}
on *:dialog:nicklist:sclick:*:{ 
  nlist.did 1 | nlist.did 2 | nlist.did 3 | nlist.did 4 | nlist.did 5 | nlist.did 6 | nlist.did 7 | nlist.did 8 | nlist.did 9 | nlist.did 10 | nlist.did 11 | nlist.did 12 | nlist.did 13 | nlist.did 14 | nlist.did 15 | nlist.did 16
  dialog -x nicklist nicklist 
}
;-=-=-=-=-=-
; DeadLy Script - FRIEND
;-=-=-=-=-=-
dialog user {
  title Friends / Enemy List - $sc
  size -1 -1 360 200
  icon $icons(face)

  tab Auto OP, 901, 0 0 360 200
  list 101, 217 28 140 180, sort vsbar tab 901
  check ON/OFF, 501, 10 25 60 20, tab 901
  text Nick, 201, 10 53 200 20, tab 901
  edit "", 301, 5 65 210 20, autohs tab 901
  button &add, 401, 160 150 40 18, tab 901
  button &delete, 402, 105 150 40 18, tab 901

  tab Auto Voice, 902, 0 0 360 200
  list 102, 217 28 140 180, sort vsbar tab 902
  check ON/OFF, 502, 10 25 60 20, tab 902
  text Nick, 202, 10 53 200 20, tab 902
  edit "", 302, 5 65 210 20, autohs tab 902
  button &add, 403, 160 150 40 18, tab 902
  button &delete, 404, 105 150 40 18, tab 902

  tab Auto Greet, 903, 0 0 360 200
  list 103, 217 28 140 180, sort vsbar tab 903
  check ON/OFF, 503, 10 25 60 20, tab 903
  text "Nick", 203, 10 53 200 20, tab 903
  text Auto Greet Msg, 213, 10 105 200 20, tab 903
  edit "", 303, 5 65 210 20, autohs tab 903
  edit "", 313, 5 120 210 20, autohs tab 903
  button &add, 405, 160 150 40 18, tab 903
  button &delete, 406, 105 150 40 18, tab 903
  button &update, 415, 50 150 40 18, tab 903

  tab Auto Kick, 904, 0 0 360 200
  list 104, 217 28 140 180, sort vsbar hsbar tab 904
  check ON/OFF, 504, 10 25 60 20, tab 904
  text Nick/Wild Host, 204, 10 53 200 20, tab 904
  text Auto Kick Msg, 214, 10 105 200 20, tab 904
  edit "", 304, 5 65 210 20, autohs tab 904
  edit "", 314, 5 120 210 20, autohs tab 904
  button &add, 407, 160 150 40 18, tab 904
  button &delete, 408, 105 150 40 18, tab 904
  button &update, 417, 50 150 40 18, tab 904
}
on 1:dialog:user:*:*: {
  if ($devent = init) { user.list }
  if ($devent = edit) && ($did isnum 313-314) { prev.msg user $did(user,$did) } 
  if ($devent = sclick) { .window -c @msg
    if $did = 101 { user.did 301 }
    if $did = 102 { user.did 302 }
    if $did = 103 { user.did 303 313 greet | prev.msg user $did(user,313) }
    if $did = 104 { user.did 304 314 kick | prev.msg user $did(user,314) }
    if $did = 401 { user.add op 301 }
    if $did = 402 { user.rem op 101 }
    if $did = 403 { user.add voice 302 }
    if $did = 404 { user.rem voice 102 }
    if $did = 405 { user.add greet 303 }
    if $did = 415 { user.add greet 303 | user.add greet 303 | did -r user 303,313 | user.list }
    if $did = 406 { user.rem greet 103 }
    if $did = 407 { user.add kick 304 }
    if $did = 417 { user.rem kick 104 | user.add kick 304 | did -r user 304,314 | user.list }
    if $did = 408 { user.rem kick 104 }
    if $did isnum 401-408 { did -r user 101,102,103,104,301,302,303,304,313,314 | user.list }
    if ($did = 451) { unset %aop | user.list }
    if ($did = 452) { unset %av | user.list }
    user.chk 501 chk1
    user.chk 502 chk2
    user.chk 503 chk3
    user.chk 504 chk4
  }
  if ($devent = close) { update | .window -c @msg | bak.user }
}
;-=-=-=-=-=-
; DeadLy Script - HELP
;-=-=-=-=-=-
dialog help {
  size -1 -1 550 330
  icon $icons(help)
  tab Topics, 301, 10 10 530 280
  tab Commands, 302
  list 19, 20 45 140 235, tab 301
  edit "", 23, 20 55 105 20, tab 302
  edit "", 20, 160 45 370 227, read multi vsbar tab 301
  list 21, 20 84 120 210, sort tab 302
  edit "", 22, 141 45 390 227, read multi tab 302
  text $sc v $+ $bersyon, 123, 46 300 120 20, disable
  icon 24, 10 290 180 50, $icons(deadly),0
  button Ok, 250, 471 295 60 25, ok default
}
alias _read if ($ini($texts(helpx.txt),$1)) loadbuf -oert $+ $1 help 20 $texts(helpx.txt) | else did -ra help 20 *** Error in help file
on 1:DIALOG:help:*:*:{
  if ($devent = init) {
    dialog -t help Help Dialog - $sc | didtok help 19 46 Intro. .Personal Protections.Channel Protections.Anti-Spam Bot. .Away System.!seen / !lasttalk.Panel. .Friends List.Misc Stuff. .Smart SMS.Addons. .FKeys.Registration Code. . .
    window -lh @_helpc | loadbuf @_helpc $texts(help.txt) | var %h = 1, %t | while (%h <= $line(@_helpc,0)) { %t = $line(@_helpc,%h) | did -a help 21 $gettok(%t,1,59) | inc %h } | window -c @_helpc
    did -ra help 20 $str($crlf,3) $+ $str($chr(160),40) $+ *** No topic selected ***
    did -ra help 22 $str($crlf,3) $+ $str($chr(160),45) $+ Select a command ( $+ $lines($texts(help.txt)) $+ )
  }
  if ($devent = edit) && ($did = 23) { if ($didwm(21,$+($did(23),*))) did -c help 21 $ifmatch | elseif (!$did(23)) did -c help 21 1 }
  if ($devent = sclick) {
    if ($did = 19) { if ($did(19).seltext = $chr(160)) { did -ra help 20 $str($crlf,3) $+ $str($chr(160),40) $+ *** No topic selected *** | return } | var %l = $gettok($did(19).seltext,1,32) | _read %l }
    if ($did = 21) { var %h = $read($texts(help.txt),s,$+($did(21).seltext,;))  | did -ra help 22 $crlf $+ Command: $did(21).seltext $+ $str($crlf,2) $+ Usage: / $+ $gettok(%h,1,59) $+ $str($crlf,2) $+ Description: $crlf $+ $gettok(%h,2,59) }
  }
}
;-=-=-=-=-=-
; DeadLy  Script - REPORT
;-=-=-=-=-=-
dialog alarm {
  title Alarm - $sc
  size -1 -1 210 110
  icon $icons(!)
  text It's now $time, 1, 70 20 160 20
  icon 3, 10 10 50 50, $icons(deadly)
  button "Ok", 50, 80 80 55 20, ok default
}
;-=-=-=-=-=-
; DeadLy  Script - CENSORED
;-=-=-=-=-=-
dialog sensor {
  title censored - $sc
  size -1 -1 250 170
  icon $icons(x)
  check ON/OFF, 1, 10 1 60 20
  box censored words, 4, 10 20 132 110
  box will replace with, 5, 140 20 100 70
  edit "",401, 150 40 80 20, drop autohs
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 133 40 20, 
  button &del, 8, 70 133 40 20, 
  list 9, 20 38 110 100, sort
}
on 1:dialog:sensor:*:*: {
  if $devent = init { sensor.init | s.open }
  if $devent = edit && $did = 401 { hadd var sensor.rep $$did(sensor,401) }
  if $devent = sclick { 
    if $did = 1 { hadd setup censored $iif($did(sensor,1).state = 1, on, off) }
    if $did = 7 { hadd var sensor $addtok($hget(var,sensor),$$?="censored word ?",44) | list.sen }
    if $did = 8 { hadd var sensor $remtok($hget(var,sensor),$$did(sensor,9).seltext,44) | list.sen }
    if $did = 6 bak.var
  }
}
alias list.sen did -r sensor 9 | var %pr 1 | while $gettok($hget(var,sensor),%pr,44) != $null { did -a sensor 9 $gettok($hget(var,sensor),%pr,44) | inc %pr 1 }

;-=-=-=-=-=-
; DeadLy Script - SEEN
;-=-=-=-=-=-
dialog seen {
  title !seen option
  icon $icons(chat)
  size 443 313 350 210
  list 301, 10 1 260 170, sort
  text "Only in channels (clear if to all) Use comma for multiple channel (e.g. #chan1,#chan2,#chan..).", 2, 13 157 240 28
  radio channel, 3, 280 30 80 14
  radio private, 4, 280 50 80 14
  radio notice, 5, 280 70 80 14
  edit "", 201, 10 183 250 20
  check ON/OFF, 101, 280 1 60 20
  check NOTIFY, 104, 280 100 60 20
  button &clear, 102, 280 140 60 18
  button &ok, 103, 280 183 60 18, ok default
}
on 1:dialog:seen:*:*:{
  if $devent = init { init9 }
  if $devent = sclick { 
    if $did = 3 { hadd var seen1 on | hadd var seen2 off | hadd var seen3 off }
    if $did = 4 { hadd var seen1 off | hadd var seen2 on | hadd var seen3 off }
    if $did = 5 { hadd var seen1 off | hadd var seen2 off | hadd var seen3 on }
    if $did = 101 { hadd var seen $iif($hget(var,seen) = on, off, on) | did $iif($hget(var,seen) = off, -u, -c) seen 101 }
    if $did = 104 { hadd var seenn $iif($hget(var,seenn) = on, off, on) | did $iif($hget(var,seenn) = off, -u, -c) seen 104 }
    if $did = 102 { sinfree | did -r seen 301 }
  }
  if $devent = edit && $did = 201 { set %seenchan $did(seen,201) }
}
on 1!:NICK:{ sin $fulladdress $ctime $nick Changed nicks to $newnick $comchan($nick,1) }
on 1!:PART:%seenchan:{ sin $fulladdress $ctime Parting # $iif($1- != $null,(Stating: $1- $+ )) }
on 1!:QUIT:{ sin $fulladdress $ctime Quiting $comchan($nick,1) ( $+ $1- $+ ) }
on 1!:KICK:%seenchan:{ sin $address($knick,5) $ctime $knick Kicked from # by $nick (Msg: $1- $+ ) }
on 1!:JOIN:%seenchan: { sin $fulladdress $ctime Joining # | if ($hget(seenc,$nick) != $null) && ($hget(var,seenn) = on) { var %tt $hget(seenc,$nick) | notice $nick Someone was looking for you: $gettok(%tt,1,32) on channel $gettok(%tt,2,32) last $asctime($gettok(%tt,3,32),mmm $+(dd,$chr(44),yyyy) [hh:mm:ss tt]) $duration($calc($ctime - $gettok(%tt,3,32))) ago. | hdel seenc $nick } }
on *:TEXT:*:%seenchan:{ if $2 = $null halt
  if ($hget(var,seen) = on) && ($1 = !seen) { 
    if ($chr(42) !isin $2) { 
      if $2 = $nick { sinq 4[ $+ $nick $+ 4] I'm gonna send you a mirror, to see yourself. | halt }
      if $2 = $me { sinq 4[ $+ $nick $+ 4] I'm just right here. | halt }
      if $2 ison # { sinq 4[ $+ $nick $+ 4] Open up your eyes. $2 is right here. | halt }
      var %ä 1 | while $chan(%ä) != $null { 
        if $2 ison $chan(%ä) { var %èè = 4[ $+ $nick $+ 4] $2 is still on $chan(%ä) 
          sinq %èè | halt 
        } 
        inc %ä 1 
      }
      if $hfind(seen,$2 $+ !*,1,w) != $null { 
        var %o = $hget(seen,$hfind(seen,$2 $+ !*,1,w))
        var %oo = 4[ $+ $nick $+ 4] $2 ( $+ $gettok($gettok(%o,1,32),2,33) $+ ) was seen last $asctime($gettok(%o,2,32),mmm $+(dd,$chr(44),yyyy) [hh:mm:ss tt]) $duration($calc($ctime - $gettok(%o,2,32))) ago $gettok(%o,3-,32) 
        sinq %oo
        if $hget(var,seenn) = on hadd -m seenc $2 $nick # $ctime
        halt 
      }
      else { var %çç 4[ $+ $nick $+ 4] i dont seen $2 | sinq %çç | halt }
    }
    if ($chr(42) isin $2) { 
      var %sw $hfind(seen,$2,0,w)
      var %ss %sw
      while %sw > 0 {
        if (%sw > 15) goto skep
        set %temp.sin %temp.sin $gettok($hfind(seen,$2,%sw,w),1,33)
        dec %sw 1
      }
      :skep
      var %ee = $hget(seen,$hfind(seen,$2,1,w))
      var %kk = 4[ $+ $nick $+ 4] I found $iif(%ss => 15,more than 15,%ss) matches $2 : %temp.sin ( $+ $gettok($gettok(%ee,1,32),2,33) $+ ) was seen last $asctime($gettok(%ee,2,32),mmm $+(dd,$chr(44),yyyy) [hh:mm:ss tt]) $duration($calc($ctime - $gettok(%ee,2,32))) ago $gettok(%ee,3-,32) 
      unset %temp.sin
      if $hfind(seen,$2,1,w) != $null { sinq %kk | halt }
      else { var %çq = 4[ $+ $nick $+ 4] no matches found $2 | sinq %çq }
    }
  }
}

;-=-=-=-=-=-
; DeadLy Script - LASTTALK
;-=-=-=-=-=-
dialog lasttalk {
  title !lasttalk option
  icon $icons(chat)
  size 443 313 350 210
  list 301, 10 1 260 170, sort
  text "Only in channels (clear if to all) Use comma for multiple channel (e.g. #chan1,#chan2,#chan..).", 2, 13 157 240 28
  text "", 3, 280 30 80 14
  text "", 4, 280 50 80 28, multiple
  text "", 5, 280 80 80 28, multiple
  edit "", 201, 10 183 250 20
  check ON/OFF, 101, 280 1 60 20
  button &clear, 102, 280 140 60 18
  button &ok, 103, 280 183 60 18, ok default
}
on 1:dialog:lasttalk:*:*: {
  if $devent = init { init8 }
  if $devent = sclick { 
    if $did = 101 { hadd var lasttalk $iif($hget(var,lasttalk) = on, off, on) | did $iif($hget(var,lasttalk) = off, -u, -c) lasttalk 101 }
    if $did = 102 { hdel -w lastok lastok* | did -r lasttalk 301 | bak.lastok }
  }
  if $devent = edit && $did = 201 { set %lasttalkchan $did(lasttalk,201) }
}
;-=-=-=-=-=-
; DeadLy Script - F3
;-=-=-=-=-=-
dialog pro1 {
  title Text Repeat - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro1:*:*: { sub 1 | stl 1 | ed2 1 }
;-=-=-=-=-=-
dialog pro2 {
  title Text Flood - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro2:*:*: { sub 2 | stl 2 | ed2 2 }
;-=-=-=-=-=-
dialog pro3 {
  title Excess Chars - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text letters, 2, 78 43 35 14
  edit "", 101,  40 40 35 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro3:*:*: { sub 3 | stl 3 | ed1 3 }
;-=-=-=-=-=-
dialog pro4 {
  title Excess CAPS - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text %, 2, 68 43 35 14
  edit "", 101,  40 40 23 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro4:*:*: { sub 4 | stl 4 | ed1 4 }
;-=-=-=-=-=-
dialog pro5 {
  title Excess Colors - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text %, 2, 68 43 35 14
  edit "", 101,  40 40 23 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro5:*:*: { sub 5 | stl 5 | ed1 5 }
;-=-=-=-=-=-
dialog pro6 {
  title Excess Codes - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text %, 2, 68 43 35 14
  edit "", 101,  40 40 23 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro6:*:*: { sub 6 | stl 6 | ed1 6 }
;-=-=-=-=-=-
dialog pro7 {
  title Guest Nick - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text joining and changing nicks, 1, 15 33 100 34
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro7:*:*: { sub 7 | stl 7 }
;-=-=-=-=-=-
dialog pro8 {
  title Bad Nick - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box bad nicks, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro8:*:*: { sub 8 | stl 8
  if $devent = sclick { adlis badnick 8 | delis badnick 8 }
}
;-=-=-=-=-=-
dialog pro9 {
  title Bad host/idents - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box bad host/idents, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro9:*:*: { sub 9 | stl 9
  if $devent = sclick { adlis badhost 9 | delis badhost 9 }
}
;-=-=-=-=-=-
dialog pro10 {
  title Bad host/idents - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box bad channels, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro10:*:*: { sub 10 | stl 10
  if $devent = sclick { adlis badchan 10 | delis badchan 10 }
}
;-=-=-=-=-=-
dialog pro12 {
  title Mass Kick - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro12:*:*: { sub 12 | stl 12 | ed2 12 }
;-=-=-=-=-=-
dialog pro13 {
  title Mass Ban - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro13:*:*: { sub 13 | stl 13 | ed2 13 }
;-=-=-=-=-=-
dialog pro14 {
  title Mass De@p - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text in, 2, 68 43 25 14
  text secs, 3, 110 43 25 14
  edit "", 101,  40 40 25 20
  edit "", 102,  80 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro14:*:*: { sub 14 | stl 14 | ed2 14 }
;-=-=-=-=-=-
dialog pro15 {
  title Forbidden Words - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box forbidden words, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro15:*:*: { sub 15 | stl 15
  if $devent = sclick { adlis badword 15 | delis badword 15 }
}
;-=-=-=-=-=-
dialog pro16 {
  title Excempted Chan/Site Ads - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box excempted chan/sites, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro16:*:*: { sub 16 | stl 16
  if $devent = sclick { adlis excempt 16 | delis excempt 16 }
}
;-=-=-=-=-=-
dialog pro17 {
  title OnJoin Spam - $sc
  size -1 -1 250 170
  icon $icons(pro)
  box spam words, 4, 10 10 132 110
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 150 130 90 25, ok default
  button &add, 7, 30 123 40 20, 
  button &del, 8, 70 123 40 20, 
  list 9, 20 28 110 100, sort
}
on 1:dialog:pro17:*:*: { sub 17 | stl 17
  if $devent = sclick { adlis spamword 17 | delis spamword 17 }
}
;-=-=-=-=-=-
dialog pro18 {
  title Revolving Doors - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text join-part, 2, 78 43 45 14
  edit "", 101,  40 40 35 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro18:*:*: { sub 18 | stl 18 | ed1 18 }
;-=-=-=-=-=-
dialog pro19 {
  title Idle Nick - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text mins, 2, 64 43 25 14
  edit "", 101,  37 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro19:*:*: { sub 19 | stl 19 | ed1 19 }
;-=-=-=-=-=-
dialog pro20 {
  title Clone Limit - $sc
  size -1 -1 250 130
  icon $icons(pro)
  text max, 1, 15 43 25 14
  text clones, 2, 68 43 25 14
  edit "", 101,  40 40 25 20
  box triggers, 4, 10 10 132 70
  box ban on, 5, 140 10 100 70
  combo 401, 150 40 80 100, drop
  button &OK, 6, 100 90 50 25, ok default
}
on 1:dialog:pro20:*:*: { sub 20 | stl 20 | ed1 20 }
;-=-=-=-=-=-
;-=-=-=-=-=-
