menu nicklist { Плавающий ник: FloatTarget $1 $calc($mouse.dx - %l + 5) $calc($mouse.dy - 18) } ; (c) Proteus alias pwindowsddrag { if ($mouse.key == 1) { if (%nMouse.X == $null) set %nMouse.X $2 if (%nMouse.Y == $null) set %nMouse.Y $3 var %nXpos = $calc($mouse.dx - %nMouse.X) var %nYpos = $calc($mouse.dy - %nMouse.Y) window $1 %nXpos %nYpos .timerpwindowsddrag -mo 1 10 pwindowsddrag $1 $2 $3 } else { .timerpwindowsddrag off if ($abs($calc($window($1).x - %lastFloat.x)) > 4) || ($abs($calc($window($1).y - %lastFloat.y)) > 4) { if (%FloatCons.auto == stack) FloatCons.ver $active if (%FloatCons.auto == line) FloatCons.gor $active } unset %nMouse.X | unset %nMouse.Y | unset %lastFloat.x } } alias UnfloatTarget { window -c @FloatTarget. $+ $1 if (!$hget(Float)) hdel Float $1 } alias UnfloatAllTarget { var %n = 0 while (%n < $window(@FloatTarget.*,0)) { inc %n | .timer -mo 1 1 window -c $window(@FloatTarget.*,%n) } hfree Float } alias -l FloatTarget.draw { var %c drawfill @FloatTarget. $+ $1 15 15 1 1 drawpic -c @FloatTarget. $+ $1 0 0 "Float.bmp" drawrect -r @FloatTarget. $+ $1 4 1 0 0 $window(@FloatTarget. $+ $1).w 22 if ($comchan($1,1)) %c = 1 | else %c = 14 drawtext @FloatTarget. $+ $1 %c Verdana 15 5 4 $hget(Float,$1) drawtext @FloatTarget. $+ $1 %c Verdana 13 30 4 $1 ; window -a $1 } alias -l FloatTarget.resize { window -dokph +dbL @FloatTarget. $+ $1 $2 $3 $calc(($len($1) * 10) + 30 ) 22 @FloatTarget FloatTarget.draw $1 } on ^*:NICK: { var %c = @FloatTarget. $+ $nick if ($window(%c)) { hadd Float $newnick $hget(Float,$nick) | hdel Float $nick FloatTarget.resize $newnick $window(%c).x $window(%c).y | window -c %c } } alias FloatTarget { if (!$hget(Float)) hmake Float 7 var %l = $calc(($len($1) * 10) + 30) hadd Float $1 0 window -c @FloatTarget. $+ $1 FloatTarget.resize $1- } alias FloatTarget.Query { var %c = @FloatTarget. $+ $1 if (!$window(%c)) { hdel Float $1 | return } ; (c) Proteus var %n = $calc(($len($1) * 10) + 30 ) drawpic -c @FloatTarget. $+ $1 0 0 0 0 25 22 "Float.bmp" if ($hget(Float,$1)) %c = 4 | elseif (comchan($1,1)) %c = 1 | else %c = 14 drawrect @FloatTarget. $+ $1 %c 1 0 0 %n 22 drawtext @FloatTarget. $+ $1 %c Verdana 15 5 4 $hget(Float,$1) %c = $hget(Float,$1) %c = $calc(25 + %c * 4) drawrect @FloatTarget. $+ $1 3 1 %c 17 2 4 } on ^1:text:*:?: if ($hget(Float)) { hadd Float $nick $calc($hget(Float,$nick) + 1) | FloatTarget.Query $nick } on *:input:?: if ($window(@FloatTarget. $+ $active)) { hadd Float $active 0 | FloatTarget.draw $active } alias FloatCons.ver { var %n = 0 var %x = $window($1).x var %y = $window($1).y :loop | inc %n | var %name = $hget(Float,%n).item if (@FloatTarget. $+ %name == $1) goto loop | inc %y 22 | if (%name) { window -c @FloatTarget. $+ %name | FloatTarget.resize %name %x %y | goto loop } } alias FloatCons.gor { var %n = 0 , %name = $remove($1,@FloatTarget.) var %x = $window($1).x var %y = $window($1).y :loop1 | inc %x $calc(($len(%name) * 10) + 30) :loop | inc %n | %name = $hget(Float,%n).item if (@FloatTarget. $+ %name == $1) goto loop | if (%name) { window -c @FloatTarget. $+ %name | FloatTarget.resize %name %x %y | goto loop1 } } menu @FloatTarget { dclick : { hadd Float $remove($active,@FloatTarget.) 0 | FloatTarget.draw $remove($active,@FloatTarget.) | query $remove($active,@FloatTarget.) | showmirc -s } mouse : { if ($mouse.key == 1) { if (!%lastFloat.x) { set %lastFloat.x $window($active).x | set %lastFloat.y $window($active).x } pwindowsddrag $active $mouse.x $mouse.y } } ; (c) Proteus $PClipboard($remove($address($remove($active,@FloatTarget.),2),*!*@)) : { } $PNFloatTarget : { hadd Float $1 0 | FloatTarget.Query $remove($active,@FloatTarget.) | query $remove($active,@FloatTarget.) | showmirc -s } Поговорить в чате: dcc chat $remove($active,@FloatTarget.) Послать файл: dcc send $remove($active,@FloatTarget.) - Настройка: dialog -m Float Float Авто Float для $remove($active,@FloatTarget.) $readini(float.ini,auto,c $+ $remove($active,@FloatTarget.)): { var %nick = c $+ $remove($active,@FloatTarget.) if ($readini(float.ini,auto,%nick) == +) remini float.ini auto %nick else writeini float.ini auto %nick + } - Убрать: UnfloatTarget $remove($active,@FloatTarget.) Вытроить .Вертикально: FloatCons.ver $active .Горизонтально: FloatCons.gor $active .- .Слепить окна %FloatCons.auto ..Горизонтально: set %FloatCons.auto line ..Вертикально: set %FloatCons.auto stack .Разлепить: unset %FloatCons.auto Убрать всё .Убрать сейчас: UnfloatAllTarget } ; (c) Proteus dialog Float { title "Плавающие ники (c) Proteus" size -1 -1 292 140 box "Выносить при входе",1,12 5 126 88 radio "Никогда",2,31 30 67 16,group radio "Друзей",3,31 50 61 16 radio "Всех",4,31 70 48 16 box "Убирать при выходе",5,154 5 127 88 radio "Никогда",6,175 30 67 16,group radio "не Друзей",7,175 50 70 16 radio "Всех",8,175 70 48 16 button "OK",100,40 103 75 23,ok default button "Cancel",101,130 103 75 23,cancel } on 1:DIALOG:Float:init:0: { did -c Float $calc(2 + %Float.auto.on) did -c Float $calc(6 + %Float.auto.off) } on 1:DIALOG:Float:sclick:100 { if ($did(Float,2).state) set %Float.auto.on 0 if ($did(Float,3).state) set %Float.auto.on 1 if ($did(Float,4).state) set %Float.auto.on 2 if ($did(Float,6).state) set %Float.auto.off 0 if ($did(Float,7).state) set %Float.auto.off 1 if ($did(Float,8).state) set %Float.auto.off 2 } on ^*:JOIN:#:{ if ($readini(float.ini,auto,$nick) == +) FloatTarget $nick $rand(10,500) $rand(10,500) if (%Float.auto.on) { if (%Float.auto.on == 1) && ($level($address($nick,3)) != 1FRIEND) && ($level($nick) != 1FRIEND) && ($level($address($nick,3)) != 1GIRL) && ($level($nick) != 1GIRL) halt if (%Float.auto.on == 2) && (($level($address($nick,3)) == 1ENEMY) || ($level($nick) == 1ENEMY) || ($level($address($nick,3)) == 1LAMER) || ($level($nick) == 1LAMER)) halt FloatTarget $nick $rand(10,500) $rand(10,500) } } on ^*:QUIT:{ if (%Float.auto.off) { if (%Float.auto.off == 1) && ($level($address($nick,3)) != 1FRIEND) && ($level($nick) != 1FRIEND) && ($level($address($nick,3)) != 1GIRL) && ($level($nick) != 1GIRL) halt UnfloatTarget $nick } }