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..?
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
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.
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?
on *:text:*:#:{
if $1 == !words { msg $chan %word [ $+ [ $chan ] ] words have been said here }
else inc %words $+ $chan $0
}
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?
on *:text:*:#:{
if ($1 == !words) && (%word [ $+ [ $chan ] ]) { msg $chan %word [ $+ [ $chan ] ] words have been said here }
else inc %words $+ $chan $0
}
Thanks ALOT DixrouE!!!!!!