mIRC Home    About    Download    Register    News    Help

Print Thread
#86990 15/06/04 08:37 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
I'm a very noob at scripting. but is there a way to count the words on a channel?

on *:text:*:#:{
set %words
}
on *:text:!words:#:{
Its been typed %words of words here!
}

or sumthing..?


Signature:
I'm boring, ain't I? Oh well...:|
#86991 15/06/04 08:39 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
on *:TEXT:*:#: set %words %words $1-

on *:text:!words:#:{
 var %typed = $numtok(%words,32)
 msg # Its been typed %typed of words here!
}
This is untested, but should work.

Zyzzy smile


"All we are saying is give peace a chance" -- John Lennon
#86992 15/06/04 08:42 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
on *:text:*:#:{
inc %words $+ $chan $0
if $1 == !words { msg $chan %word [ $+ [ $chan ] ] words have been said here }
}

edit:
Zyzzyx26: that would work, but mIRC's variable character limit is too small for this task, that also keeps a count of all words on all channels, instead of a counter for each channel.

Last edited by tidy_trax; 15/06/04 08:45 PM.

New username: hixxy
#86993 15/06/04 08:49 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
Thanks, but now I got a problem..:

<GalaxeY> !words
<GalaxeYBot> 4 words have been said here
<GalaxeY[TPS]> !words
<EWatsonBot> 5 words have been said here

Thats a probelem. how to do that? if typed !words, it not count !words?


Signature:
I'm boring, ain't I? Oh well...:|
#86994 15/06/04 08:51 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Very true, thanks! smile Didn't think about that!


"All we are saying is give peace a chance" -- John Lennon
#86995 15/06/04 09:08 PM
Joined: Dec 2002
Posts: 11
D
Pikka bird
Offline
Pikka bird
D
Joined: Dec 2002
Posts: 11
on *:text:*:#:{
if $1 == !words { msg $chan %word [ $+ [ $chan ] ] words have been said here }
else inc %words $+ $chan $0
}


DixrouE
#86996 15/06/04 09:11 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
Thanks! But..

<GalaxeY> !words
<GalaxeYBot> words have been said here
<GalaxeY> s
<GalaxeYBot> 1 words have been said here

can it be like if %words = 0 halt or sumthing?


Signature:
I'm boring, ain't I? Oh well...:|
#86997 15/06/04 09:24 PM
Joined: Dec 2002
Posts: 11
D
Pikka bird
Offline
Pikka bird
D
Joined: Dec 2002
Posts: 11
on *:text:*:#:{
if ($1 == !words) && (%word [ $+ [ $chan ] ]) { msg $chan %word [ $+ [ $chan ] ] words have been said here }
else inc %words $+ $chan $0
}


DixrouE
#86998 15/06/04 09:27 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
Thanks ALOT DixrouE!!!!!!


Signature:
I'm boring, ain't I? Oh well...:|

Link Copied to Clipboard