Skip to content

[Help] Need really working php script status for H5 epics

Featured Replies

Hi everyone! I hope there is someone who can help me with my problem. I cant find anywhere in internet a good working php script for epics on H5. I use this script:

$raidspawn = mysql_query("SELECT boss_id,respawn_time FROM grandboss_data ORDER BY respawn_time DESC");
$total = mysql_num_rows($raidspawn);
$max_pag = 25;

$paginas =  (($total % $max_pag) > 0) ? (int)($total / $max_pag) + 1 : ($total / $max_pag);

if (isset($_GET['pagina'])){
   $pagina = (int)$_GET['pagina'];
}else{
   $pagina = 1;
}

$pagina = max(min($paginas, $pagina), 1);
$inicio = ($pagina - 1) * $max_pag;

$sql = "SELECT boss_id,respawn_time FROM `grandboss_data` ORDER BY `respawn_time` DESC LIMIT ".$inicio.", ".$max_pag;
$query = mysql_query($sql);
echo '<table id="table_boss" align=center cellpadding="3" cellspacing="0">';
echo '<tr class="topo">
        <td class="t1"><b><font color="FFCC00">Name</font></b></td>
        <td class="t2"><b><font color="FFCC00">Status </font></b></td>
        <td class="t3"><b><font color="FFCC00">Spawn</font></b></td>
        <td class="t2"><b><font color="FFCC00">Level</font></b></td>
      </tr>';
while(list($boss_id,$respawn_time) = mysql_fetch_row($query)){
   $raidnames = mysql_query("SELECT name,level FROM npc WHERE id = $boss_id");
    $text = '<font color="00FF00">ALIVE</font>';
   $respawn = '<font color="60BDFF">Spawned</font>';
    if($respawn_time > 0){
      $respawntime = date('d/m/Y \\ H:i:s',($respawn_time / 1000));
      $text = '<font color="FF0000">Dead</font>';
      $respawn = '<font color="FF0000">Respawn&nbsp'.$respawntime.'</font>';
   }
   while(list($raidname,$levelup) = mysql_fetch_row($raidnames)){
      echo '<tr class="style10 t_corpo">
            <td class="style1">'.$raidname.'</td>
            <td class="style3">'.$text.'</td>
            <td class="style1">'.$respawn.'</td>
            <td class="style3">'.$levelup.'</td>
           </tr>';
   }
}

Its not accurate because when the RB is spawned in the web page its still showing Dead Respawn 25/01/2013 16:40:34

It never changed to ALIVE Spawned. Its like this only the first time before it gets killed. This is because in the MySQL table grandboss_data in column respawn_time the number inside never goes 0 again, it always remain the last UNIX timestamp like this 1359132034000.

So is there any way the script to be reworked so in web page to show Alive Spawned like it should?

I will be very grateful if someone can help me!

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.