Skip to content

Website, Raid Map need help

Featured Replies

Hello guys, sorry if i post is wrong section, but i need help with web coding, i upload to my web LIVE RAID MAP, i use ACIS, i make new SQL for raid names so i have names on map, but all Grand Bosses map shows DEAD. Can anyone give me advice how to fix this please. 

I upload code below : 

 

Quote

 

<html>
<head>
<body bgcolor="#000000" text="lime" link="#009933" vlink="#009933" padding="0" leftmargin="0">
<font size="2"> 
<TITLE>Live Raid Boss Map</TITLE>

<script>
<!--
//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="5: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+" minutes "+cursec+" seconds to automatic refresh!"
else
curtime=cursec+" seconds to automatic refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>

</head>
<?php
include"connection.php";
?>
<?php
$query_raidbosses=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");
$online= mysql_num_rows($query_raidbosses);
$online2= mysql_num_rows($query_grandboss);
echo "<div style=position:absolute;top:0px;left:0px><img src=IL.jpg></div>";
while ($res=mysql_fetch_array($query_raidbosses))
  {
    $id=$res['boss_id'];
    $valx=$res['loc_x'];
    $valy=$res['loc_y'];
    $valz=$res['loc_z'];
    $respawn=$res['respawn_time'];
    $boss_name=mysql_query("SELECT boss_name FROM bossmap WHERE id='$id'");
    $name = mysql_fetch_row( $boss_name );
    $boss_level=mysql_query("SELECT boss_level FROM bossmap WHERE id='$id'");
    $level = mysql_fetch_row( $boss_level );
    
  $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=3.png title=\"(RaidBoss) $name[0] $level[0]lvl Alive!\"></div><center>";
else         
    echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=0.png title=\"(RaidBoss) $name[0] $level[0]lvl Dead!\"></div><center>";
    }
while ($res=mysql_fetch_array($query_grandboss))
  {
    $id=$res['boss_id'];
    $valx=$res['loc_x'];
    $valy=$res['loc_y'];
    $valz=$res['loc_z'];
    $respawn=$res['respawn_time'];
    $boss_name=mysql_query("SELECT boss_name FROM bossmap WHERE id='$id'");
    $name = mysql_fetch_row( $boss_name );
    $boss_level=mysql_query("SELECT boss_level FROM bossmap WHERE id='$id'");
    $level = mysql_fetch_row( $boss_level );
    
  $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=3.png title=\"(GrandBoss) $name[0] $level[0]lvl Alive!\"></div><center>";
else         
    echo "<div style=\"position:absolute;top:".$y."px;left:".$x."px\"><img src=0.png title=\"(GrandBoss) $name[0] $level[0]lvl Dead!\"></div><center>";
    }    
mysql_close();
?>

 

 

Edited by remigas

maybe is not connect to mysql;

you have create db user for can connect site -> server ? for can take info from mysql

first we have 2018 please use PDO cause mysql is deprecated.

second google "inner join" table to get from the grand boss data the time they need to respawn or 0 that means alive if you want it in 1 query.

or just combine id's from 2 queries and respawn time

just check results with, example print_r $row...

and me suggestion dont use web and game server in same server. Use cronjobs for data update, example every 5min.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.