Page 2 of 4

Re: [SHARE] Gracia Raid Boss Map

Posted: Sun Sep 13, 2009 7:10 pm
by LaraCroft
Hi guys...

I edit it to show the Grand Boss data spawn...
:wink:

File: index.php

Code: Select all

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>PG-L2 Server - Live Raid Boss Map</title></head><body><?phprequire"connection.php";echo "<div style=position:absolute;top:0px;left:0px><img src=kamael.jpg></div>";//Raid Boss data$query_raidbosses=mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time FROM raidboss_spawnlist");$online= mysql_num_rows($query_raidbosses);while ($res=mysql_fetch_array($query_raidbosses))  {	$id=$res['boss_id'];	$valx=$res['loc_x'];	$valy=$res['loc_y'];	$valz=$res['loc_z'];	$respawn=$res['respawn_time'];	$boss_name=mysql_query("SELECT name FROM npc WHERE id='$id'");	$name = mysql_fetch_row( $boss_name );	$boss_level=mysql_query("SELECT level FROM npc WHERE id='$id'");	$level = mysql_fetch_row( $boss_level );    if($respawn > 0)    {        $respawntime = date('D M j G:ia T',($respawn / 1000));        $respawn_time = 'will respawn '.$respawntime.'';    }   $x=116+($valx+107823)/200;  $y=2580+($valy-255420 )/200; if($respawn == "0")	echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=up.png title=\"Level $level[0] $name[0] is Alive!\"></div><center>";else 			echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=down.png title=\"Level $level[0] $name[0] ".$respawn_time."\"></div><center>";}//Grand boss data$query_grandbosses=mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time FROM grandboss_data");$grandonline= mysql_num_rows($query_grandbosses);while ($grandres=mysql_fetch_array($query_grandbosses))  {	$grandid=$grandres['boss_id'];	$grandvalx=$grandres['loc_x'];	$grandvaly=$grandres['loc_y'];	$grandvalz=$grandres['loc_z'];	$grandrespawn=$grandres['respawn_time'];	$grandboss_name=mysql_query("SELECT name FROM npc WHERE id='$grandid'");	$grandname = mysql_fetch_row( $grandboss_name );	$grandboss_level=mysql_query("SELECT level FROM npc WHERE id='$grandid'");	$grandlevel = mysql_fetch_row( $grandboss_level );    if($grandrespawn > 0)    {        $grandrespawntime = date('D M Y j G:ia T',($grandrespawn / 1000));        $grandrespawn_time = 'will respawn '.$grandrespawntime.'';    }   $grandx=116+($grandvalx+107823)/200;  $grandy=2580+($grandvaly-255420 )/200; // Boss data$databoss= date('Y,m,d,H,i,s',($grandrespawn / 1000));// data$data= date("Y,m,d,H,i,s"); if($databoss <= $data)	echo "<div style=\"position:absolute;top:".$grandy."px;left:".$grandx."px\"><img src=up2.png title=\"Level $grandlevel[0] $grandname[0] is Alive!\"></div><center>";else	echo "<div style=\"position:absolute;top:".$grandy."px;left:".$grandx."px\"><img src=down2.png title=\"Level $grandlevel[0] $grandname[0] ".$grandrespawn_time."\"></div><center>";}mysql_close();?></body></html> 

Re: [SHARE] Gracia Raid Boss Map

Posted: Tue Sep 15, 2009 5:24 pm
by neo25
Shouldn't the status of the grandbosses be checked as well as the respawn time for them like this? Check out line 33 of my code.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Grand Boss Map</title></head><body><?phprequire"connection.php";$query_grandbosses=mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time,status FROM grandboss_data");echo "<div style=position:absolute;top:0px;left:0px><img src=kamael.jpg></div>";while ($res=mysql_fetch_array($query_grandbosses))  {	$id=$res['boss_id'];	$valx=$res['loc_x'];	$valy=$res['loc_y'];	$valz=$res['loc_z'];	$respawn=$res['respawn_time'];	$status=$res['status'];	$boss_name=mysql_query("SELECT name FROM npc WHERE id='$id'");	$name = mysql_fetch_row( $boss_name );	$boss_level=mysql_query("SELECT level FROM npc WHERE id='$id'");	$level = mysql_fetch_row( $boss_level );    if($respawn > 0)    {        $respawntime = date('D M j G:ia T',($respawn / 1000));        $respawn_time = 'will respawn '.$respawntime.'';    }   $x=116+($valx+107823)/200;  $y=2580+($valy-255420 )/200; if($status == "0" and $respawn == "0")	echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=up.png title=\"Level $level[0] $name[0] is Alive!\"></div><center>";else 			echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=down.png title=\"Level $level[0] $name[0] ".$respawn_time."\"></div><center>";	}	mysql_close();?></body></html>

Re: [SHARE] Gracia Raid Boss Map

