mIRC Homepage
Posted By: anarres channel uptime - 03/07/05 09:37 PM
I have a script (made by one forum helper), but I want to know wich variables I've to change to put 6 users, or 10, because I can't

;

;Designed to be run on multiple channels but only one at any one time.

;

on *:input:#:{ if ($1- == !scan) { mass.whois $chan } }

on 20:text:!scan:#:{ mass.whois $chan }

;

; $1 = $chan

alias mass.whois {

if (!%mass.whois) {

set $+(-u,$calc($nick($1,0) * 2 + 4)) %mass.whois $true

.timer.mass.whois.result 1 $calc($nick($1,0) * 2 + 2) mass.whois.results $1

var %i = $nick($1,0)

while (%i) {

.timer 1 $calc(%i * 2) whois $nick($1,%i) $nick($1,%i)

dec %i

}

set %uptime.top4

}

}

;

;$2 = nick

;$4 = connect time?

raw 317:*:{ set %uptime.top4 $gettok($replace($gettok($sorttok($cr $cr $cr $cr %uptime.top4 $+($right($+(0000000000,$calc($ctime - $4)),10),@,$2),32),-4-,32),$cr,$chr(32)),1-,32) }

;

; $1 = $chan

; %uptime.top4 = [email]0000000001@nickA[/email] [email]0000000002@nickB[/email] [email]0000000003@nickC[/email] [email]0000000004@nickD[/email] (maybe less than 4 nicks total)

alias mass.whois.results {

set %uptime.top4.nicks

set %uptime.top4.times

var %i = $numtok(%uptime.top4,32)

while (%i) {

set %uptime.top4.times %uptime.top4.times $calc($gettok($gettok(%uptime.top4,%i,32),1,64))

set %uptime.top4.nicks %uptime.top4.nicks $gettok($gettok(%uptime.top4,%i,32),2,64)

dec %i

}

unset %uptime.top4

echo -s Top 4 uptimes on $1 are %uptime.top4.times amb un temps de $duration($calc(%uptime.top4.times))

echo -s Top 4 uptime nicks on $1 are %uptime.top4.nicks

write -c c:\stadistiques\up.txt Uptimes
write c:\stadistiques\up.txt 1r lloc hi ha $gettok(%uptime.top4.nicks,1,32) amb un temps de $duration($calc($gettok(%uptime.top4.times,1,32)))
write c:\stadistiques\up.txt 2n lloc hi ha $gettok(%uptime.top4.nicks,2,32) amb un temps de $duration($calc($gettok(%uptime.top4.times,2,32)))
write c:\stadistiques\up.txt 3r lloc hi ha $gettok(%uptime.top4.nicks,3,32) amb un temps de $duration($calc($gettok(%uptime.top4.times,3,32)))
write c:\stadistiques\up.txt 4rt lloc hi ha $gettok(%uptime.top4.nicks,4,32) amb un temps de $duration($calc($gettok(%uptime.top4.times,4,32)))
play #la_penya_del_pollastre c:\stadistiques\up.txt 500


; ^ do what you well here

}


thanx
Posted By: DaveC Re: channel uptime - 04/07/05 12:05 AM
I cant be sure if this works since i don get any RAW 317's and im to sleepy to check why.

The blue line allows you to change howmany there are. namely change the 8.

Code:
[color:blue]alias -l topXnumber { return 8 }[/color]
;
;Designed to be run on multiple channels but only one at any one time.
;
on *:input:#:{ if ($1- == !scan) { mass.whois $chan } }
on 20:text:!scan:#:{ mass.whois $chan }
;
; $1 = $chan
alias mass.whois {
  if (!%mass.whois) {
    set $+(-u,$calc($nick($1,0) * 2 + 4)) %mass.whois $true
    .timer.mass.whois.result 1 $calc($nick($1,0) * 2 + 2) mass.whois.results $1
    var %i = $nick($1,0)
    while (%i) {
      .timer 1 $calc(%i * 2) whois $nick($1,%i) $nick($1,%i)
      dec %i
    }
    set %uptime.topX
  }
}
;
;$2 = nick
;$4 = connect time?
raw 317:*:{ set -s %uptime.topX $gettok($replace($gettok($sorttok($str($cr $+ $chr(32),$topXnumber) %uptime.top4 $+($right($+(0000000000,$calc($ctime - $4)),10),@,$2),32),$+(-,$topXnumber,-),32),$cr,$chr(32)),1-,32) }
;
; $1 = $chan
; %uptime.topX = 0000000001@nickA 0000000002@nickB 0000000003@nickC 0000000004@nickD  (maybe less than X nicks total) 
alias mass.whois.results {
  set %uptime.topX.nicks
  set %uptime.topX.times
  var %i = $numtok(%uptime.topX,32)
  while (%i) {
    set %uptime.topX.times %uptime.topX.times $calc($gettok($gettok(%uptime.topX,%i,32),1,64))
    set %uptime.topX.nicks %uptime.topX.nicks $gettok($gettok(%uptime.topX,%i,32),2,64)
    dec %i
  }
  unset %uptime.topX
  echo -s Top X uptimes on $1 are %uptime.topX.times amb un temps de $duration($calc(%uptime.topX.times))
  echo -s Top X uptime nicks on $1 are %uptime.topX.nicks
  write -c c:\stadistiques\up.txt Uptimes
  var %m = $numtok(%uptime.topX,32), %i = 1
  while (%i <= %m) {
    write c:\stadistiques\up.txt # $+ %i lloc hi ha $gettok(%uptime.topX.nicks,%i,32) amb un temps de $duration($calc($gettok(%uptime.topX.times,%i,32)))
    inc %i
  }
  play #la_penya_del_pollastre c:\stadistiques\up.txt 500
  ; ^ do what you well here
}
© mIRC Discussion Forums