Jump to content

RB Status


Recommended Posts

Hi guys i try to add rb status in website, but when i add all server info i got blank page in website below is the code, maybe i do smth wrong..


 

//Script de Status Raid boss
$db['servidor'] = "000.000.000.000";//Nome do servidor 
$db['usuario_mysql'] = "root";// Usuario do mysql
$db['senha_mysql'] = "pass";//Senha do mysql
$db['banco_de_dados'] = "l2jdb";//Nome d banco de dados
$connect = @mysql_connect($db['servidor'], $db['usuario_mysql'], $db['senha_mysql']);
@mysql_select_db($db['banco_de_dados'], $connect);

if(!$connect)
else
{
$raidspawn = mysql_query("SELECT boss_id,respawn_time FROM grandboss_data where boss_id = 25512 or boss_id = 29001 or boss_id = 29006 or boss_id = 29014 or boss_id = 29019 or boss_id = 29020 or boss_id = 29022 or boss_id = 29028 or boss_id = 29045 or boss_id = 29046 or boss_id = 29047 or boss_id = 29065 order by boss_id desc");
while(list($boss_id,$respawn_time) = mysql_fetch_row($raidspawn))
{
    $raidboss = mysql_query("SELECT name,level FROM npc WHERE id = $boss_id");
    $text = '<font color="#090">is alive</font>';
    $respawn = 'Spawn';
    if($respawn_time > 0)
    {
        $respawntime = @date('r',($respawn_time / 1000));
        $text = '<font color="#FF0000">is dead</font>';
        $respawn = "Respawn time: $respawntime";
    }
 

Link to comment
Share on other sites

  • 3 weeks later...

a blank page means alot of problems, is the file extension .php?

what php version you use? mysql_connect is deprecated in latest php versions

your code has a problem

if(!$connect)
else

this should be like

if(!$connect){

echo 'problem connecting to database';

}
else

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...