what does not work exactly? do you some sql query error? tried the script from LaraCroft?TheClown wrote:mm test but dont work in epilogue
[SHARE] Gracia Raid Boss Map
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: [SHARE] Gracia Raid Boss Map
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- LaraCroft
- Posts: 360
- Joined: Sat Aug 08, 2009 1:37 am
Re: [SHARE] Gracia Raid Boss Map
index.php
Im not an expert... but...
For me works fine on GE.
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>Live Raid Boss Map</title></head><body><?phpset_time_limit(0);require"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,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']; $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,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']; $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 H:ia T',($grandrespawn / 1000)); $grandrespawn_time = 'respawn em '.$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>
For me works fine on GE.
!!!knowledge and intelligence must be shared!!!
- Stake
- Posts: 383
- Joined: Sun Mar 23, 2008 9:33 pm
- Location: Hungary
- Contact:
Re: [SHARE] Gracia Raid Boss Map
For calculating position there is another way.
An example for abscissa:
Arguments:
$min_coord: minimum coordinate in L2World (above it's -131072).
$max_coord: maximum coordinate in L2World (above it's 228608).
$l_max_coord: width or height of the map's picture (depending on what coord you want to calculate, above it's 906 the width)
$dot_c: width or height of dot's picture above it's 7, so i divided by 2 to calc its middle.
$g_coord: mob's spawn X or Y.
$isRound: true if you want to round the returned number's value, false if not.
Code: Select all
public function getPxFromCoord($min_coord, $max_coord, $l_max_coord, $dot_c, $g_coord, $isRound){ if($max_coord < $min_coord){$max_coord = $min_coord;} if($min_coord < 0){$min_coord *= -1;} if($max_coord < 0){$max_coord *= -1;} $r_val = (($l_max_coord - $dot_c) / ($min_coord + $max_coord)) * ($g_coord + $min_coord); if($isRound) return round($r_val); else return $r_val;}
Code: Select all
$this->getPxFromCoord(-131072, 228608, 906, (7/2), $spawnX, true);
$min_coord: minimum coordinate in L2World (above it's -131072).
$max_coord: maximum coordinate in L2World (above it's 228608).
$l_max_coord: width or height of the map's picture (depending on what coord you want to calculate, above it's 906 the width)
$dot_c: width or height of dot's picture above it's 7, so i divided by 2 to calc its middle.
$g_coord: mob's spawn X or Y.
$isRound: true if you want to round the returned number's value, false if not.
-
- Posts: 130
- Joined: Wed Dec 23, 2009 7:25 am
Re: [SHARE] Gracia Raid Boss Map
Download link has a password?
-
- Posts: 28
- Joined: Fri Dec 25, 2009 12:46 am
Re: [SHARE] Gracia Raid Boss Map
yes how can we download it?
-
- Posts: 26
- Joined: Sun Jul 09, 2006 7:53 pm
Re: [SHARE] Gracia Raid Boss Map
I've fixed the permission settings for the download on my server. The main link should be working again.
- CubAfull
- Posts: 37
- Joined: Wed Feb 03, 2010 9:02 pm
Re: [SHARE] Gracia Raid Boss Map
my first post
ok... thank you for your script but... this code make 2 calls per BOSS and there are many
so.. if you don't want to kill your MySQL, use this index.php, its realy fast...
This script make only one call to your MySQL and return all the data...
BTW... I change all the images to a new folder "images"
Thank you and sorry for my english
ok... thank you for your script but... this code make 2 calls per BOSS and there are many
so.. if you don't want to kill your MySQL, use this index.php, its realy fast...
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>Raid Boss Status</title></head><body><?phprequire"connection.php"; $query_raidbosses=mysql_query("SELECT raidboss_spawnlist.loc_x, raidboss_spawnlist.loc_y, raidboss_spawnlist.respawn_time, npc.name, npc.levelFROM raidboss_spawnlist, npcWHERE raidboss_spawnlist.boss_id=npc.id"); echo "<div style=position:absolute;top:0px;left:0px><img src=images/kamael.jpg></div>";while ($res=mysql_fetch_array($query_raidbosses)) { $valx=$res['loc_x']; $valy=$res['loc_y']; $respawn=$res['respawn_time']; $name = $res['name']; $level = $res['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=images/up.png title=\"Level $level $name is Alive!\"></div><center>";else echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=images/down.png title=\"Level $level $name ".$respawn_time."\"></div><center>"; } mysql_close();?></body></html>
BTW... I change all the images to a new folder "images"
Thank you and sorry for my english
I ♥ Cuba...
-
- Posts: 3
- Joined: Sat Jul 19, 2008 8:26 am
Re: [SHARE] Gracia Raid Boss Map
Hi to all community,
when the boss respawn, the respawn time is not 0 but a long number and remain that until you kill another mob so the mobs dot is always red.
How fix that?
I'm working on Epilouge.
Sorry for my english
when the boss respawn, the respawn time is not 0 but a long number and remain that until you kill another mob so the mobs dot is always red.
How fix that?
I'm working on Epilouge.
Sorry for my english
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: [SHARE] Gracia Raid Boss Map
you have to check if the respawn_time is lower than current time. if yes, then boss is spawned.quesus wrote:Hi to all community,
when the boss respawn, the respawn time is not 0 but a long number and remain that until you kill another mob so the mobs dot is always red.
How fix that?
I'm working on Epilouge.
Sorry for my english
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
-
- Posts: 3
- Joined: Sat Jul 19, 2008 8:26 am
Re: [SHARE] Gracia Raid Boss Map
the number (is composed by 13 numbers) is not the same; i tested on two bossjaniii wrote:you have to check if the respawn_time is lower than current time. if yes, then boss is spawned.quesus wrote:Hi to all community,
when the boss respawn, the respawn time is not 0 but a long number and remain that until you kill another mob so the mobs dot is always red.
How fix that?
I'm working on Epilouge.
Sorry for my english
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: [SHARE] Gracia Raid Boss Map
the respawn_time is the unix time from 1970 in miliseconds. the rb is spawned if respawn_time is 0 OR if respawn_time/1000 < time()quesus wrote:the number (is composed by 13 numbers) is not the same; i tested on two boss
Code: Select all
if($respawn == "0" || ($respawn/1000 < time()))
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
-
- Posts: 3
- Joined: Sat Jul 19, 2008 8:26 am
Re: [SHARE] Gracia Raid Boss Map
Sorry but i'm a beginner and want to learn;janiii wrote:the respawn_time is the unix time from 1970 in miliseconds. the rb is spawned if respawn_time is 0 OR if respawn_time/1000 < time()quesus wrote:the number (is composed by 13 numbers) is not the same; i tested on two boss
Code: Select all
if($respawn == "0" || ($respawn/1000 < time()))
in this way there is a match between respawn time ($respawn/1000) and local time (time()) at the moment that i used the map?
***Edit***: now works, thank's
-
- Posts: 101
- Joined: Sun Jul 12, 2009 6:24 pm
- Location: Lithuania
Re: [SHARE] Gracia Raid Boss Map
Link is dead. Can you reshare it. Thank you.neo25 wrote:
Download - Live Raid Boss Map
Sorry for my bad English.
-
- Posts: 15
- Joined: Tue Jun 23, 2009 4:27 am
Re: [SHARE] Gracia Raid Boss Map
So where do I put this?CubAfull wrote:my first post
ok... thank you for your script but... this code make 2 calls per BOSS and there are many
so.. if you don't want to kill your MySQL, use this index.php, its realy fast...
This script make only one call to your MySQL and return all the data...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>Raid Boss Status</title></head><body><?phprequire"connection.php"; $query_raidbosses=mysql_query("SELECT raidboss_spawnlist.loc_x, raidboss_spawnlist.loc_y, raidboss_spawnlist.respawn_time, npc.name, npc.levelFROM raidboss_spawnlist, npcWHERE raidboss_spawnlist.boss_id=npc.id"); echo "<div style=position:absolute;top:0px;left:0px><img src=images/kamael.jpg></div>";while ($res=mysql_fetch_array($query_raidbosses)) { $valx=$res['loc_x']; $valy=$res['loc_y']; $respawn=$res['respawn_time']; $name = $res['name']; $level = $res['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=images/up.png title=\"Level $level $name is Alive!\"></div><center>";else echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=images/down.png title=\"Level $level $name ".$respawn_time."\"></div><center>"; } mysql_close();?></body></html>
BTW... I change all the images to a new folder "images"
Thank you and sorry for my english
- TheClown
- Posts: 54
- Joined: Wed Feb 20, 2008 7:41 pm
- Location: Chile
Re: [SHARE] Gracia Raid Boss Map
link is death, reupload please ^^