- Joined
- Jun 28, 2006
- Messages
- 285
- Reaction score
- 165
Hey all,
Here's a ranking script I built from scratch today, was a fun little project, so I decided to share it out with everyone. It's built with command prompt cron jobs in mind, but it will also run in a browser (be aware that browser scripts can time out if there are too many users). Supplement your own "config.php" or add code in its place at the top to connect to your MySQL server.
If you don't want it to run any guild updates, set $runguildupdate = 0; on line 11, as this takes up the most resources, and every server probably has their own way of setting up guilds, anyways (but you can use my version, see SQL script below).
Features:
- More code-efficient than other rank updaters on this site
- Total and Season Ranking
- Easy to edit and modify
- The top 21 users do not get a dragon rank until they have at least 6900 GP.
- Unique Guild scoring and ranking system
PHP Script:
For the guild portion to work properly without making any adjustments to the above script, here is the SQL to create the "guild" table.
Guild Script:
Example of how the script calculates dragons. Only those with 6900 or more GP will be eligible for the dragon rank, which makes it good for new servers.
Sorry for the external links, RaGEZONE is breaking the code when copy-pasted with the PHP and CODE BB codes.
Enjoy.
Here's a ranking script I built from scratch today, was a fun little project, so I decided to share it out with everyone. It's built with command prompt cron jobs in mind, but it will also run in a browser (be aware that browser scripts can time out if there are too many users). Supplement your own "config.php" or add code in its place at the top to connect to your MySQL server.
If you don't want it to run any guild updates, set $runguildupdate = 0; on line 11, as this takes up the most resources, and every server probably has their own way of setting up guilds, anyways (but you can use my version, see SQL script below).
Features:
- More code-efficient than other rank updaters on this site
- Total and Season Ranking
- Easy to edit and modify
- The top 21 users do not get a dragon rank until they have at least 6900 GP.
- Unique Guild scoring and ranking system
PHP Script:
You must be registered to see links
For the guild portion to work properly without making any adjustments to the above script, here is the SQL to create the "guild" table.
Guild Script:
You must be registered to see links
Example of how the script calculates dragons. Only those with 6900 or more GP will be eligible for the dragon rank, which makes it good for new servers.
Sorry for the external links, RaGEZONE is breaking the code when copy-pasted with the PHP and CODE BB codes.
Enjoy.
Attachments
You must be registered for see attachments list
Last edited: