Ir para conteúdo

AJuda EM COmo Puxa Storage para site


deivisonamorim

Posts Recomendados

Preciso de Uma Ajuda Para Cria Um Rank ..

Exemplo..

 

 

Rank Reset

 

A storage do reset e = 7777

 

mas precizo q o rank puxa uma storage do otserver esse meu rank..

\/

 

@Sekk

 

 

    #####HIGHSCORES#####
    case "highscores":
    connect_db();
$cfg['rank'] = 25;
if(isset($_GET['skill'])){
 $skill = $_GET['skill'];
} else {
 $skill = "Level";
}
if(!isset($_GET['pg'])) {
 $pg = 1;
} else {
 $pg = $_GET['pg'];
}
if($pg > 11){
 $inicio = 11;
}else{
 $inicio = $pg - 1;
}
$ini = $inicio * $cfg['rank'];
$prox = $cfg['rank'] * $pg + 1;
$prox_ = $cfg['rank'] * $pg + $cfg['rank'];
if($pg == 2){
 $ante = "1-".$cfg['rank'];
}elseif($pg > 2){
 $aa = $pg - 1;
 $b = $pg - 2;
 $a = $cfg['rank'] * $b;
 $ante = $a+'1'."-".$cfg['rank']*$aa;
}
if($pg == 1 or $pg == ""){
 $asd = " ";
}else{
 $asd = " | ";
}
?>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
<font color="#4682B4"><h1>Ranking: </font><br><font size="3"><a href="info.php?act=highscores"><strong><font color="#4682B4">Psychotick Souls</strong></a></font></h1></font>

