mIRC Home    About    Download    Register    News    Help

Print Thread
#170563 11/02/07 01:38 AM
Joined: Mar 2006
Posts: 25
T
tekano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Mar 2006
Posts: 25
I'm looking for something that counts how many words I've spoken.
In private and in channels. From a start date so I can have an option to see the average of words spoken / day.

tekano #170564 11/02/07 02:08 AM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
I don't know how I would make it so it would show how many you speak in average, but, I can make one that shows day by day, if I keep working on it, I'll probably find a way to make it find the average words, but, I'm pretty sure that someone will come up before me, I'll post again in a little while.


-Kurdish_Assass1n
tekano #170565 11/02/07 02:35 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
To count words:

Code:
on *:input:*: {
  inc %TotalWords $numtok($1-,0,32)
}


For average, you'll use $calc after setting %TotalWords.StartDate to the start date:

To set your start date to the current date/time (type once):
Code:
//set %TotalWords.StartDate $ctime


To get your averages (these are the calculations you'll insert wherever you want them):
Per day:
Code:
$calc(%TotalWords / ($ctime - %TotalWords.StartDate) * 86400)


Per week:
Code:
$calc(%TotalWords / ($ctime - %TotalWords.StartDate) * 604800)


Now, you can place those $calc commands wherever you'd like them. Here are a couple examples:

In an alias (just type /avgwords whenever you want to see the data):
Code:
alias avgwords {
  echo -a $calc( )   <--- Insert the $calc command you want as well as whatever text you want it to say.
}


In a menu (right click and choose Average Words):
Code:
menu * {
  Average Words:echo -a $calc( )   <--- Insert the $calc command you want as well as whatever text you want it to say.
}


Invision Support
#Invision on irc.irchighway.net
Riamus2 #170569 11/02/07 03:16 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
That should be:

Code:
inc %words $numtok($1-,32)


However you could just use:

Code:
inc %words $0

hixxy #170574 11/02/07 05:04 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Oops... I was tired. I was thinking of $gettok instead of $numtok for formatting. And I couldn't remember the $0. I could only think of $N, which I knew was not right. wink

Thanks.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #170582 11/02/07 09:38 AM
Joined: Mar 2006
Posts: 25
T
tekano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Mar 2006
Posts: 25
thanks a lot smile I knew it had to be something this simple.


Link Copied to Clipboard