Rating system

By Weasel on Jun 01, 2009

a simple system that lets users let others know how much they apperciate them
say !rate (nick) to rate !unrate(nick) to unrate and !rating to see their rating

on *:text:!rate*:#: {
  if ($2 != $nick) { inc %pnts 1 | writeini rate.ini $2 points %pnts | notice $nick $2 has been rated, }
  if ($2 == $nick) { notice $nick you cant rate yourself }
}
on *:text:!rating*:#: {
  notice $nick $2 has  $readini(rate.ini , $2 , points) points
}
on *:text:!unrate*:#: {
  inc %pnts -1 | writeini rate.ini $2 points %pnts | notice $nick $2 has had 1 Rating point removed
}

Comments

Sign in to comment.
PATX   -  Jun 12, 2009

meh i would use vars.

 Respond  
Weasel   -  Jun 03, 2009

yeah, still. inc $+ % $nick is a lot harders than writini...

 Respond  
WorldDMT   -  Jun 03, 2009

you can replace "inc %var -1" by "dec %var"

 Respond  
Weasel   -  Jun 02, 2009

i guess i could've done totall inc var i guess

 Respond  
Weasel   -  Jun 02, 2009

true. i could have done completly inc var i guess.

 Respond  
WorldDMT   -  Jun 02, 2009

hi

ini file for this type of code is not a good idea

try to do this and look into ini file

/writeini rate.ini [bamboo] points 10

u will find ~bamboo~ and not [bamboo]

 Respond  
Slickone   -  Jun 01, 2009

no need for 3 on text events. no need inc %pnts need check for nick on !rating !unrate you go in negs need check do just

on $*:text:/^(!(un)?rate(ing)?)\s?(\w+)?$/iS:#: {
  if ($regml(1) == !rate && $regml(2)) { .notice $nick $iif($regml(2) != $nick,$regml(2) has been rated,you cant rate yourself) | $iif($regml(2) != $nick,writeini rate.ini $regml(2) points $calc($readini(rate.ini,$regml(2),points) +1)) }
  elseif ($regml(1) == !rateing) { .notice $nick $iif(!$regml(3),$nick has $iif(!$readini(rate.ini,$nick,points),0,$readini(rate.ini,$nick,points)),$regml(3) has $iif(!$readini(rate.ini,$regml(3),points),0,$readini(rate.ini,$regml(3),points))) points. }
  elseif ($regml(1) == !unrate && $regml(3)) { .notice $nick $iif($readini(rate.ini,$regml(3),points) == 0,you cant take what they dont have,$regml(3) has had 1 Rating point removed) | $iif($readini(rate.ini,$regml(3),points) != 0,writeini rate.ini $regml(3) points $calc($readini(rate.ini,$regml(3),points) -1)) }
}
 Respond  
blitzz   -  Jun 01, 2009

i know Weasel is just playing around at this time..who knw maybe he made somthng amazing someday..rite Weasel lol

 Respond  
_Daniel_   -  Jun 01, 2009

You are improving your codes weasel ;)

 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.