1)I really liked this setup, and even modified its theme, but kept its layout.
Problem is, I haven't changed the pets page, but it's not displaying the stars of the pets that players on the server have. All levels and rebirths appear normal, but Stars all appear 0.
Now, when the pets evolve on the server, they instantly get to 3-4 stars, so could the site be checking it differently that the server registers them? (don't know how to change the evo stars to check).
Quote:
$pId = $_POST['type'];
$pId = $pId[0] . $pId[1];
switch($pId) {
case "top10":
$sQuery = mysql_query("SELECT * FROM cq_eudemon WHERE `ori_owner_name` NOT LIKE '%[PM]%' ORDER BY star_lev DESC LIMIT 50");
default:
$sQuery = mysql_query("SELECT * FROM cq_eudemon WHERE (`ori_owner_name` NOT LIKE '%[PM]%' AND `item_type` LIKE '1071$pId%' OR `item_type` LIKE '1079$pId%' OR `item_type` LIKE '1081$pId%') ORDER BY star_lev DESC LIMIT 50");
}
$rank = 1;
while ($pet = mysql_fetch_assoc($sQuery)) {
$star_lev = $pet['star_lev'];
$stars = "";
$item_type = $pet['item_type'];
$type = "";
if (strlen($star_lev) == 4) {
$stars = $star_lev[0] . $star_lev[1];
} else if (strlen($star_lev) == 5) {
$stars = $star_lev[0] . $star_lev[1] . $star_lev[2];
} else if (strlen($star_lev) == 6) {
$stars = $star_lev[0] . $star_lev[1] . $star_lev[2] . $star_lev[3];
} else {
$stars = 0;
}
$type = $eudemon[$item_type[strlen($item_type)-3] . $item_type[strlen($item_type)-2] . "0"];
$sql = "SELECT * FROM cq_user WHERE id='".$pet['player_id']."'";
$query = mysql_query($sql) or die(mysql_error());
|
[Only registered and activated users can see links. Click Here To Register...] if you want to check
If it is indeed because they use different star rankings, how can I fix this, either for the site or database to use standard to make it compatible? I use the REO client, like most people, so it's probably important that this have some way to be compatible...
2) Is there a way to script it where after it prioritized the pets by stars, it prioritized pets by rebirths and/or level?
I'm still learning PHP, so please excuse my ignorance here. I think there is, but am not even sure, much less know how to do it with proper syntax (which i would like, and would still pertain to this, so it's not spamming, but asking for help and an improvement).