mIRC Home    About    Download    Register    News    Help

Print Thread
#40597 08/08/03 07:52 PM
Joined: Jul 2003
Posts: 129
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 129
hey all
i am interested in this:

i use script with mirc 6.03, and offcourse i use multi server command, but when i connect on for example 3 servers my lag meter that is located on my title tray it only measures lag of LAST server i have connected and when i d/c from that server lag meter shows last lag number and wont change, so how can i fix this so this lag meter can measure lag to eny server when i return to previous (by clicking on mouse not by reconecting) ?????

#40598 08/08/03 08:39 PM
S
ScatMan
ScatMan
S
update the lag every time u change the connection id:
on *:active:*:if ($lactivecid != $cid) { command.. }

#40599 08/08/03 08:40 PM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
That all depends on how your lag meter works. It's virtually impossible to tell you anything without that information.

#40600 08/08/03 08:50 PM
Joined: Jul 2003
Posts: 129
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 129
in aliases:

/title {
if (%titlebar == Off) { titleb %script v $+ %version }
if (%titlebar == On) {
if ($server == $null) { titleb %script v $+ %version - disconnected }
if ($server != $null) {
if (%away == On) { titleb %script v $+ %version - ( $+ $me $+ ) (lag: %lags secs on $server ) (away) }
if (%away == Off) { titleb %script v $+ %version - ( $+ $me $+ ) (lag: %lags secs on $server ) } }
}
}


.titlebm .timer222 0 1 title

correction {
var %corr1 = 1, %corr.temp = $replace($editbox($active),$chr(32),$chr(31))
if ($right(%corr.temp,1) = $chr(31)) var %corredit -ap
else var %corredit -a
:loop
if ($count($editbox($active),$chr(32)) >= %corr1) var %corrok = $gettok($editbox($active),%corr1,32)
else return
if (%corrok) {
var %corneword $readini -n $mircdirsystem\correction.ini correction %corrok
if ($isupper(%corrok)) var %corneword $upper(%corneword)
if (%corneword) editbox %corredit $reptok($editbox($active),%corrok,%corneword,32)
inc %corr1
goto loop
}
}
correctionow { .timercorrection -m 0 400 correction }
correctionstop { .timercorrection off }

/lagtest if ($server = $null) { halt } | .raw -q pong $server $server | .msg $me Lagt $ticks
/lagnow { .timerlag 0 20 lagtest }
/lagstop { .timerlag off | .timerlags off }

#40601 09/08/03 02:59 AM
C
CyBot
CyBot
C
That actually works?
smile

#40602 09/08/03 05:14 AM
Joined: Jun 2003
Posts: 129
O
Vogon poet
Offline
Vogon poet
O
Joined: Jun 2003
Posts: 129
I simple use an updating timer the timer triggers once when I receive a reply from the server.
Code:
on *:connect:lagbar
alias lagbar {
  window -Bphk +d @LagBar 0 0 75 24
  dll tbwin.dll Attach @lagbar 
  var %z = $dll(tbwin.dll, GetTBInfo, NOT_USED), %w = $gettok(%z, 1, 32), %h = $gettok(%z, 2, 32)
  lagmove %w %h
  dll tbwin.dll OnSize /lagmove
  drawrect -nrf @lagbar $rgb(face) 1 0 0 500 500
  lagchk
  window -a @lagbar
}
alias lagmove window @lagbar $calc($1 - 80) $int($calc(($2 - 24) / 2)) 75 24
alias lagdisp {
  var %t = Latency: $1 $+ s
  drawrect -nrf @lagbar $rgb(face) 1 0 0 500 500
  drawtext -n @lagbar 1 Tahoma -7 $int($calc((75 - $width(%t, Tahoma, -7)) / 2)) 13 %t
  drawrect -n @lagbar 1 1 0 2 75 12
  drawrect -nf @lagbar 10 1 2 4 $int($calc($1 * 71)) 8
  drawdot @lagbar
}
alias lagchk .notice $me lagchk $ticks
on me:^*:notice:lagchk &:?:{
  lagdisp $round($calc(($ticks - $2) / 1000),2)
  .timerlagchk -i 1 3 lagchk
  haltdef
}

#40603 09/08/03 09:02 PM
Joined: Jul 2003
Posts: 129
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 129
nah, nothing is improved, still the same crap frown

#40604 10/08/03 05:51 AM
Joined: May 2003
Posts: 215
L
Fjord artisan
Offline
Fjord artisan
L
Joined: May 2003
Posts: 215
For the timer you're using to check the lag, just simply add "scid $!activecid" to the front of the alias...
Example:
/.timerLag 0 5 scid $!activecid /checklag

This will make sure that the command is triggered on the active connection.

Also, look at this line from the mIRC help file...

/timer[N/name] [-ceomhipr] [time] <repetitions> <interval> <command>

The -i switch makes a timer dynamically associate with whatever happens to be the active connection. If a server window is closed, the timer is associated with the next available server window.

#40605 02/09/03 10:35 AM
Joined: Jul 2003
Posts: 129
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 129
nope, it wont work :P

#40606 07/09/03 11:09 PM
Joined: Jul 2003
Posts: 129
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 129
okay itz fixed, thanx goes to scatman in this case + other who helped


Link Copied to Clipboard