mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2014
Posts: 20
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Mar 2014
Posts: 20
i have a normal points system but idk how to make it where it can have people to be able to !rank and say like if they have the most points they the bot will say nick is rank 1 out of how every many people or set number. but it has to be dynamic so it changes so if someone else gets more points they become rank one and it would also assign a rank to everyone else depending on there amount of points so the next highest would be rank 2 and so on.
heres my current points system http://pastebin.com/SPXcZ68a
if someone could help that would be great

Joined: Jul 2014
Posts: 1
3
Mostly harmless
Offline
Mostly harmless
3
Joined: Jul 2014
Posts: 1
I had the same problem with my ranking system, but I found a simple fix that works for me!


I did
Code:
on *:text:!rank:#: {
if ($readini(Points.ini,$+(#,.,$nick),Points) >= 0 && $readini(Points.ini,$+(#,.,$nick),Points <= 9) {
 msg $chan $nick you are rank1 with $readini(Points.ini,$+(#,.,$nick),Points) points!
}
elseif ($readini(Points.ini,$+(#,.,$nick),Points) >= 10 && $readini(Points.ini,$+(#,.,$nick),Points) <= 19) {
 msg $chan $nick you are rank2 with $readini(Points.ini,$+(#,.,$nick),Points) points!
}
}


All you would need to do to add more ranks is copy the elseif and change the >= amount and the <= amount to how much points you want the person to need and then change the "rank2" to what ever you want the users rank to be.

But that's how I did it, and is probably the most un-needed and slow way, but that's just me. But one of the more experienced people may have a better way, I dunno.

Also you want to to have sort of a max rank, just put and change the >= to the number of points you want it to be!
Code:
elseif ($readini(Points.ini,$+(#,.,$nick),Points) >= 10) {
 msg $chan $nick you are rank2 with $readini(Points.ini,$+(#,.,$nick),Points) points!
}


Sorry if this is confusing, this is my first time trying to explain this to anyone.

Joined: Jul 2014
Posts: 8
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2014
Posts: 8
Maybe this will help you
Code:
on *:text:!rank:#:{
  if ($readini(Points.ini,$+(#,.,$nick),Points) <= 49) { msg # $nick you are rank 1 with $readini(Points.ini,$+(#,.,$nick),Points) points. Get $calc(50 - $readini(Points.ini,$+(#,.,$nick),Points)) or more points for Rank 2 }
  if ($readini(Points.ini,$+(#,.,$nick),Points) > 49) && ($readini(Points.ini,$+(#,.,$nick),Points) <= 99) { msg # $topic you are rank 2 with $readini(Points.ini,$+(#,.,$nick),Points) points. Get $calc( 100 - $readini(Points.ini,$+(#,.,$nick),Points)) or more points for Rank 3 }
  if ($readini(Points.ini,$+(#,.,$nick),Points) > 99) && ($readini(Points.ini,$+(#,.,$nick),Points) <= 299) { msg # $topic you are rank 3 with $readini(Points.ini,$+(#,.,$nick),Points)points. Get $calc( 300 - $readini(Points.ini,$+(#,.,$nick),Points)) or more points for Rank 4 }

}

Joined: Mar 2014
Posts: 20
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Mar 2014
Posts: 20
well the way i needed it to work is for it to look at the points.ini file and give rank 1 to the highest person and then the next highest gets rank 2 and so on but not with a fixed value like both of you have since the points are always changing. if that makes sense.

Joined: Jul 2014
Posts: 48
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
the way people have posted so far, does not appear to be a dynamic changing rank database, it only checks and gives ranks to people based on pre-defined rank/points.

I'm not sure how to make it dynamic, but to give people ranks, you just check how many points they have, and give them a rank based on that. Using an if statement per each rank, as shown in the above posts


Link Copied to Clipboard