• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

RevScripts Rank Reset

jel

Member
Joined
Mar 22, 2014
Messages
302
Reaction score
12
Good morning, I'm trying to put a top reset on my website, but it doesn't count the amount of normal resets, all players have the same amount of resets

using gesior 2012

Lua:
<?php if ($config['site']['widget_PremiumBox']) { ?>
<?php

$storage_number = 731500;
$values = $SQL->query('SELECT name, level, value FROM players, player_storage WHERE group_id < 3 AND players.id = player_storage.player_id AND player_storage.key = ".$storage_number." ORDER BY CAST(value AS DECIMAL) DESC LIMIT 5');
?>
<style type="text/css" media="all">
  .Toplevelbox {
    top: -4px;
    position: relative;
    margin-bottom: 10px;
    width: 180px;
    height: 346px;
  }

  .top_level_x {
    position: absolute;
    top: 29px;
    left: 6px;
    height: 290px;
    width: 168px;
    z-index: 20;
    text-align: center;
    padding-top: 6px;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 9.2pt;
    color: black;
    font-weight: bold;
    text-align: right;
    text-decoration: inherit;
    text-shadow: 0.1em 0.1em #333
  }

  .top_level {
    position: absolute;
    top: 29px;
    left: 6px;
    height: 300px;
    width: 168px;
    z-index: 20;
    text-align: center;
    padding-top: 6px;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 9.2pt;
    color: black;
    font-weight: bold;
    text-align: right;
    text-decoration: inherit;
    text-shadow: 0.1em 0.1em #333
  }

  #Topbar a {
  text-decoration: none;
  cursor: auto;
  }
  a.topfont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 11px;
    color: #ffcc33;
    text-decoration: none
    text-shadow: #FA0606 1px 1px 10px;
  }
  a:hover.topfont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 11px;
    color: #CCC;
    text-decoration:none
  }
</style>
<div id="Topbar" class="Themebox" style="background-image:url(<?PHP echo $layout_name; ?>/images/global/themeboxes/top_level.png);">
  <div class="top_level" style="background:url(<?PHP echo $layout_name; ?>/images/bg_top.png)" align="    ">
    <?php
    $a = 1;
   
    foreach($values as $value) {
     
      echo '<div align="left">
      <a href="?subtopic=characters&name='.$value['name'].'" class="topfont">
        <font color="#CCC">&nbsp;&nbsp;&nbsp;&nbsp;'.$a.' - </font>'.$value['name'].'
        <br>
        <small><font color="white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets: ('.$value['value'].')</font></small>
        <br>
      </a>
     
       <img src="http://outfit-images.ots.me/1285_walk_animation/outfit.php?id='.$value['looktype'].'&addons='.$value['lookaddons'].'&head='.$value['lookhead'].'&body='.$value['lookbody'].'&legs='.$value['looklegs'].'&feet='.$value['lookfeet'].'" width="64" height="64" style="width: 64px; height: 64px; position: absolute; background-position: 0 0; background-repeat: no-repeat; left: -50px; margin-top: -70px;">

      </div>';
     
      $a++;
    }
    ?>
    <div class="Bottom" style="background-image:url(<?PHP echo $layout_name; ?>/images/global/general/box-bottom.gif); margin-top: 70px;; margin-left:-5px;">
</div>
</body>
</html>
<?php }?>

 
Modify the code to this:

PHP:
$values = $SQL->query('SELECT players.name, players.level, player_storage.value
                        FROM players
                        JOIN player_storage ON players.id = player_storage.player_id
                        WHERE player_storage.key = '.$storage_number.' AND players.group_id < 3
                        ORDER BY CAST(player_storage.value AS DECIMAL) DESC
                        LIMIT 5');
 
Modify the code to this:

PHP:
$values = $SQL->query('SELECT players.name, players.level, player_storage.value
                        FROM players
                        JOIN player_storage ON players.id = player_storage.player_id
                        WHERE player_storage.key = '.$storage_number.' AND players.group_id < 3
                        ORDER BY CAST(player_storage.value AS DECIMAL) DESC
                        LIMIT 5');
does it work on MyAAC?
also can you help me character.php and highscores.php? i want to put reset
 
Replace this
PHP:
$values = $SQL->query('SELECT name, level, value FROM players, player_storage WHERE group_id < 3 AND players.id = player_storage.player_id AND player_storage.key = ".$storage_number." ORDER BY CAST(value AS DECIMAL) DESC LIMIT 5');

By This:
PHP:
$values = $SQL->query('SELECT players.name, players.level, player_storage.value
                        FROM players
                        JOIN player_storage ON players.id = player_storage.player_id
                        WHERE player_storage.key = '.$storage_number.' AND players.group_id < 3
                        ORDER BY CAST(player_storage.value AS DECIMAL) DESC
                        LIMIT 5');
 
Back
Top