<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td width="87%" valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="1">
      <tr>
        <td width="10%"><div align="center"><span class="style1">Rank</span></div></td>
        <td width="50%"><span class="style1">Name</span></td>
    <? if($skill == "Level"){?><td width="5%"><div align="center"><span class="style1">Vocs</span></div></td><? } ?>
        <td width="10%"><div align="center"><span class="style1">Level</span></div></td>
        <? if($skill == "Level"){?><td width="25%"><div align="center"><span class="style1">Points</span></div></td><? } ?>
        <? if($skill == "Reset"){?><td width="10%"><div align="center"><span class="style1">Reset's</span></div></td><? } ?>
      </tr>
<?php
  switch($skill){
  case "Fist":
   $id = 0;
   break;
  case "Club":
   $id = 1;
   break;
  case "Sword":
   $id = 2;
   break;
  case "Axe":
   $id = 3;
   break;
  case "Distance":
   $id = 4;
   break;
  case "Shield":
   $id = 5;
   break;
  case "Fish":
   $id = 6;
   break;
 }
 if($skill == "Level") {
  $total = mysql_query("SELECT * FROM players ORDER BY level");
  $tr = mysql_num_rows($total);
  $tp = $tr / $cfg['rank'];
  $tp = ceil($tp);
  $ant = $pg-1;
  $pro = $pg+1;
  $verifica = mysql_query("SELECT name,level,vocation,experience FROM players WHERE access < ".$accesslvl." ORDER BY level DESC LIMIT ".$ini.",".$cfg['rank']."");
  if($pg == 1 or $pg == 0){
   $i = 1;
  }elseif($pg > 1){
   $i = $ini+1;
  }
  while($dados = mysql_fetch_array($verifica)) {
      
            $id=$i+1;
            echo ($i % 2) ? "<tr bgcolor=\"#444444\">" : "<tr bgcolor=\"#4C4B4B\">";
   echo ' 
           <td><center>'.$i.'</center></td>
           <td><a href="info.php?act=players&char='.$dados['name'].'">'.$dados['name'].'</a></td>
       <td><font color="#4682B4"><center>'.$vocabre[$dados['vocation']].'</center></font></td>
           <td><center>'.$dados['level'].'</center></td>
                 <td><center>'.$dados['experience'].'</center></td>
          </tr>';
    $i++;
  }
  if($tr > $cfg['rank']){
   echo '<tr>
        <td colspan=4><div align="right">';
   if($pg > 1){
    $anterior = '<a href="?skill='.$skill.'&pg='.$ant.'">Rank '.$ante.'</a>';
   }
   if($pg != 11){
    if($pg < $tp){
     $proxima = '<a href="?skill='.$skill.'&pg='.$pro.'">Rank '.$prox.'-'.$prox_.'</a>';
     $tt = true;
    }
   }
   echo $anterior;
   if($tt == true) echo $asd;
   echo $proxima;
   echo '</div></td><tr>';
  }    
 }
 elseif($skill == "Magic") {
  $total = mysql_query("SELECT * FROM players ORDER BY maglevel");
  $tr = mysql_num_rows($total);
  $tp = $tr / $cfg['rank'];
  $tp = ceil($tp);
  $ant = $pg-1;
  $pro = $pg+1;
  $verifica = mysql_query("SELECT name,access,maglevel FROM players WHERE access < ".$accesslvl." ORDER BY maglevel DESC LIMIT ".$ini.",".$cfg['rank']."");
  if($pg == 1 or $pg == 0){
   $i = 1;
  }elseif($pg > 1){
   $i = $ini+1;
  }
  while($dados = mysql_fetch_array($verifica)) {
            $id=$i+1;
            echo ($i % 2) ? "<tr bgcolor=\"#444444\">" : "<tr bgcolor=\"#4C4B4B\">";
   echo ' 
           <td><center>'.$i.'</center></td>
           <td><a href="info.php?act=players&char='.$dados['name'].'">'.$dados['name'].'</a></td>
           <td><center>'.$dados['maglevel'].'</center></td>
          </tr>';
    $i++;
  }

  if($tr > $cfg['rank']){
   echo '<tr>
        <td colspan=3><div align="right">';
   if($pg > 1){
    $anterior = '<a href="?skill='.$skill.'&pg='.$ant.'">Rank '.$ante.'</a>';
   }
   if($pg != 11){
    if($pg < $tp){
     $proxima = '<a href="?skill='.$skill.'&pg='.$pro.'">Rank '.$prox.'-'.$prox_.'</a>';
     $tt = true;
    }
   }
   echo $anterior;
   if($tt == true) echo $asd;
   echo $proxima;
   echo '</div></td><tr>';
  } 
 }
 
 elseif($skill == "Reset") {
  $total = mysql_query("SELECT * FROM players ORDER BY reset");
  $tr = mysql_num_rows($total);
  $tp = $tr / $cfg['rank'];
  $tp = ceil($tp);
  $ant = $pg-1;
  $pro = $pg+1;
  $verifica = mysql_query("SELECT name,access,reset FROM players WHERE access < ".$accesslvl." ORDER BY reset DESC LIMIT ".$ini.",".$cfg['rank']."");
  if($pg == 1 or $pg == 0){
   $i = 1;
  }elseif($pg > 1){
   $i = $ini+1;
  }
  while($dados = mysql_fetch_array($verifica)) {
            $id=$i+1;
            echo ($i % 2) ? "<tr bgcolor=\"#444444\">" : "<tr bgcolor=\"#4C4B4B\">";
   echo ' 
           <td><center>'.$i.'</center></td>
           <td><a href="info.php?act=players&char='.$dados['name'].'">'.$dados['name'].'</a></td>
           <td><center>'.$dados['reset'].'</center></td>
          </tr>';
    $i++;
  }

  if($tr > $cfg['rank']){
   echo '<tr>
        <td colspan=3><div align="right">';
   if($pg > 1){
    $anterior = '<a href="?skill='.$skill.'&pg='.$ant.'">Rank '.$ante.'</a>';
   }
   if($pg != 11){
    if($pg < $tp){
     $proxima = '<a href="?skill='.$skill.'&pg='.$pro.'">Rank '.$prox.'-'.$prox_.'</a>';
     $tt = true;
    }
   }
   echo $anterior;
   if($tt == true) echo $asd;
   echo $proxima;
   echo '</div></td><tr>';
  } 
 }
 
 else {
  $total = mysql_query("SELECT name,access,skill FROM players, skills WHERE players.id = skills.player AND skills.id = ".$id." ORDER BY skill DESC");
  $tr = mysql_num_rows($total);
  $tp = $tr / $cfg['rank'];
  $tp = ceil($tp);
  $ant = $pg-1;
  $pro = $pg+1;
  $verifica = mysql_query("SELECT name,access,skill FROM players, skills WHERE access < ".$accesslvl." AND players.id = skills.player AND skills.id = ".$id." ORDER BY skill DESC LIMIT ".$ini.",".$cfg['rank']."");
  if($pg == 1 or $pg == 0){
   $i = 1;
  }elseif($pg > 1){
   $i = $ini+1;
  }
  while($dados = mysql_fetch_array($verifica)) {
            $id=$i+1;
            echo ($i % 2) ? "<tr bgcolor=\"#444444\">" : "<tr bgcolor=\"#4C4B4B\">";
   echo ' 
           <td><center>'.$i.'</center></td>
           <td><a href="info.php?act=players&char='.$dados['name'].'">'.$dados['name'].'</a></td>
           <td><center>'.$dados['skill'].'</center></td>
          </tr>';
    $i++;
  }
  if($tr > $cfg['rank']){
   echo '<tr>
        <td colspan=3><div align="right">';
   if($pg > 1){
    $anterior = '<a href="?skill='.$skill.'&pg='.$ant.'">Rank '.$ante.'</a>';
   }
   if($pg != 11){
    if($pg < $tp){
     $proxima = '<a href="?skill='.$skill.'&pg='.$pro.'">Rank '.$prox.'-'.$prox_.'</a>';
     $tt = true;
    }
   }
   echo $anterior;
   if($tt == true) echo $asd;
   echo $proxima;
   echo '</div></td><tr>';
  } 
 } 
  
?>
    </table>
<div align="right">
</div>
      <table width="100%" border="1" cellpadding="2" cellspacing="1">
      </table></td>
    <td width="13%" valign="top"><table width="130" border="0" align="right" cellpadding="2" cellspacing="1">
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Level">Level</a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Magic">Magic Level </a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Fist">Fist Fighting </a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Club">Club Fighting </a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Sword">Sword Fighting </a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Axe">Axe Fighting </a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Distance">Distance Fighting</a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Shield">Shielding</a></div></td>
      </tr>
      <tr>
        <td><div align="center"><a href="?act=highscores&skill=Fish">Fishing</a></div></td>
              </tr>
      <tr>
           <td><div align="center"><a href="?act=highscores&skill=Reset"><font color="orange">Resets</a></div></td></font>

      </tr>
    </table></td>
  </tr>
</table>
<?php
mysql_close();

Editado por deivisonamorim
Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...