[Tool]PHP/HTML real-time map players.
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 85
- Joined: Thu Jul 25, 2013 10:22 pm
[Tool]PHP/HTML real-time map players.
can you tell me where I can find the code for this map?
or a similar map.
http://l2bronze.com/onlinemap/
or a similar map.
http://l2bronze.com/onlinemap/
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: [Tool]PHP/HTML real-time map players.
this is boss map, just changed sql query for get data for character position not boss
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: [Tool]PHP/HTML real-time map players.
It's not a boss map, there was one player in Aden center.
Edit: he's still there.
But the salt is not in the data, but how to position it.
Edit: he's still there.
But the salt is not in the data, but how to position it.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: [Tool]PHP/HTML real-time map players.
do you read what i write? this map take data not from raidboss_spawnlist but from characters and show player possition, few changed line and you have player map from boss map
viewtopic.php?f=94&t=28019
viewtopic.php?f=94&t=28019
-
- Posts: 85
- Joined: Thu Jul 25, 2013 10:22 pm
Re: [Tool]PHP/HTML real-time map players.
lion wrote:do you read what i write? this map take data not from raidboss_spawnlist but from characters and show player possition, few changed line and you have player map from boss map
viewtopic.php?f=94&t=28019
what needs to change from that found at this link to see the players
http://rghost.net/47610033
-
- Advanced User
- Posts: 1440
- Joined: Wed Apr 15, 2009 10:07 am
Re: [Tool]PHP/HTML real-time map players.
pretty cool. thanks.laxsur wrote:lion wrote:do you read what i write? this map take data not from raidboss_spawnlist but from characters and show player possition, few changed line and you have player map from boss map
viewtopic.php?f=94&t=28019
what needs to change from that found at this link to see the players
http://rghost.net/47610033
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: [Tool]PHP/HTML real-time map players.
its like example http://rghost.ru/47737513
-
- Posts: 85
- Joined: Thu Jul 25, 2013 10:22 pm
Re: [Tool]PHP/HTML real-time map players.
can you tell me what I need to change to see the player online instead of the raid.lion wrote:its like example http://rghost.ru/47737513
I'm not very good with php
file name = config_boss.php
Code: Select all
<?php/** * Creado para la comunidad U3Games --> http://l2.united-extreme.com * De la comunidad de juegos online --> http://u3games.united-extreme.com * U3G | Lineage II - Map Raid Boss */ class raid_boss{ private $ip = "127.0.0.1"; private $usuario = "root"; private $senha = "****"; private $database = "l2jdb"; var $get; public $htitle = "Live Raid Boss Map"; function __construct() { $con = mysql_connect($this->ip,$this->usuario,$this->senha); if(!$con) die("Erro ao Conectar!\n" . mysql_error()); else mysql_select_db($this->database,$con) or die("Erro ao selecionar Banco de Dados!" . mysql_error()); } function selectBoss() { $query[0] = mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time FROM raidboss_spawnlist"); $query[1] = mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time FROM grandboss_data"); $this->get = addslashes(strip_tags(trim($_GET['ord']))); $show = array(); switch($this->get){ case '': case 'all': $show[] = $query[0]; $show[] = $query[1]; break; case 'grandboss': $show[] = $query[1]; break; case 'raidboss': $show[] = $query[0]; break; } /*foreach($show as $qboss)*/ foreach($show as $qboss) { while($res = mysql_fetch_array($qboss)) { $id = $res['boss_id']; $valx = $res['loc_x']; $valy = $res['loc_y']; $valz = $res['loc_z']; $respawn = $res['respawn_time']; $boss_query = mysql_query("SELECT name,level FROM npc WHERE id = '" . $id . "'"); $row_boss = mysql_fetch_row($boss_query); $name = $row_boss[0]; $level = $row_boss[1]; $x = round(116 + ($valx + 107823)/200); $y = round(2580 + ($valy - 255420)/200); switch($respawn) { case 0: $estatus = 'Vivo'; $img_est = '0'; break; case 1: $estatus = 'Morto'; $img_est = '1'; break; } $titulo = "Level: ".$level."\nNome: ".$name."\nEstatus: ".$estatus."!\n"; echo '<div style="position:absolute; top:'.$y.'px; left:'.$x.'px; color:#fff">'; echo '<img src="'.$img_est.'.gif" alt="" title="'.$titulo.'" /></div>'; } } } function selected() { $this->get = addslashes(strip_tags(trim($_GET['ord']))); $query['raidboss'] = mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time FROM raidboss_spawnlist"); $query['grandboss'] = mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time FROM grandboss_data"); $nr_r = mysql_num_rows($query['raidboss']); $nr_g = mysql_num_rows($query['grandboss']); $m = array(); $s = ' selected="selected"'; switch($this->get){ case 'all': $m[1] = $s; break; case 'grandboss': $m[2] = $s; break; case 'raidboss': $m[3] = $s; break; } echo '<option value="all"'.$m[1].'>Todos</option> <option value="grandboss"'.$m[2].'>Grand Boss ( '.$nr_g.' )</option> <option value="raidboss"'.$m[3].'>Raid Boss ( '.$nr_r.' )</option>'; }}?>
file name = index.php
Code: Select all
<?phpinclude("config_boss.php");$raidbosses = new raid_boss;?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title><?php echo $raidbosses->htitle;?></title><style type="text/css">* { margin:0; padding:0;}body { font:11px Arial, Helvetica, sans-serif; }#map { background:url(map.jpg) top left no-repeat; width:1808px; height:2616px; position:relative; top:0px; left:0px;}form#ordem { position:fixed; top:10px; right:10px;}</style><script type="text/javascript">//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59var limit="1:00" if (document.images){ var parselimit=limit.split(":") parselimit=parselimit[0]*60+parselimit[1]*1}function beginrefresh(){ if (!document.images) return if (parselimit==1) window.location.reload() else{ parselimit-=1 curmin=Math.floor(parselimit/60) cursec=parselimit%60 if (curmin!=0) curtime=curmin+" minutos "+cursec+" segundos para o recarregamento automatico!" else curtime=cursec+" segundos para o recarregamento automatico!" window.status=curtime setTimeout("beginrefresh()",1000) }} window.onload = beginrefresh();</script></head><body><div id="map"> <form action="#" method="get" id="ordem"> <select onchange="window.location.href = '?ord=' + options[selectedIndex].value"> <optgroup label="Ordenar Por:"> <?php $raidbosses->selected(); ?> </optgroup> </select> </form> <?php $raidbosses->selectBoss(); ?></div></body></html>
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: [Tool]PHP/HTML real-time map players.
you dont see my link? download it and look, im already change sql for show player
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: [Tool]PHP/HTML real-time map players.
Man, why are you making a gameserver website if you're not good with PHP? You need to learn that stuff first...
We won't help you write your site from scratch, this forum is not meant for that.
We won't help you write your site from scratch, this forum is not meant for that.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 85
- Joined: Thu Jul 25, 2013 10:22 pm
Re: [Tool]PHP/HTML real-time map players.
I can not configure it I do not know what is wrongjurchiks wrote:Man, why are you making a gameserver website if you're not good with PHP? You need to learn that stuff first...
We won't help you write your site from scratch, this forum is not meant for that.
if I find the solution here in the public, I have no problem to share code
only with your help that you have done first, thanks
-
- Posts: 85
- Joined: Thu Jul 25, 2013 10:22 pm
Re: [Tool]PHP/HTML real-time map players.
the link you gave me leads me into the mapbosslion wrote:you dont see my link? download it and look, im already change sql for show player
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: [Tool]PHP/HTML real-time map players.
laxsur wrote: the link you gave me leads me into the mapboss

