number/letter counter

By PuNkTuReD on Feb 08, 2010

quite simple.
this snippet counts
number/letters that you type

to check ur stats
//echo -a %mIRCstats
or
//msg $active %mIRCstats

/*
Number/Letter counter
By PuNkTuReD
http://www.sassirc.com
*/
on 1:input:*: {
  var %a = 0:1:2:3:4:5:6:7:8:9:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z, %b = $numtok(%a,58), %d = %b
  while (%b) { var %c = $gettok(%a,%b,58) | inc $+(%,c,%c) $count($1-,%c) | dec %b }
  while (%d) { var %e = $gettok(%a,%d,58), %f = %e = $+($($+(%,c,%e),2),$chr(44)) %f | dec %d }
  set %mIRCstats My total number/letter count: %f
}

Comments

Sign in to comment.
PuNkTuReD   -  Feb 08, 2010

true but at the time i made this, it was for a "shortest code" competition, so this was shorter, however ill edit it and get it back here.

 Respond  
napa182   -  Feb 08, 2010

maybe you should use hash for this cuz having it set 36 global vars is a bit too much.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.