Posted: Wed Sep 30, 2009 7:23 am
by Zhen-Xlogic
Some one re uploaded, because first link is dead.

Thanks. :wink:

Re: [SHARE] Gracia Raid Boss Map

Posted: Wed Sep 30, 2009 4:16 pm
by neo25
I've updated the link in the first post, thanks for posting that the link was broken.

Re: [SHARE] Gracia Raid Boss Map

Posted: Wed Sep 30, 2009 8:41 pm
by Zhen-Xlogic
neo25 wrote:I've updated the link in the first post, thanks for posting that the link was broken.
No problem @neo25,
And thanks for the re-upload. :wink:

Re: [SHARE] Gracia Raid Boss Map

Posted: Fri Oct 23, 2009 9:25 pm
by Dajorasan
is a great share, but i have a question, how i can do for change language display for respawn? is english for default, i need know if i can change to spanish, or not, thank you.

Re: [SHARE] Gracia Raid Boss Map

Posted: Fri Oct 23, 2009 10:15 pm
by neo25
Dajorasan wrote:is a great share, but i have a question, how i can do for change language display for respawn? is english for default, i need know if i can change to spanish, or not, thank you.
On line 27 you can change "will respawn" and on line 34 you can change "Level" and "is Alive" to spanish. As for default languages used for your server, that is set in the web server's configuration file for the default language and order of other languages used.

Line 27:

Code: Select all

$respawn_time = 'will respawn '.$respawntime.'';
Line 34:

Code: Select all

echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=up.png title=\"Level $level[0] $name[0] is Alive!\"></div><center>";

Re: [SHARE] Gracia Raid Boss Map

Posted: Fri Oct 23, 2009 10:19 pm
by Dajorasan
i change this, but i said for time of respawn, this show of this mode "Fri Oct 23 10:58 CDT" is a example, i want know if is possible change this to spanish, if is possible, tell me, if not, np

Re: [SHARE] Gracia Raid Boss Map

Posted: Fri Oct 23, 2009 10:39 pm
by neo25
Dajorasan wrote:i change this, but i said for time of respawn, this show of this mode "Fri Oct 23 10:58 CDT" is a example, i want know if is possible change this to spanish, if is possible, tell me, if not, np
Check this link out on what to do to change the date display to spanish. I'm not at my computer so I can't test and give valid code atm. You will want to use the "strftime()" format to change the date display to your locale settings of the server.

http://www.sitepoint.com/forums/showthread.php?t=626702

Re: [SHARE] Gracia Raid Boss Map

Posted: Fri Oct 23, 2009 10:41 pm
by Dajorasan
neo25 wrote:
Dajorasan wrote:i change this, but i said for time of respawn, this show of this mode "Fri Oct 23 10:58 CDT" is a example, i want know if is possible change this to spanish, if is possible, tell me, if not, np
Check this link out on what to do to change the date display to spanish. I'm not at my computer so I can't test and give valid code atm. You will want to use the

Code: Select all

strftime()
format to change the date display to your locale settings of the server.

http://www.sitepoint.com/forums/showthread.php?t=626702
i try this, but i cant put the time of respawn only say, will respawn, and not more, if something can help me, im very thanks

Re: [SHARE] Gracia Raid Boss Map

Posted: Tue Oct 27, 2009 9:41 pm
by neo25
Try using this on line 26 and seeing if it works. It might need some adjustments to the time but it should work.

Code: Select all

$respawntime = strftime("%A %e de %B del %Y - %H:%M:%S", mktime (gmdate("H"), gmdate("i"), gmdate("s"), gmdate("n"), gmdate("j"), gmdate("Y")));

Re: [SHARE] Gracia Raid Boss Map

Posted: Tue Oct 27, 2009 9:42 pm
by Dajorasan
neo25 wrote:Try using this on line 26 and seeing if it works. It might need some adjustments to the time but it should work.

Code: Select all

$respawntime = strftime("%A %e de %B del %Y - %H:%M:%S", mktime (gmdate("H"), gmdate("i"), gmdate("s"), gmdate("n"), gmdate("j"), gmdate("Y")));
thank you, i try this :)

Re: [SHARE] Gracia Raid Boss Map

Posted: Tue Nov 24, 2009 12:00 am
by NoX
HI to every body


Could someone tell me what to do, because valakas is not in the place that it supose to be.

here is the link to the raid boss map thata i talking http://l2.capservers.com.ar/raidboss/index.php

Please, help me.

Thank you to all

Sorry about my bad bad english

Re: [SHARE] Gracia Raid Boss Map

Posted: Tue Nov 24, 2009 7:17 am
by janiii
Alej wrote:Could someone tell me what to do, because valakas is not in the place that it supose to be.
yes, he is spawned in a cube somewhere outside. but the script that handles lair of valakas, let him be/come there when players enter his lair.

Re: [SHARE] Gracia Raid Boss Map

Posted: Sun Jan 31, 2010 4:35 am
by TheClown
mm test but dont work in epilogue