on 1:input:*: { if ($left($1-,1) != /) { set %simsay $calc(%simsay + $len($1-)) | set %slovsay $calc(%slovsay + $0) } }
on 1:input:хз: { if ($left($1-,1) != /) { set %хзsay $calc(%хзsay + $len($1-)) } }

on ^*:join:#:{ 
  .timer -m 1 100 colorize $chan
  if (%clonedet == 1) {
    var %cNickClones = $lookChanNickClones($nick,#) 
    if (%cNickClones != $null) { echo $colour(ctcp) # * Найдены клоны ( %cNickClones ), Адрес: $remove($address($nick,2),*@*!) $+ ; Всего: $numtok(%cNickClones,32) }
  }
}

on *:PART:*: {
  if $nick == $me && %partsoundx == on { /dll libraries\game_tools.dll splay Sounds\part.wav } 
  /set %lastchannel $chan
}
on ^1:QUIT:{
  haltdef 
  if ($nick != $me) {
    ppop Покинул IRC $nick  С сообщением: $1- 
    aecho  $nick $time(%stamp.style) %skinpref 14Ушел с IRC 9  $NICK  15=7> 14 $address 12|14 $1- 
    echo #  %skinpref  15На канале Уменьшилось юзеров до7 $+  $nick($chan,0) $+ 15 ников... 
  }
}
on *:DISCONNECT: {
  titlebar .: IRc0p Script v7.5 :. .: Отключен от $network - $server - ( $+ $port $+ ) в $time :. 
}
on *:CONNECT: {
  titlebar .: IRc0p Script v7.5 :. .:Подключен к $server ( $+ $port $+ ) :. .: $me :. 
  sett
  ppop Соеденен с $network  ты подключен к $server $+( $+ $port $+ )
  if (%autojoin == on) && (%channelsjoin != $null) {
  }
  /debug -i NUL anticrash
}

on ^1:VOICE:#: {
  if ($me == $vnick) {
    if (%voigtzs == on) { /dll libraries\game_tools.dll splay %mevoice } 
  }
}
on ^1:DEVOICE:#:{
  if ($vnick == $me) {
    if (%devoigtzs == on) { /dll libraries\game_tools.dll splay %medevoice }
  }
}
on ^1:KICK:*:{
  if ($nick == $me) {
    if (%kocgtzs == on) { /dll libraries\game_tools.dll splay %mekoc } | ppop Kick $nick Кикнул,тебя на $chan $1-
  }
}
on ^1:INVITE:#: {
  if ($nick == ChanServ) { /halt }
  if (%invitasound == on) { /dll libraries\game_tools.dll splay %inviter }
  set -u100 %ichan # | set -u100 %inick $nick | echo 4 $nick 14Приглашает тебя на9 $chan | halt
}
on *:filercvd:*:{
  if (($balloon(12) == on) && (!$appactive)) { ppop Файл принят $chr(9) $filename от $nick) }
  if (%downlsnd = on) { /dll libraries\game_tools.dll splay %downloaded }
}
on *:filesent:*:{
  if (($balloon(10) == on) && (!$appactive)) { ppop Передача файла $chr(9) $filename для $nick завершена }
  if (%sentfi == on) { /dll libraries\game_tools.dll splay %sent }
}
on *:sendfail:*:{
  if (($balloon(11) == on) && (!$appactive)) { ppop Передача не удалась $chr(9) $filename от $nick }
  if (%nsentfi == on) { /dll libraries\game_tools.dll splay %nsent }
}
on ^*:notice:*:*:{
  if ($nick == memoserv) { 
    if (Пожалуйста, подождите 3 секунды перед тем как снова использовать команду SEND. isin $1-) { dialog -mn memsenderr memsenderr }
    if (%SMsgLog == on) { write $shortfn($mircdir) $+ sys\txt\MemoServMsgLog.txt $strip($timestamp) $strip($1-) }
    if (Вам пришло новое сообщение от isin $1-) || (Вам новая записка от isin $1-) { 
      set %newmemoNick от $5 | if (!$dialog(newmemo)) dialog -mn newmemo newmemo | else { dialog -x newmemo | dialog -mn newmemo newmemo } | did -i newmemo 10 1 Новое MEMO-сообщение 
      did -i newmemo 11 1 %newmemoNick 
      if (%memo.snd == on) { /dll libraries\game_tools.dll splay %newmemo.snd } 
      halt 
      unset %newmemoNick 
    }
    if (You have isin $1- && new memo isin $4-) && ($dialog(newmemo) != newmemo) { 
      set %newmemoCuont $3 | if (!$dialog(newmemo)) dialog -mn newmemo newmemo | else { dialog -x newmemo | dialog -mn newmemo newmemo } 
      did -i newmemo 10 1 %newmemoCuont новое MEMO-сообщение 
      if (%memo.snd == on) { /dll libraries\game_tools.dll splay %newmemo.snd }
      halt 
    }
  }
  if ($1 == Вам) {
    if ($3-4 == новые записки.) {
      set %post.new.n Вам $2 новых письма.
      post.new.n
      if (%memo.snd == on) { /dll libraries\game_tools.dll splay %newmemo.snd }
    }
    if ($3-4 == новая записка.) {
      set %post.new.n Вам $2 новое письмо.
      post.new.n
      if (%memo.snd == on) { /dll libraries\game_tools.dll splay %newmemo.snd }
    }
    if ($3-4 == новых записок.) {
      set %post.new.n Вам $2 новых писем.
      post.new.n
      if (%memo.snd == on) { /dll libraries\game_tools.dll splay %newmemo.snd }
    }
  }
}  
on *:action:$(* $+ $me $+ *):*:if (%high.fx == ON) /dll libraries\game_tools.dll splay Sounds\High.wav
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  Сканеры  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Клоносканер;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias clone.scan.dlg {
  if $dialog(clone.scan.dlg) = $null { dialog -m clone.scan.dlg clone.scan.dlg }
}
dialog clone.scan.dlg {
  option dbu
  size -1 -1 249 85
  title Сканер клонов - %clone.scan.chan 
  list 1, 4 4 120 68
  list 4, 125 4 74 68
  button "Старт", 2, 87 70 36 11, default
  button "Отмена", 3, 126 70 36 11, cancel
  button "Инфо", 5, 202 5 43 10
  button "Отчет", 9, 202 16 43 10
  button "Предупредить", 6, 202 32 43 10
  button "Кикнуть", 7, 202 43 43 10
  button "Забанить", 8, 202 54 43 10
}
on 1:dialog:clone.scan.dlg:*:*:{
  if ($devent == sclick) {
    if ($did == 2) clone.scan
    if ($did == 1) {
      did -r $dname 4
      var %cad = $did($dname,1).seltext
      var %scn = $gettok($hget(csc,%cad),0,44)
      var %csnc 0
      while (%csnc < %scn) { inc %csnc | did -a $dname 4 $gettok($hget(csc,%cad),%csnc,44) }
      did -c $dname 4 1
    }
    if ($did == 3) unset %clone.scan.chan
    if ($did == 5) && ($did($dname,4).seltext) .uwho $did($dname,4).seltext $did($dname,4).seltext
    if ($did == 9) && ($did($dname,1).seltext) {  
      echo -a 4-Результаты сканера клонов- ! 
      if ($hget(csc)) hfree csc
      hmake csc $nick(%clone.scan.chan,0)
      var %csn 0
      while (%csn < $nick(%clone.scan.chan,0)) {
        inc %csn
        hadd csc $address($nick(%clone.scan.chan,%csn),2) $hget(csc,$address($nick(%clone.scan.chan,%csn),2)) $+ $nick(%clone.scan.chan,%csn) $+ $chr(44)
      }
      var %css 0
      while (%css < $hget(csc,0).item) {
        inc %css
        var %cad = $hget(csc,%css).item
        var %scn = $gettok($hget(csc,%cad),0,44)
        if (%scn > 1) {
          var %clo 1 
          echo -a Адрес: %cad
          if (!%csna) {
            var %csna 1
            var %csnc 0
          }
          echo -a Ники возможных клонов: $hget(csc,%cad) 
        }
        unset %clone.scan
        unset %clo
      }
    }
    if ($did == 9) && ($did($dname,1).seltext) && ($did(clone.scan.dlg,1,1) == Клоны не найдены) { echo -a Клоны не найдены }
    if ($did == 6) && ($did($dname,4).seltext) {
      var %scn $did(clone.scan.dlg,4).lines,%csnc 0
      while (%csnc < %scn) { inc %csnc | var %ckn = $iif(%ckn,%ckn $+ $chr(44)) $+ $did(clone.scan.dlg,4,%csnc) }
      .msg %ckn На канале %clone.scan.chan запрещены клоны!
    }
    if ($did == 7) && ($did($dname,4).seltext) clone.scan.kick
    if ($did == 8) && ($did($dname,4).seltext) clone.scan.ban
  }
}
alias clone.scan {
  if ($server == $null) { scheck | /halt }
  if ($active !ischan) { set %err.w 110 | set %err.h 40 | set %err.b.x 38 | set %err.b.y 25 | set %err.msg Активное окно не канал! | error | return }
  if (!%clone.scan.chan) && ($active ischan) set %clone.scan.chan $active
  if ($active != %clone.scan.chan) && ($active ischan) set %clone.scan.chan $active
  dialog -t clone.scan.dlg Сканер клонов - %clone.scan.chan
  if ($me !isop %clone.scan.chan) { did -h clone.scan.dlg 6 | did -h clone.scan.dlg 7 | did -h clone.scan.dlg 8 }
  else { did -v clone.scan.dlg 6 | did -v clone.scan.dlg 7 | did -v clone.scan.dlg 8 }
  set %clone.scan 1
  if ($chan(%clone.scan.chan).ial == $false) { .ial on | who %clone.scan.chan | return }
  did -r clone.scan.dlg 1
  did -r clone.scan.dlg 4
  if ($hget(csc)) hfree csc
  hmake csc $nick(%clone.scan.chan,0)
  var %csn 0
  while (%csn < $nick(%clone.scan.chan,0)) {
    inc %csn
    hadd csc $address($nick(%clone.scan.chan,%csn),2) $hget(csc,$address($nick(%clone.scan.chan,%csn),2)) $+ $nick(%clone.scan.chan,%csn) $+ $chr(44)
  }
  var %css 0
  while (%css < $hget(csc,0).item) {
    inc %css
    var %cad = $hget(csc,%css).item
    var %scn = $gettok($hget(csc,%cad),0,44)
    if (%scn > 1) {
      var %clo 1 
      did -a clone.scan.dlg 1 %cad
      if (!%csna) {
        var %csna 1
        var %csnc 0
        while (%csnc < %scn) { inc %csnc | did -a clone.scan.dlg 4 $gettok($hget(csc,%cad),%csnc,44) }
      }
      did -c clone.scan.dlg 1 1
      did -c clone.scan.dlg 4 1
    }
  }
  if (!%clo) { did -a clone.scan.dlg 1 Клоны не найдены }
  did -c clone.scan.dlg 1 1
  unset %clone.scan
  unset %clo
}
alias clone.scan.kick dialog -m clone.scan.kick clone.scan.kick
dialog clone.scan.kick {
  option dbu
  size -1 -1 83 53
  title "Кикнуть"
  box "", 1, 4 2 75 32
  radio "Выделеный ник", 2, 9 10 60 10
  radio "Все ники этого хоста", 3, 9 20 63 10
  button "Кикнуть", 4, 4 38 36 11, default, ok
  button "Отмена", 5, 43 38 36 11, cancel
}
on 1:dialog:clone.scan.kick:*:*:{
  if ($devent == init) did -c $dname 2
  if ($devent == sclick) {
    if ($did == 4) {
      if ($did($dname,2).state) kick %clone.scan.chan $did(clone.scan.dlg,4).seltext На канале %clone.scan.chan запрещены клоны!
      if ($did($dname,3).state) {
        var %scn $did(clone.scan.dlg,4).lines,%csnc 0
        while (%csnc < %scn) { inc %csnc | var %ckn = $iif(%ckn,%ckn $+ $chr(44)) $+ $did(clone.scan.dlg,4,%csnc) }
        kick %clone.scan.chan %ckn На канале %clone.scan.chan запрещены клоны!
      }
    }
  }
}
alias clone.scan.ban dialog -m clone.scan.ban clone.scan.ban 
dialog clone.scan.ban {
  option dbu
  size -1 -1 83 53
  title "Забанить"
  box "", 1, 4 2 75 32
  radio "Выделеный ник", 2, 9 10 60 10
  radio "Все ники этого хоста", 3, 9 20 63 10
  button "Забанить", 4, 4 38 36 11, default, ok
  button "Отмена", 5, 43 38 36 11, cancel
}
on 1:dialog:clone.scan.ban:*:*:{
  if ($devent == init) did -c $dname 2
  if ($devent == sclick) {
    if ($did == 4) {
      if ($did($dname,2).state) { ban %clone.scan.chan $did(clone.scan.dlg,4).seltext 7 | kick %clone.scan.chan $did(clone.scan.dlg,4).seltext На канале %clone.scan.chan запрещены клоны! }
      if ($did($dname,3).state) {
        ban %clone.scan.chan $did(clone.scan.dlg,4).seltext 2
        var %scn $did(clone.scan.dlg,4).lines,%csnc 0
        while (%csnc < %scn) { inc %csnc | var %ckn = $iif(%ckn,%ckn $+ $chr(44)) $+ $did(clone.scan.dlg,4,%csnc) }
        kick %clone.scan.chan %ckn На канале %clone.scan.chan запрещены клоны!
      }
    }
  }
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Сканер IRC операторов ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias ircop.scan.dlg {
  if $dialog(ircop.scan.dlg) = $null { dialog -m ircop.scan.dlg ircop.scan.dlg }
}
dialog ircop.scan.dlg {
  option dbu
  size -1 -1 209 85
  title Сканер IRC операторов - %ircop.scan.chan 
  list 1, 4 4 70 55
  list 4, 75 4 130 55
  button "Инфо", 9, 22 55 34 10
  text "Проверено ников:", 5, 88 56 48 10
  text "", 6, 138 56 12 10, right
  text "из", 7, 154 56 20 10
  text "", 8, 163 56 12 10
  button "Старт", 2, 67 70 36 11, default
  button "Отмена", 3, 106 70 36 11, cancel
}
on 1:dialog:ircop.scan.dlg:*:*:{
  if ($devent == init) { did -h $dname 5 | did -h $dname 7 }
  if ($devent == sclick) {
    if ($did == 2) { 
      if (!%ircop.scan) {
        if ($active !ischan) { set %err.w 110 | set %err.h 40 | set %err.b.x 38 | set %err.b.y 25 | set %err.msg Активное окно не канал! | error | return }
        if (!%ircop.scan.chan) && ($active ischan) set %ircop.scan.chan $active
        if ($active != %ircop.scan.chan) && ($active ischan) set %ircop.scan.chan $active
        did -v $dname 5 | did -v $dname 6 | did -v $dname 7 | did -v $dname 8
        did -o $dname 2 1 Стоп
        set %ircop.scan 1
        dialog -t $dname Сканер IRC операторов - %ircop.scan.chan
        did -r $dname 1
        did -r $dname 4
        set %sown $nick(%ircop.scan.chan,0)
        set %scop 1
        whois $nick(%ircop.scan.chan,%scop) $nick(%ircop.scan.chan,%scop)
      }
      else {
        did -o $dname 2 1 Старт
        unset %ircop.scan | unset %scop | unset %ircop.scan.chan | unset %sown | unset %ewc
      }
    }
    if ($did == 1) did -c $dname 4 $did($dname,1).sel
    if ($did == 4) did -c $dname 1 $did($dname,4).sel
    if ($did == 9) && ($did($dname,1).sel) .uwho $did($dname,1).seltext $did($dname,1).seltext
    if ($did == 3) { unset %ircop.scan | unset %scop | unset %ircop.scan.chan | unset %sown | unset %ewc }
  }
}
raw 301:*: if (%ircop.scan) haltdef
raw 307:*: if (%ircop.scan) haltdef
raw 311:*: if (%ircop.scan) haltdef
raw 312:*: if (%ircop.scan) haltdef
raw 313:*: if (%ircop.scan) { did -a ircop.scan.dlg 1 $2 | did -a ircop.scan.dlg 4 $address($2,5) | haltdef }
raw 317:*: if (%ircop.scan) haltdef
raw 318:*: {
  if (%ircop.scan) {
    set %sown $nick(%ircop.scan.chan,0)
    inc %ewc
    inc %scop
    if (%ewc == %sown) { 
      did -o ircop.scan.dlg 6 1 %ewc
      did -o ircop.scan.dlg 8 1 %sown
      if ($did(ircop.scan.dlg,1).lines) { set %info.msg Поиск завершен! Найдено IRC операторов: $did(ircop.scan.dlg,1).lines | inform }
      else { set %info.msg Поиск завершен! IRC операторы не найдены | inform }
      did -o ircop.scan.dlg 2 1 Старт
      did -c ircop.scan.dlg 1 1 | did -c ircop.scan.dlg 4 1
      if (%sound == on) splay $shortfn($mircdir) $+ sys\sounds\drums.wav 
      unset %ircop.scan | unset %sown | unset %ewc | unset %scop | unset %ircop.scan.chan
    }
    else {
      did -o ircop.scan.dlg 6 1 %ewc
      did -o ircop.scan.dlg 8 1 %sown
      whois $nick(%ircop.scan.chan,%scop) $nick(%ircop.scan.chan,%scop)
    }
    haltdef
  }
}
raw 319:*: if (%ircop.scan) haltdef
;
; mSnake v2.3 by Varvail
; using HASH tables.
; if mirc is minimized Snake pauses
; 
; to Load: /load -rs mSnake2.mrc
;
; To start /snake2
;
on 1:KEYDOWN:@snake2:32,37,38,39,40:{
  if ($keyval == 32) {
    if ($hget(snake2d,status) != game over) {
      if ($hget(snake2d,start) == yes) {
        hadd snake2d start no
        titlebar @snake2 $iif(%_s2_solid != no,SOLID,not solid) - Score: $hget(snake2d,score) -GAME PAUSED-
        hadd snake2d status paused
      }
      else {
        hadd snake2d start yes
        titlebar @snake2 $iif(%_s2_solid != no,SOLID,not solid) - Score: $hget(snake2d,score)
        hadd snake2d status playing
      }
      return
    }
    snake2
    return
  }
  if ($hget(snake2d,start) == no) { hadd snake2d start yes }
  if ($hget(snake2d,p)) { return }
  if ($keyval == 37) { if ($_s2_dir == right) && ($_s2_len > 1) { return } | hadd snake2d direction left }
  if ($keyval == 38) { if ($_s2_dir == down) && ($_s2_len > 1) { return } | hadd snake2d direction up }
  if ($keyval == 39) { if ($_s2_dir == left) && ($_s2_len > 1) { return } | hadd snake2d direction right }
  if ($keyval == 40) { if ($_s2_dir == up) && ($_s2_len > 1) { return } | hadd snake2d direction down }
  hadd snake2d p yes
}
alias snake2 {
  window -p @snake2 100 50 510 530
  drawrect -f @snake2 1 1 0 0 510 530
  if ($hget(snake2)) { hfree snake2 }
  if ($hget(snake2d)) { hfree snake2d }
  hmake snake2 10000
  hmake snake2d 100
  hadd snake2d status playing
  hadd snake2 1 25 25
  hadd snake2d 25_25 snake
  hadd snake2d start no
  hadd snake2d size 1
  hadd snake2d score 0
  titlebar @snake2 $iif(%_s2_solid != no,SOLID,not solid) - Score: $hget(snake2d,score)
  var %f_x = $r(1,50)
  var %f_y = $r(1,50)
  var %f_xy = %f_x $+ _ $+ %f_y
  hadd snake2d fruit_x %f_x
  hadd snake2d fruit_y %f_y
  hadd snake2d %f_xy fruit
  hadd snake2d num 1
  hadd snake2d 25_25 snake
  drawdot @snake2 4 4 $calc($_s2_loc($hget(snake2d,fruit_x)) +5) $calc($_s2_loc($hget(snake2d,fruit_y)) +5)
  drawrect -f @snake2 7 1 $_s2_get2(1)
  .timersnake2 -m 0 50 _snake2
}
menu @snake2 {
  Snake2 for mIRC:echo -s made by Varvail
  -
  Wall Status- $iif(%_s2_solid != no,SOLID,not solid) -:{
    if (%_s2_solid != no) { set %_s2_solid no }
    else { set %_s2_solid yes }
  }
  -
  restart:/snake2
  pause:{
    if ($hget(snake2d,status) != game over) {
      if ($hget(snake2d,start) == yes) {
        hadd snake2d start no
        titlebar @snake2 $iif(%_s2_solid != no,SOLID,not solid) - Score: $hget(snake2d,score) -GAME PAUSED-
        hadd snake2d status paused
      }
      else {
        hadd snake2d start yes
        titlebar @snake2 $iif(%_s2_solid != no,SOLID,not solid) - Score: $hget(snake2d,score)
        hadd snake2d status playing
      }
      return
    }
  }
}
alias _snake2 {
  set %_s2_ver 2.2
  if (!$window(@snake2)) { .timersnake2 off | return }
  if (!$appactive) || ($active != @snake2) {
    hadd snake2d start no
    titlebar @snake2 $iif(%_s2_solid != no,SOLID,not solid) - Score: $hget(snake2d,score) -GAME PAUSED-
    hadd snake2d status paused
  }
  if ($hget(snake2d,start) != yes) { return }
  drawdot @snake2 4 4 $calc($_s2_loc($hget(snake2d,fruit_x)) +5) $calc($_s2_loc($hget(snake2d,fruit_y)) +5)
  var %x = $gettok($_s2_get($hget(snake2d,num)),1,32)
  var %y = $gettok($_s2_get($hget(snake2d,num)),2,32)
  if ($_s2_dir == left) { dec %x }
  if ($_s2_dir == up) { dec %y }
  if ($_s2_dir == right) { inc %x }
  if ($_s2_dir == down) { inc %y }
  hadd snake2d num $calc($hget(snake2d,num) +1)
  var %xy = %x $+ _ $+ %y
  if (%_s2_solid == no) {
    if (%x > 50) { dec %x 50 }
    if (%y > 50) { dec %y 50 }
    if (1 > %x) { inc %x 50 }
    if (1 > %y) { inc %y 50 }
    var %xy = %x $+ _ $+ %y
    if ($hget(snake2d,%xy) == snake) {
      goto go
    }
  }
  if ((%_s2_solid != no)) && (($hget(snake2d,%xy) == snake) || (1 > %x) || (%x > 50) || (1 > %y) || (%y > 50))  {
    :go
    .timersnake2 off
    drawtext @snake2 10 arial 80 20 150 Game Over
    if (!%_s2_ms) || ($hget(snake2d,score) > %_s2_ms) {
      drawtext @snake2 8 arial 30 130 100 New high score
      set %_s2_ms $hget(snake2d,score)
      ;set %_s2_mn $input(input name,eo,New High Score)
      set %_s2_mn $?="New High Score, input name"
    }
    drawtext @snake2 10 arial 20 200 300 Topscore:
    drawtext @snake2 3 arial 20 190 330 %_s2_ms : %_s2_mn
    hadd snake2d status game over
    return
  }
  drawrect -f @snake2 7 1 $_s2_loc(%x) $_s2_loc(%y) 10 10
  if ($_s2_len > 1) { drawrect -f @snake2 1 1 $_s2_get2($calc($hget(snake2d,num) -1)) | drawrect @snake2 7 1 $_s2_get2($calc($hget(snake2d,num) -1)) }
  var %q = $_s2_len
  if ($hget(snake2d,%xy) == fruit) {
    hadd snake2d score $calc(9+ $hget(snake2d,score))
    titlebar @snake2 $iif(%_s2_solid != no,SOLID,not solid) - Score: $hget(snake2d,score)
    hadd snake2 $hget(snake2d,num) %x %y
    hadd snake2d %xy snake
    var %f_yx = YldGa1pTQmllU0IyWVhKMllXbHM=
    :create
    var %f_x = $r(1,50)
    var %f_y = $r(1,50)
    var %f_xy = %f_x $+ _ $+ %f_y
    if ($hget(snake2d,%f_xy)) { goto create }
    hadd snake2d fruit_x %f_x
    hadd snake2d fruit_y %f_y
    hadd snake2d %f_xy fruit
    drawdot @snake2 4 4 $calc($_s2_loc($hget(snake2d,fruit_x)) +5) $calc($_s2_loc($hget(snake2d,fruit_y)) +5)
    hadd snake2d size $calc($_s2_len +1)
    goto _snakeend
  }
  var %lenxy $replace($_s2_get($calc($hget(snake2d,num) - %q)),$chr(32),_)
  hdel snake2d %lenxy
  drawrect -f @snake2 1 1 $_s2_get2($calc($hget(snake2d,num) - %q))
  hdel snake2 $calc($hget(snake2d,num) - %q)
  hadd snake2 $hget(snake2d,num) %x %y
  hadd snake2d %xy snake
  :_snakeend
  hdel snake2d p
}
alias _s2_dir { return $hget(snake2d,direction) }
alias _s2_loc { return $calc(($1 -1)*10) }
alias _s2_get { return $hget(snake2,$1) }
alias _s2_get2 { var %a = $hget(snake2,$1) | return $_s2_loc($gettok(%a,1,32)) $_s2_loc($gettok(%a,2,32)) 10 10 }
alias _s2_len { return $hget(snake2d,size) }
##################################################################################################
########################### СТАТИСТИКА IRC0P SCRIPT ##############################################
################################################################################################
ON *:CONNECT: if (%stat.set == on) inc %stat.connect
ON ^1:KICK:#: if (%stat.set == on) { if ($nick == $me) inc %stat.kick.i | if ($knick == $me) inc %stat.kick.me }
alias q { inc %stat.privat | query $1- }
ON *:INPUT:?: if (%stat.set == on) { inc %stat.message.privat | set %stat.word.privat %stat.word.privat + $numtok($strip($1-),32) | set %stat.symbols.privat %stat.symbols.privat + $len($strip($1-)) }
ON *:INPUT:#: if (%stat.set == on) { inc %stat.message.chan | set %stat.word.chan %stat.word.chan + $numtok($strip($1-),32) | set %stat.symbols.chan %stat.symbols.chan + $len($strip($1-)) }

alias stat.info { $iif($dialog(stat.info),dialog -x stat.info,dialog -m stat.info stat.info) }

dialog stat.info {
  title "Отчет"
  size -1 -1 132 170
  option dbu
  text "Статистика с", 1, 8 5 40 10
  edit %stat.date, 2, 43 4 35 10, read
  text "по", 3, 79 5 10 10
  edit $date, 4, 87 4 35 10, read
  box "Данные", 5, 5 15 122 95
  box "Данные", 56, 5 15 122 55
  text "Я забанил:", 41, 30 25 30 10
  edit %bans, 39, 91 24 32 10, read
  text "Я кикнул:", 8, 30 35 30 10
  edit %kicks, 9, 91 34 32 10, read
  text "Я зашел:", 91, 30 55 30 10
  edit %joins , 90, 91 54 32 10, autohs
  text "Я забанил:", 93, 30 45 30 10
  edit %bans , 94, 91 44 32 10, autohs
  text "Послано сообщений на каналах:", 23, 8 75 85 10
  edit %slovsay, 24, 91 74 32 10, read
  text "Послано символов на каналах:", 27, 11 90 80 10
  edit %simsay, 28, 91 89 32 10, read
  button "Закрыть" ,29, 90 115 28 12
  button "Сказать" ,31, 10 115 28 12
  button "Очистить" ,30, 49 114 30 16
}
on *:dialog:stat.info:sclick:29: { dialog -c stat.info } 
on *:dialog:stat.info:sclick:30: { dialog -c stat.info | set %ScripTRunNum 0 | set %joins 0 | set %unsban 0 | set %bans 0 | set %kicks 0 | set %simsay 0 | set %slovsay 0 | echo 15>>> 14Счет 0Очищен.. | stat.info }
on *:dialog:stat.info:sclick:31: { 
  dialog -c stat.info
  msg $active 0<<<<1 IRc0p Script Statistic (7.0) 0>>>> 
  msg $active 1<<<<0 Я Кикнул :1 %kicks 0, Забанил :0 %bans 1>>>>
  msg $active 0<<<<1 Разбанил :0 %unsban 1==0 Зашел на :1 %joins каналов 0>>>>
  msg $active 1<<<<0 Cказал:1 %slovsay 0слов ,1 %simsay 0- символов 1>>>>
  msg $active 0<<<<1 By Mirc-Love TeaM (0By Sasha1) 0>>>> 
} 
