|
You last visited: Today at 23:35
Advertisement
[Release] EOwebsite !
Discussion on [Release] EOwebsite ! within the EO PServer Guides & Releases forum part of the EO PServer Hosting category.
04/03/2011, 03:12
|
#76
|
elite*gold: 0
Join Date: Mar 2011
Posts: 19
Received Thanks: 0
|
ouh.
just change the localhost to ip?
and off the firewall?
|
|
|
04/03/2011, 03:40
|
#77
|
elite*gold: 0
Join Date: Aug 2010
Posts: 219
Received Thanks: 110
|
Quote:
Originally Posted by amirul312
ouh.
just change the localhost to ip?
and off the firewall?
|
Really? DO SOMETHING YOURSELF.
Have you ever heard of something called 'google' ? It was released in the mid 90's and can be found by typing into the big bar at the top of your screen or by following link.
Good luck..
|
|
|
04/03/2011, 05:22
|
#78
|
elite*gold: 0
Join Date: Mar 2011
Posts: 19
Received Thanks: 0
|
[Release]
tq
|
|
|
05/21/2011, 01:52
|
#79
|
elite*gold: 0
Join Date: Feb 2010
Posts: 111
Received Thanks: 5
|
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());
|
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).
|
|
|
05/21/2011, 04:09
|
#80
|
elite*gold: 0
Join Date: Oct 2009
Posts: 1,208
Received Thanks: 926
|
Personally what I would do is get rid of this entire block
Code:
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;
}
Since you are still keeping the $star_lev = $pet['star_lev']; part, what you can do is something like
Code:
$starz = substr($star_lev, 0, -2);
Then go to where it actually displays the $stars variable and change it to $starz
Once you have done that, No matter how high your pet stars go, it should show correctly.
Quote:
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).
|
Sure you can. You would just change your mysql query to something like
Say you wanted to order by the stars, then levels. I don't have a eud table handy so ill just give you an example.
Code:
$sql = mysql_query("SELECT * FROM [i]table[/i] ORDER BY [i]firstorder[/i], [i]secondorder[/i] ");
That should do pretty much everything you wanted.
|
|
|
05/21/2011, 05:46
|
#81
|
elite*gold: 0
Join Date: Feb 2010
Posts: 111
Received Thanks: 5
|
First off, thanks for the very fast response!
Unfortunately, when I changed the code for not displaying starts, it fails to show ANYTHING in that field, even 0. I had tried that after posting, but had this happen.
I just tried again just to make sure, and it still does the same.
You can check the page to verify...
Edit: I have edited the code to show all relevant calls to that block of code, which IMO is likely why it's not calling correctly (why it's not showing anything with the edited code).
Know it's kind of long, but I figure it's easier than downloading the source, lol.
For the second note, thanks, I didn't know it would be that easy, and thought it would be more of an If loop or something. :P Like I said, still a noob...
Edit: Thanks, I did work, I just had to change your z to an s... nice way to remind me to read and help me learn...
Was so annoyed after trying to figure it out, I didn't think to look for what I was doing wrong XP
|
|
|
05/21/2011, 06:02
|
#82
|
elite*gold: 0
Join Date: Oct 2009
Posts: 1,208
Received Thanks: 926
|
Can you rar or zip up only the page that contains that code for me. Since you've said that you have done some edits to it, if you prefer you can send it to me in a PM. I would like to take a look at it in its raw form to see if I can see anything incorrect with it.
Edit:
Glad you got it to work.
|
|
|
05/21/2011, 06:57
|
#83
|
elite*gold: 0
Join Date: Feb 2010
Posts: 111
Received Thanks: 5
|
Well, I had forgotten that I turned down the compose rates of the eudemons, lol.
Considering most of the time, the servers would START with at least one star pets, that would normally work lol. WHY he added that though, is beyond me.
The code you sent worked, but I can still send if you want.
But the secondary sort by commands didn't work right. It kind of confuses me, because this seems a bit like redundant code to me.
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, level 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");
}
|
As you can see, I added the sort by level to the first. When I do that, there are no errors, but it still doesn't sort by level.
When I add that to the second instance of SORT BY, it causes the stars of all monsters above level 3 not to show up... quite curious.
|
|
|
All times are GMT +2. The time now is 23:35.
|
|