User Stats

By MartyniP on Apr 05, 2010

!ustats

Example

!ustats MartyniProductions <^MARTYNI^> MartyniProductions: MartyniProductions Has Writen 1864 lines. ```mirc ; Created by Martyni Productions ; http://www.martynip.co.cc ; irc.geekshed.net/martyni on *:text:!ustats*:#: { if (%lines- [ $+ [ $2 ] ] != $null) { msg $chan $nick $+ : $2 Has Writen %lines- [ $+ [ $2 ] ] lines. } else { msg $chan $2 Has Writen 0 Lines } } on *:text:*:#: { if (%lines- [ $+ [ $nick ] ] != $null) { %lines- [ $+ [ $nick ] ] = $calc(%lines- [ $+ [ $nick ] ] + 1) } else { %lines- [ $+ [ $nick ] ] = 1 } } ```

Comments

Sign in to comment.
SimplicityX   -  Aug 26, 2010

Why would someone have "0" lines if typing "!ustats" can count as a line itself? Have it inc the persons line before typing it, that way if they are checking their own lines it will give them that line as well.

 Respond  
GrimReaper   -  Aug 25, 2010

Look's like a good script.. I would possibly do it in this way and make it one on *:TEXT: event

on *:TEXT:*:#: {
  if ($1 == !ustats) {
    if (!$2) { msg $chan $+($nick,:) You have written $iif(!%lines- [ $+ [ $nick ] ],0,%lines- [ $+ [ $nick ] ]) line(s). }
    else {
      msg $chan $+($nick,:) $2 has written $iif(!%lines- [ $+ [ $2 ] ],0,%lines- [ $+ [ $2 ] ]) line(s).
    }
  }
  else {
    inc %lines- [ $+ [ $nick ] ]
  }
}

NOTE: This is untested.. Just thrown together.

 Respond  
jackster35-1   -  Aug 25, 2010

Good script.

here:

on *:text:!ustats*:#: {
if (%lines- [ $+ [ $2 ] ] != $null) {
    msg $chan $nick $+ : $2 Has Writen %lines- [ $+ [ $2 ] ] lines.
}
else {
    msg $chan $2 Has Writen 0 Lines
}
}

Could be:

on *:text:!ustats*:#: {
    msg $chan $nick $+ : $2 Has Writen $iif(!%lines- [ $+ [ $2 ] ],0,%lines- [ $+ [ $2
] ]) line(s).
}

That would return 0 if the variable is $null :)

 Respond  
MashhitDK   -  Apr 18, 2010

Thanks...

Am gonna grab this...

 Respond  
Jethro   -  Apr 05, 2010

You can use

/inc %lines

in place of the $calc() to increase the count.

 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.