!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 } } ```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.
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 :)