• 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!

AAC Some minor problems with my website.

Rallelele

Member
Joined
Jun 11, 2017
Messages
66
Reaction score
8
Hey. I've recently stumbled across a few problems while setting up my website. Some problems were not there from the beginning but somehow came up after a while?
1627838846605.png
users.php line 888:
1627838952705.png


Next problem: Power Gamers not working properly, same as Active Casters. When I do start a cast in-game it doesnt pop up under the table.
ad3193564e13e6396070118f1a41db68.png

footer.php line 123:
a736d8986f523af3187c5f4952782300.png

Gyazo (https://gyazo.com/a736d8986f523af3187c5f4952782300)

And the last problem, which I didnt have at first but it somehow came after a while of setting it all up. The Outfits doesnt show on the Highscores-list, and the Flags doesnt show on the Online-list. As mentioned, this previously worked. And also on Highscores there are no vocations available, just the Arrays.
1627839172234.png
5f1ec3e72d6e184f8a1d3ea87913c82d.png


Onlinelist.php line 31:
a5232ad4fbaa0fd2bd99fa2a04e54aaa.png


Huge thanks to anyone contributing with any sort of help, even the smallest information on how to fix it.
 
You're using Znote AAC or MyAAC? And which version is your server, 1.3, 0.3.6, 0.4, 1.2? First we need to know if you're using that layout on the corresponding engine for the layout you're using. Also which layout you're using as base? The only that comes to my head for now is this [Znote AAC] old school layout (https://otland.net/threads/znote-aac-old-school-layout.248475/).

For onlinelist.php try
PHP:
<?php
require_once 'engine/init.php';
error_reporting(E_ALL ^ E_NOTICE);
?>

    <?php
    $record = mysql_select_single('SELECT * FROM `server_record` ORDER BY `record` DESC LIMIT 1;');
    ?>
    <table cellpadding="4" border="1" cellspacing="1" width="100%">
        <tr>
            <th>
                Server Status
            </th>
        </tr>
        <tr>
            <td>
                Currently <strong><?php echo user_count_online(); ?></strong> players are online on <strong><?php echo $config['site_title']; ?></strong>.
            </td>
        </tr>
    </table>
<?php
function online_list_hemrenus($order) {
    if($order == 'name') { $orderby = 'name'; }
    elseif($order == 'lvl') { $orderby = 'level'; }
    elseif($order == 'voc') { $orderby = 'vocation'; }
    else { $orderby = 'name'; }
    
    if (config('TFSVersion') == 'TFS_10') return mysql_select_multi("SELECT `o`.`player_id` AS `id`, `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players_online` as `o` INNER JOIN `players` as `p` ON `o`.`player_id` = `p`.`id` LEFT JOIN `guild_membership` gm ON `o`.`player_id` = `gm`.`player_id` LEFT JOIN `guilds` g ON `gm`.`guild_id` = `g`.`id`");
    else return mysql_select_multi("SELECT `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation`, `g`.`name` as `gname` FROM `players` p LEFT JOIN `guild_ranks` gr ON `gr`.`id` = `p`.`rank_id` LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id` WHERE `p`.`online` = '1' ORDER BY `p`.`".$orderby."` DESC;");
}
$array = online_list_hemrenus(htmlspecialchars($_GET['order']));
if ($array) {
    ?>

    <table class="stripped" cellpadding="4" border="1" cellspacing="1" width="100%">
        <tr>
        <tr>
            <th><strong><a style="color: #fff;" href="onlinelist.php?order=name">Name</a></strong></td>
            <th width="10%"><strong><a style="color: #fff;" href="onlinelist.php?order=lvl">Level</a></strong></th>
            <th width="20%"><strong><a style="color: #fff;" href="onlinelist.php?order=voc">Vocation</a></strong></th>
        </tr>
            <?php
            foreach ($array as $value) {
                echo '<tr>';
            $url = url("characterprofile.php?name=". $value['name']);
    
            
            echo '';
            echo '<td><strong><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></strong></td>';
            echo '<td>'. $value['level'] .'</td>';
            echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>';
            echo '</tr>';
            }
            ?>
    </table>

    <?php
} else {
    echo '<table cellpadding="4"><tr><th>Players Online</th></tr><tr><td>Nobody is online.</td></tr></table>';
}
?>

    <form type="submit" action="characterprofile.php" method="get">
 
    <table border="1" cellspacing="1" cellpadding="4" width="100%">
        <tr><th >Search Character</th></tr>
        <tr><td>
            <table style="width: auto;margin: 0;">
        
            
                <tr>
                    <td><strong>Name:</strong></td><td><input size="29" type="text" name="name" class="search"></td>
                    <td>
                    <input type="Submit" value="" class="hover" style="background: url(layout/tibia_img/sbutton_submit.gif); width:120px;height:18px;border: 0 none;" border="0"></td>
                </tr>
            

            </table>
        </td></tr>
    </table>
 
    </form>

About highscores.php I think is not really necessary to have vocation filter, just use the the skill filter. For this, remove:
PHP:
<form type="submit" action="" method="GET">
    <br>
    <center>Skill: <input type="hidden" name="page" value="highscores"/>
        <select style="vertical-align:middle;" name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>
        &nbsp;&nbsp;Vocation: <select style="vertical-align:middle;" name="vocation">
            <option value="-1" <?php if ($vocation < 0) echo "selected"; ?>>Any vocation</option>

            <?php
            foreach (config('vocations') as $v_id => $v_name) {
                $selected = ($vocation == $v_id) ? " selected" : NULL;

                echo '<option value="'. $v_id .'"'. $selected .'>'. $v_name .'</option>';
            }
            ?>
        </select>
    
         <input type="submit" class="hover" value=""
    style="background-image: url(layout/tibia_img/sbutton_submit.gif); vertical-align:middle; border: solid 0px #000000; width: 120px; height: 18px;" />
        </center>
    </form>
 
 
        <br><center><span class="pagination">
            <?php
            $pages = ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($scores[$type]) / $highscore['rowsPerPage'])));
            for ($i = 0; $i < $pages; $i++) {
                $x = $i + 1;
                if ($x == $page) echo "<a href=\"?".$_SERVER['QUERY_STRING']."&pag=".$x."\" class=\"current\">".$x."</a>";
                else echo "<a href=\"?".$_SERVER['QUERY_STRING']."&pag=".$x."\">".$x."</a>";
            }
            ?>
        </span></center>

