Advertisement
OrFeAsGr

Points System by OrFeAsGr

Jan 2nd, 2017
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.31 KB | None | 0 0
  1. ON *:TEXT:*:#: {
  2.   tokenize 32 $strip($1-)
  3.   if ($istok(!points+ !points- !resetpoints,$1,32)) {
  4.     if ($nick isop $chan) {
  5.       if ($1 == !resetpoints) { tokenize 32 !resetpoints $nick }
  6.       if ($3) {
  7.         if ($1 == !points+) {
  8.           .timer 1 1 msg $chan $nick gave $3 points to $+($2,!!!) $iif($4-, $+($chr(40),Reason: $4-,$chr(41)), $null) $iif(!$($+(%,points.,$2),2), $+($chr(40),$2,'s first points!,$chr(41)), $+($2,'s new points: $calc($v1 + $3)))
  9.           inc $+(%,points.,$2) $3
  10.           set %pointslatest + $nick $2 $3 $date $time $ctime
  11.         }
  12.         if ($1 == !points-) {
  13.           .timer 1 1 msg $chan $nick took away $3 points from $+($2,...) $iif($4-, $+($chr(40),Reason: $4-,$chr(41)), $null) $+($2,'s new points: $calc($($+(%,points.,$2),2) - $3))
  14.           dec $+(%,points.,$2) $3
  15.           set %pointslatest - $nick $2 $3 $date $time $ctime
  16.         }
  17.       }
  18.       elseif (!$3) { msg $chan $1 USAGE: $1 nick points reason }
  19.       if ($1 == !resetpoints) {
  20.         if (!%resetpoints) {
  21.           inc -u200 %resetpoints 1
  22.           .timer 1 1 msg $chan This command will 4delete all the points of all users. If you really want to continue with this type $1 again.
  23.         }
  24.         elseif (%resetpoints == 1) {
  25.           inc -u120 %resetpoints 1
  26.           .timer 1 1 msg $chan Just checking to be sure... Using this command will 4delete all points! If you use $1 one more time they will be 4deleted.
  27.         }
  28.         elseif (%resetpoints == 2) {
  29.           unset %resetpoints
  30.           .timer 1 1 msg $chan All the points were deleted.
  31.           unset %points.*
  32.           unset %pointslatest
  33.         }
  34.       }
  35.     }
  36.     elseif ($nick !isop $chan) {
  37.       .timer 1 1 msg $chan You need to be opped to use !points+ or !points- or !resetpoints
  38.     }
  39.   }
  40.   if ($1 == !pointslatest) {
  41.     tokenize 32 %pointslatest
  42.     .timer 1 1 msg $chan Last Points Activity: $2 $iif($1 == -, took away $4 points from, gave $4 points to) $3 at $5 $6 $+($chr(40),$duration($calc($ctime - $7)) ago,$chr(41))
  43.   }
  44.   if ($1 == !getpoints) {
  45.     var %n = $iif($2, $v1, $nick)
  46.     if ($($+(%,points.,%n),2)) {
  47.       .timer 1 1 msg $chan $+(%n,'s) Points: $v1
  48.     }
  49.     else {
  50.       .timer 1 1 msg $chan $iif($2, There are not points for this nick..., You haven't got any points yet $nick)
  51.     }
  52.   }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement