L2 Online Players Map for your l2 web site

Discussion in 'Web / Веб' started by Evil, Mar 8, 2011.

  1. Evil

    Evil New Member

    hi.. i need L2 Online Players Map for your l2 web site..
     
  2. Nish

    Nish AdvExt64 Customers (IL)

    why dont u make one ? and why did you find the need to post the same thing twice ? people these days..........
     
  3. miguelitito

    miguelitito New Member

  4. EnjoY

    EnjoY AdvExt64 Customers (GF/GE/HF)

    Adjust as you need
    Code:
    $sqltt = "SELECT ud.char_name, ud.xloc, ud.yloc, ud.zloc, ud.race, ua.last_ip, ua.account 
    			FROM lin2world..user_data ud with (nolock)
    			, lin2db..user_account ua  with (nolock)
    			WHERE ua.uid = ud.account_id and (ud.login > ud.logout or ud.logout=0) order by ua.last_ip";
    $result = mssql_query ($sqltt);
    $request['map']=array();
    while($row = mssql_fetch_array($result)){
    	$row['x']=($row['xloc'] + 163000)/418; //Aden
    	$row['y']=($row['yloc'] + 260000)/418;  //Aden
    	$request['map'][]=$row;
    }
    @mssql_free_result($result);
    $theme->loadtemplate('gms.map');
    
    Code:
    echo "<div style=\"height: 100%; width: 610px; max-height:100%;overflow:auto;\">
    <div style=\"background-attachment:scroll; background-color:transparent; background-image:url(img/map/adenmap.jpg); background-position:left top; background-repeat:no-repeat; width: 945px; height: 1265px; position:relative;\"
    
    >";
    foreach($request['map'] as $row){
    	echo "
    		<div style=\"position:absolute;top:{$row['y']}px;left:{$row['x']}px\"><img src=\"/img/map/target.gif\" title=\"{$row['char_name']} x:{$row['xloc']} y:{$row['yloc']} z:{$row['zloc']}\"></div>";
    }
    echo "</div></div>";
    $theme->endBlock();