After deleting that, you will be in this line:
PHP:
 <table id="highscoresTable" cellpadding="4" class="stripped">

Above that line (table id ="highscoresTable"), paste the following:
PHP:
    <form type="submit" action="" method="GET">
    <br>
<table border="1" cellspacing="1" cellpadding="4" width="100%">  <td class="white"><b><?php echo $config['site_title'] ?> | Highscores<b></td>
  <tr bgcolor="#505050">
  <td class="white">    <center>Skill: <input type="hidden" name="page" value="highscores"/>
        <select style="vertical-align:middle;" name="type">
            <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option>
            <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option>
            <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option>
            <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option>
            <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option>
            <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option>
            <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option>
            <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option>
            <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option>
        </select>
    
         <input type="submit" class="hover" value=""
    style="background-image: url(layout/tibia_img/sbutton_submit.gif); vertical-align:middle; border: solid 0px #000000; width: 120px; height: 18px;" />
        </center></td>
  </tr>
    </form>

The outcome would be something like:
highscores.png

About active casters. I made it work for 0.4 and 0.3.6 but this system doesn't work for 1.3 because this version doesn't support it. (unless you compile it and made some modifications). If you could provide more information, as I said in the begining of the post, I can help you more ^^
 
Sorry! Yeah, I'm using ZnoteAAC as well as the TFS 0.4. And the layout I'm using is the one you linked as well! Thanks. 😍
finally solved? if not you can post again the errors you still having?

it was only 3 errors right?

1 - account
2- power gamers
3- online list
 
Sorry! Yeah, I'm using ZnoteAAC as well as the TFS 0.4. And the layout I'm using is the one you linked as well! Thanks. 😍

Ok, for the live cast system, as I said I fixed it before but I no longer have it in my files. I remember I just followed this post

You should take a look here too

Not sure if will work, post back if it doesn't. About powergamers, not really sure, but that's highscores table right? Try this on header.php. Remember to set-up the image server for the outfits.

PHP:
<div class="border_bottom">
                    </div>
                    <div class="left_box">
                    <div class="corner_lt"></div><div class="corner_rt"></div><div class="corner_lb"></div><div class="corner_rb"></div>
                    <div class="title"><img src="layout/img/exp.gif"><span style="background-image: url(layout/widget_texts/powergamers.png);"></span></div>
                    <div class="content">
                        <div class="rise-up-content">
                        <ul class="toplvl">
 <?php
            $cache = new Cache('engine/cache/topPlayer');
            if ($cache->hasExpired()) {
                $players = mysql_select_multi('SELECT `name`, `level`, `experience`, `looktype`, `lookaddons`, `lookhead`, `lookbody`, `looklegs`, `lookfeet` FROM `players` WHERE `group_id` < ' . $config['highscore']['ignoreGroupId'] . ' ORDER BY `experience` DESC LIMIT 5;');
                $cache->setContent($players);
                $cache->save();
            } else {
                $players = $cache->load();
            }
            if ($players) {
            $count = 1;
            foreach($players as $player) {
            echo '<img style="margin-top: -35px; margin-left: -35px;" src="layout/outfitter/outfit.php?id='.$player['looktype'].'&addons='.$player['lookaddons'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].'&g=0&h=3&i=1"></img> <a href="characterprofile.php?name='.$player['name'].'">'.$player['name'].'</a> (<span>' . $player['level'].')<br>';
           $count++;
            }
            }
            ?>
                            </ul>
                        </div>
                    </div>
                    <div class="border_bottom"></div>
                </div>
                </div>
            </div>
 
Back
Top