Page 1 of 2

[Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 3:04 pm
by laxsur
can you tell me where I can find the code for this map?
or a similar map.
http://l2bronze.com/onlinemap/

Re: [Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 5:22 pm
by lion
this is boss map, just changed sql query for get data for character position not boss

Re: [Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 5:31 pm
by jurchiks
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.

Re: [Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 5:34 pm
by lion
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

Re: [Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 7:11 pm
by laxsur
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

Re: [Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 7:46 pm
by JMD
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
pretty cool. thanks.

Re: [Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 8:21 pm
by lion
its like example http://rghost.ru/47737513

Re: [Tool]PHP/HTML real-time map players.

Posted: Sun Jul 28, 2013 9:27 pm
by laxsur
lion wrote:its like example http://rghost.ru/47737513
can you tell me what I need to change to see the player online instead of the raid.
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>

Re: [Tool]PHP/HTML real-time map players.

Posted: Mon Jul 29, 2013 6:02 am
by lion
you dont see my link? download it and look, im already change sql for show player

Re: [Tool]PHP/HTML real-time map players.

Posted: Mon Jul 29, 2013 9:14 am
by jurchiks
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.

Re: [Tool]PHP/HTML real-time map players.

Posted: Mon Jul 29, 2013 10:08 am
by laxsur
jurchiks 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.
I can not configure it I do not know what is wrong
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

Re: [Tool]PHP/HTML real-time map players.

Posted: Mon Jul 29, 2013 2:08 pm
by laxsur
lion wrote:you dont see my link? download it and look, im already change sql for show player
the link you gave me leads me into the mapboss

Re: [Tool]PHP/HTML real-time map players.

Posted: Mon Jul 29, 2013 2:29 pm
by lion
laxsur wrote: the link you gave me leads me into the mapboss
Image
lion wrote:download it and look, im already change sql for show player

Re: [Tool]PHP/HTML real-time map players.

Posted: Mon Jul 29, 2013 4:26 pm
by laxsur
lion wrote:
laxsur wrote: the link you gave me leads me into the mapboss
Image
lion wrote:download it and look, im already change sql for show player
what to change to display the online 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()    {     }}?> 

Re: [Tool]PHP/HTML real-time map players.

Posted: Mon Jul 29, 2013 6:37 pm
by u3games