lion wrote:download it and look, im already change sql for show player
-
- Posts: 85
- Joined: Thu Jul 25, 2013 10:22 pm
Re: [Tool]PHP/HTML real-time map players.
what to change to display the online playerlion wrote:laxsur wrote: the link you gave me leads me into the mapboss
lion wrote:download it and look, im already change sql for show player
name file = config_boss.php
Code: Select all
<?php/** * Creado para la comunidad U3Games --> http://l2.united-extreme.com * De la comunidad de juegos online --> http://u3games.united-extreme.com * U3G | Lineage II - Map Raid Boss */ class raid_boss{ private $ip = "127.0.0.1"; private $usuario = "root"; private $senha = "root"; private $database = "database"; var $get; public $htitle = "Live Raid Boss Map"; function __construct() { $con = mysql_connect($this->ip,$this->usuario,$this->senha); if(!$con) die("Erro ao Conectar!\n" . mysql_error()); else mysql_select_db($this->database,$con) or die("Erro ao selecionar Banco de Dados!" . mysql_error()); } function selectBoss() { $query[1] = mysql_query("SELECT account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,heading,x,y,z,exp,expBeforeDeath,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,base_class,transform_id,deletetime,cancraft,title,title_color,accesslevel,online,onlinetime,char_slot,newbie,lastAccess,clan_privs,wantspeace,isin7sdungeon,power_grade,nobless,subpledge,lvl_joined_academy,apprentice,sponsor,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createDate,language FROM characters"); /*$query[1] = mysql_query("SELECT boss_id,loc_x,loc_y,loc_z,respawn_time FROM grandboss_data");*/ @$this->get = addslashes(strip_tags(trim($_GET['ord']))); $show = array(); switch($this->get){ case '': case 'all': $show[] = $query[1]; break; case 'grandboss': $show[] = $query[1]; break; case 'raidboss': $show[] = $query[1]; break; } /*foreach($show as $qboss)*/ foreach($show as $qboss) { while($res = mysql_fetch_array($qboss)) { $id = $res['charId']; $valx = $res['x']; $valy = $res['y']; $valz = $res['z']; $name = $res['char_name']; $level = $res['level']; $x = round(116 + ($valx + 107823)/200); $y = round(2580 + ($valy - 255420)/200); $onlines=$res['online']; switch($onlines) { /* if($online == '1') { $estatus = 'Online'; $img_est = '0'; break } */ case 1: $estatus = 'Online'; $img_est = '0'; $titulo = "Level: ".$level."\nNome: ".$name."\nEstatus: ".$estatus."!\n"; echo '<div style="position:absolute; top:'.$y.'px; left:'.$x.'px; color:#fff">'; echo '<img src="'.$img_est.'.gif" alt="" title="'.$titulo.'" /></div>'; break; default: case 0: $estatus = 'Offline'; $img_est = '1'; /* $titulo = "Level: ".$level."\nNome: ".$name."\nEstatus: ".$estatus."!\n"; echo '<div style="position:absolute; top:'.$y.'px; left:'.$x.'px; color:#fff">'; echo '<img src="'.$img_est.'.gif" alt="" title="'.$titulo.'" /></div>'; */ break; } } } } function selected() { }}?>
- u3games
- Posts: 1156
- Joined: Sun Feb 27, 2011 7:00 pm
- Location: España
- Contact:
Re: [Tool]PHP/HTML real-time map players.
User Map:
----> http://rghost.net/47758568
----> http://www.united-extreme.com/u3games/c ... topic=27.0
My map online = http://www.united-extreme.com/u3games/s ... anisferio/
----> http://rghost.net/47758568
----> http://www.united-extreme.com/u3games/c ... topic=27.0
My map online = http://www.united-extreme.com/u3games/s ... anisferio/
Last edited by u3games on Mon May 05, 2014 7:42 pm, edited 1 time in total.