Checks your lag every [x] seconds when you connect. You can also get it echoed when you right-click the channel menu and go to Lag check. Many other options are configurable there as well, please take your time to setup otherwise you might receive a few errors. Thanks in advance.
Usage:
Enable script: channel right-click -> Enable
Disable script: channel right-click -> Disable
The number of seconds before it updates the titlebar: channel right-click -> Check every [x] seconds -> Enter time in seconds (recommended to be a little higher)
Check your lag: channel right-click -> Check
Note: When you quit or disconnect, it unsets the %temp_t variable and halts the timer.
; *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
; ~ Lag check
; * RubixCube
; ~
; * Contact
; ~ Email
; * rub1xcube@yahoo.com
; ~
; *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
on *:connect:{
if (%_lag_conf_ = on) && (%lag_time) .timerl_check 0 %lag_time /form_lag_
}
alias form_lag_ {
if (%_lag_conf_ = on) {
set %temp_t $ticks
.raw ping %temp_t
titlebar Lag: $+($calc($calc($ticks - %temp_t) / 1000),sec)
}
}
alias lag_ {
if (%_lag_conf_ = on) {
set %temp_t $ticks
.raw ping %temp_t
}
}
on ^*:PONG:{
var %u $calc($ticks - %temp_t)
echo $colour(info) -a Lag on $server is: $+($calc(%u / 1000),$chr(32),seconds,.)
}
on *:disconnect: .timer1_check off | unset %temp_t
on *:quit: .timer1_check off | unset %temp_t
menu channel {
Lag check:
.Enable:set %_lag_conf_ on
.Disable:set %_lag_conf_ off
.Check every [x] minutes:{
var %c $$?="Enter time in seconds:"
set %lag_time %c
if ($timer(l_check)) .timerl_check off
.timerl_check 0 %lag_time /form_lag_
}
.Check:lag_
}
on *:load: echo $colour(info) -a Please take your time to configure everything through the channel menu. Thank you.