Jump to content

[SOLVED] Ranking Players


MasterACE14

Recommended Posts

Good Afternoon Everyone,

 

I have a Text MMORPG, and I am trying to figure out how to "Rank" all the players, basically, each player has a strikeaction, defenceaction and covertaction column in the database, and I want to assign an Integer(their rank) to each player depending on what their 3 actions added together are.

 

So the person who would be Ranked "1", would have the highest action(when strike, defence and covert are added together). And the lowest person would have the smallest action etc.

 

Now, what I would like to do, is add a "Rank" column to the database for each user, and have each hour(my cronjob) update their "rank" column with an integer, depending on what their total action is compared to every other player.  ;)

 

How would I go about this?

 

Regards ACE

Link to comment
https://forums.phpfreaks.com/topic/74548-solved-ranking-players/
Share on other sites

Just have their scores update the "rank" column, if they have more points in the rank column, higher overall player rank they are.

 

So (going off runescape stats, I know funny...)

 

attack + defence + strength = 99 (at one hour in the day)

 

another hour it adds up to 105

 

105+99 = 204 ( i think )

 

204 > a person with 156 so 204 is a higher rank.

 

Am I on the right track?

this is true, but still need to have unique values, if more 1 player has the same actions, then it should just go by alphabetical order, for those with the same or something, I have seen many websites work the rankings in this similar way.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.