Edit: Mini description: What this does, is it adds a column to your ranking, it doesn't mess up the table or make it look different. It shows your the number of rebirths.
If you do NOT have a rebirth column execute this
Ok, since i figured out how to do it, and i realized many people don't have this i decided to release it.Code:ALTER TABLE `characters` ADD COLUMN `rebirth` int(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `pvpdeaths`;
This is only for DarkMagic's ranking which can be found Here
First off,
Find this line
And replace it with thisCode:$result2 = mysql_query("SELECT level, exp, characters.name name, meso, job, fame, logo, logoColor, guilds.name guildname, logoBG, logoBGColor, COUNT(eventstats.characterid) wins FROM accounts, characters LEFT JOIN guilds ON guilds.guildid = characters.guildid LEFT JOIN eventstats ON characters.id=eventstats.characterid WHERE characters.gm = 0 AND accountid = accounts.id AND banned = 0 ".$show." GROUP BY characters.id DESC ORDER BY $order level DESC, exp DESC")
Next, find this line.Code:$result2 = mysql_query("SELECT level, rebirth, exp, characters.name name, meso, job, fame, logo, logoColor, guilds.name guildname, logoBG, logoBGColor, COUNT(eventstats.characterid) wins FROM accounts, characters LEFT JOIN guilds ON guilds.guildid = characters.guildid LEFT JOIN eventstats ON characters.id=eventstats.characterid WHERE characters.gm = 0 AND accountid = accounts.id AND banned = 0 ".$show." GROUP BY characters.id DESC ORDER BY $order rebirth DESC, level DESC, exp DESC")
And replace it with this,Code:$result = mysql_query("SELECT level, exp, characters.name name, meso, job, fame, logo, logoColor, guilds.name guildname, logoBG, logoBGColor, COUNT(eventstats.characterid) wins FROM accounts, characters LEFT JOIN guilds ON guilds.guildid = characters.guildid LEFT JOIN eventstats ON characters.id=eventstats.characterid WHERE characters.gm = 0 AND accountid = accounts.id AND banned = 0".$show." GROUP BY characters.id DESC ORDER BY $order level DESC, exp DESC LIMIT $start, ".$page_records)
Next, find this lineCode:$result = mysql_query("SELECT level, rebirth, exp, characters.name name, meso, job, fame, logo, logoColor, guilds.name guildname, logoBG, logoBGColor, COUNT(eventstats.characterid) wins FROM accounts, characters LEFT JOIN guilds ON guilds.guildid = characters.guildid LEFT JOIN eventstats ON characters.id=eventstats.characterid WHERE characters.gm = 0 AND accountid = accounts.id AND banned = 0".$show." GROUP BY characters.id DESC ORDER BY $order rebirth DESC, level DESC, exp DESC LIMIT $start, ".$page_records)
Replace it with this.Code:echo "<tr valign=\"bottom\"> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Rank </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Character </b></font></td> <td align =\"center\" bgcolor='".$title_bar."' width = 100><font color=\"".$title_font."\"><b> Name </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Fame </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> FoJ </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Job Class </b></font></td> <td align =\"center\" bgcolor='".$title_bar."' width = 100><font color=\"".$title_font."\"><b> Level </b></font></td> </tr>";
Then find this,Code:echo "<tr valign=\"bottom\"> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Rank </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Character </b></font></td> <td align =\"center\" bgcolor='".$title_bar."' width = 100><font color=\"".$title_font."\"><b> Name </b></font></td> <td align =\"center\" bgcolor='".$title_bar."' width = 100><font color=\"".$title_font."\"><b> Rebirth </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Fame </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> FoJ </b></font></td> <td align =\"center\" bgcolor='".$title_bar."'><font color=\"".$title_font."\"><b> Job Class </b></font></td> <td align =\"center\" bgcolor='".$title_bar."' width = 100><font color=\"".$title_font."\"><b> Level </b></font></td> </tr>";
And put ABOVE itCode:echo $row['fame']; echo " </b></td><td align =\"center\" bgcolor='".$backcolor."'> <b>";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Code:echo $row['rebirth']; echo " </b></td><td align =\"center\" bgcolor='".$backcolor."'> <b>";
If you would like to have the index ranking show characters with more rebirths have a higher rank than use this.
This is for s0wh4t's CMS, i have not tested on any other!
In Index.php
Find this
And replace it withCode:$gc = mysql_query("SELECT * FROM `characters` WHERE `gm`='0' ORDER BY `level` DESC,`exp`") or die(mysql_error());
Then findCode:$gc = mysql_query("SELECT * FROM `characters` WHERE `gm`='0' ORDER BY `rebirth` DESC, `level` DESC,`exp`") or die(mysql_error());
Then add BELOW itCode:echo "<td>".$player['level']."</td>";
If you need any help, just ask me.Code:echo "<td>(".$player['rebirth'].")</td>";
Hope you enjoy this, even how easy it is, it took me quite a bit to figure it out haha.
~
EDIT:
Go here for a great reborn method!
http://forum.ragezone.com/f427/relea...st-see-471853/
Credits to xazerrx
~
Credits:
Me for making this,
DarkMagic for ranking
s0wh4t? for CMS


Reply With Quote![[Release]Rebirth column for darkmagic's ranking](http://ragezone.com/hyper728.png)

