mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
I have, with help from here managed to compile some script but not working properly. Please help with suggestions to simplify or correct. Think the problem maybe with the timerresetstats not ON or something. My script pertaining to the problem: mIRC 6.35

Quote:
/*
Commands:
!stats [nick] => Overall stats for $nick|$2 in $network@#Channel
!top10 => Overall top 10 chatters in $network@channel
!tstats [nick] => Today's stats about $nick|$2
!ttop10 => Today's top 10 chatters in $network@#Channel
!delstats <nick> => Removing statistics about $2 in $network@#Channel
!clearstats => Removing all statistics collected for $network@#Channel
!ResetDaily => Reset daily stats
!ResetDailyNow => Reset daily stats in real time
*/

;the one that I'm struggling with is: ;!ResetDaily Reset daily stats

;==========
ON *:TEXT:*:#: {
if %stats_module == On {
IF ($1 == %c $+ top10) {
IF (%stats_floodpro >= 3) {
halt
}
inc -u30 %stats_floodpro 1
msg $chan $maketop10($network $+ @ $+ $chan)
unset %stats_top10_*
window -c @top10source
}
;========== if !ResetDaily is excecuted
if %stats_module == On {
IF ($1 == %c $+ ResetDaily) {
IF (%stats_floodpro >= 3) {
halt
}
inc -u30 %stats_floodpro 1
dailystatsflush

;=========== connect to network load stats
ON *:CONNECT: {
statload
if (%stats_module == $null) set %stats_module on
timerresetstats 23:59 1 60 dailystatsflush
}
;=========== disconnect from network save AND clear stats
ON *:DISCONNECT: {
echo -a ::: Stats ::: Storing stats.
statsave
}

ALIAS dailystatsflush {
timerresetstats 23:59 0 60 todaystatclear
todaystatclear
msg #ops today's stats will be cleared when the bot disconnects
}
;=========== action on disconnect from network
ALIAS todaystatclear {
hfree -w todaytotal*
hmake todaytotalwords 10
hmake todaytotalletters 10
hmake todaytotalcommands 10
hmake todaytotalactions 10
hmake todaytotallines 10
}

Last edited by raycomp; 24/07/14 07:33 AM.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Which part isn't working? Can you give us some more information?

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Don't you need closing brackets in that on text...and you've repeated the if %stats...

Code:
/*
Commands:
!stats [nick] => Overall stats for $nick|$2 in $network@#Channel
!top10 => Overall top 10 chatters in $network@channel
!tstats [nick] => Today's stats about $nick|$2
!ttop10 => Today's top 10 chatters in $network@#Channel
!delstats <nick> => Removing statistics about $2 in $network@#Channel
!clearstats => Removing all statistics collected for $network@#Channel
!ResetDaily => Reset daily stats
!ResetDailyNow => Reset daily stats in real time
*/

;the one that I'm struggling with is: ;!ResetDaily Reset daily stats

;==========
ON *:TEXT:*:#: {
  if %stats_module == On {
    if ($1 == %c $+ top10) {
      if (%stats_floodpro >= 3) { halt }
      inc -u30 %stats_floodpro 1
      msg $chan $maketop10($network $+ @ $+ $chan)
      unset %stats_top10_*
      window -c @top10source
    }
    ;========== if !ResetDaily is excecuted
    if ($1 == %c $+ ResetDaily) {
      if (%stats_floodpro >= 3) { halt }
      inc -u30 %stats_floodpro 1
      dailystatsflush
    }
  }
}
;=========== connect to network load stats
ON *:CONNECT: { 
  statload 
  if (%stats_module == $null) set %stats_module on
  timerresetstats 23:59 1 60 dailystatsflush
} 
;=========== disconnect from network save AND clear stats
ON *:DISCONNECT: { 
  echo -a ::: Stats ::: Storing stats. 
  statsave 
} 

ALIAS dailystatsflush {
  timerresetstats 23:59 0 60 todaystatclear 
  todaystatclear 
  msg #ops today's stats will be cleared when the bot disconnects
}
;=========== action on disconnect from network
ALIAS todaystatclear {
  hfree -w todaytotal*
  hmake todaytotalwords 10
  hmake todaytotalletters 10
  hmake todaytotalcommands 10
  hmake todaytotalactions 10
  hmake todaytotallines 10
}

Last edited by Belhifet; 01/08/14 12:01 AM.
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
problem with the timers if i checke /timers shows no active timers


Link Copied to Clipboard