[Tool]PHP/HTML real-time map players.
Posted: Sun Jul 28, 2013 3:04 pm
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 Server Discussion Board
https://www.l2jserver.com/forum/
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
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
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
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>'; }}?>
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>
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.
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
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
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
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() { }}?>