Karvarausku

Karvarausku

Joined
Dec 19, 2014

Activity Stream

Karvarausku   -  Dec 19, 2014

Hey guys. I'm working on a ranking system which core I got from here and it looks like this.

on *:text:!rank:#:{
if ($readini(points.ini,$nick,points) <= 9) { msg # $nick you are rank1 with $readini(points.ini,$nick,points) points. Earn $calc(10 - $readini(points.ini,$nick,points)) More points To Become a Rank2 }
if ($readini(points.ini,$nick,points) > 9) && ($readini(points.ini,$nick,points) <= 19) { msg # $nick you are rank2 with $readini(points.ini,$nick,points) points. Earn $calc( 20 - $readini(points.ini,$nick,points)) More points To Become a Rank3 }
if ($readini(points.ini,$nick,points) > 19) && ($readini(points.ini,$nick,points) <= 29) { msg # $nick you are rank3 with $readini(points.ini,$nick,points) points. Earn $calc( 30 - $readini(points.ini,$nick,points)) More points To Become a Rank4 }
if ($readini(points.ini,$nick,points) > 29) && ($readini(points.ini,$nick,points) <= 39) { msg # $nick you are rank4 with $readini(points.ini,$nick,points) points. Earn $calc( 40 - $readini(points.ini,$nick,points)) More points To Become a Rank5 }
if ($readini(points.ini,$nick,points) > 39) && ($readini(points.ini,$nick,points) <= 49) { msg # $nick you are rank5 with $readini(points.ini,$nick,points) points. Earn $calc( 50 - $readini(points.ini,$nick,points)) More points To Become a Rank6 }
}

Now this one didn't work right away for me atleast so I did some "fine tuning" with my crappy coding skills that turend into horrible monster like this.

On *:text:!rank:#:{
if $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0) <= 9)) { msg # $nick you are rank1 with $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0) Points. Earn $calc( 10 - $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0)) More Points To Become a Rank2 }
if $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0) > 19)) && $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0) <= 29) { msg # $nick you are rank2 with $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0) Points. Earn $calc( 30 - $iif($readini(Points.ini,$+(#,.,$nick),Points),$v1,0)) More Points To Become a Rank3 }
}

Now what this code of piece actually does is when I type !rank it reports me with "karvarausku you are rank1 with 11 Points. Earn -1 More Points To Become a Rank2"

So guys, do I actually need all the $iif and $v1,0? If I take them away the code stops working completely tho...

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.