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

[Znote AAC] Show outfit on online list

Could you be more specific? i dont understand how and where in the onlinelist.php/general.php they should be.

Help?
 
Getting error

string(47) "SELECT `group_id` FROM `players` WHERE `id` = ;"
(query - SQL error)
Type: select_single (select single row from database)

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

@Ninja
@Raggaer
 
Last edited:
I get this error, maybe someone can help me.
Code:
 PHP Warning:  imagepng() expects parameter 1 to be resource, null given in /home/frostot/public_html/outfitter.php on line 117

I have attached a photo of what you see on my website.
 

Attachments

@Ninja @Raggaer How can I add it to my characterprofile.php? I'am begginer and when I put this all characters had same outfit :p But online list work perfectly :)
 
Fatal error: Call to undefined function highscore_getAll() in C:\Webserver\htdocs\highscores.php on line 17

Running 0.4 here is my highscores.php

Code:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
echo '<link href="high.css" rel="stylesheet" type="text/css" />';
if ($config['log_ip']) {
    znote_visitor_insert_detailed_data(3);
}
if (empty($_POST) === false) {
   
    #if ($_POST['token'] == $_SESSION['token']) {
   
    /* Token used for cross site scripting security */
    if (isset($_POST['token']) && Token::isValid($_POST['token'])) {
       
        $skillid = (int)$_POST['selected'];
        $cache = new Cache('engine/cache/highscores');

        if ($cache->hasExpired()) {
            $tmp = highscore_getAll();

            $cache->setContent($tmp);
            $cache->save();
           
            $array = isset($tmp[$skillid]) ? $tmp[$skillid] : $tmp[7];
        } else {
            $tmp = $cache->load();
            $array = $tmp[$skillid];
        }
       
        if ($skillid < 9) {
        // Design and present the list
        if ($array) {
            ?>
            <h2>
                <?php echo ucfirst(skillid_to_name($skillid)); ?> scoreboard. Next update: 
                    <?php
                        if ($cache->remainingTime() > 0) {
                            $hours = seconds_to_hours($cache->remainingTime());
                            $minutes = ($hours - (int)$hours) * 60;
                            $seconds = ($minutes - (int)$minutes) * 60;
                            if ($hours >= 1) {
                                echo (int)$hours .'h';
                            }
                            if ($minutes >= 1) {
                                echo ' '. (int)$minutes .'m';
                            }
                            if ($seconds >= 1) {
                                echo ' '. (int)$seconds .'s';
                            }
                        } else {
                            echo '0s';
                        }
                    ?>. <?php echo remaining_seconds_to_clock($cache->remainingTime());?>
            </h2>
            <table>
                <tr class="yellow">
                    <td>Country:</td>
                    <td>Outfit:</td>
                    <td>Name:</td>
                    <?php
                    if ($skillid == 7) echo '<td>Level:</td><td>Experience:</td>';
                    else {
                    ?>
                    <td>Value:</td>
                    <?php
                    }
                    if ($skillid == 7 || $skillid == 6 || $skillid == 5) {
                        echo '<td>Vocation:</td>';
                    }
                    ?>
                </tr>
                    <?php
                    foreach ($array as $value) {
                        // start foreach
                        $chardata = user_character_data(user_character_id($value[0]), 'group_id');
                        if ($chardata['group_id'] < 2) {
                            echo '<tr>';
                            echo '<td width="20px" height="10px">';
                            $getaccid = mysql_query("SELECT account_id FROM players WHERE name = '$value[0]'") or die(mysql_error());
                            $parse1 = mysql_fetch_assoc($getaccid);
                            $name1 = $parse1['account_id'];
                            $flags = mysql_query("SELECT flag FROM znote_accounts WHERE account_id = '$name1'") or die(mysql_error());
                            $getflags = mysql_fetch_assoc($flags);
                            echo '<center><img src="\flags\\'.$getflags['flag'].'.png"></center>';
                            echo'</td>';
                            echo '<td class="pp">';
                            $outfit = mysql_query("SELECT * FROM players WHERE account_id = '$name1'") or die(mysql_error());
                            $getoutfit = mysql_fetch_assoc($outfit);
                            echo '<center><img src="outfitter.php?id='.$getoutfit['looktype'].'&addons='.$getoutfit['lookaddons'].'&head='.$getoutfit['lookhead'].'&body='.$getoutfit['lookbody'].'&legs='.$getoutfit['looklegs'].'&feet='.$getoutfit['lookfeet'].'"/></center>';
                            echo '</td>';
                            echo '<td><a href="characterprofile.php?name='. $value[0] .'">'. $value[0] .'</a></td>';
                            if ($skillid == 7) echo '<td>'. $value[3] .'</td>';
                            echo '<td>'. $value[1] .'</td>';
                            if ($skillid == 7 || $skillid == 6 || $skillid == 5) {
                                echo '<td>'. $value[2] .'</td>';
                            }
                            echo '</tr>';
                        }
                        // end foreach
                    }
                    ?>
            </table>
            <?php
        } else {
            echo 'Empty list, it appears all players have less than 500 experience points.';
        }
        //Done.
        }
    } else {
        echo 'Token appears to be incorrect.<br><br>';
        //Token::debug($_POST['token']);
        echo 'Please clear your web cache/cookies <b>OR</b> use another web browser<br>';
    }
}

/*
0 fist: SELECT (SELECT `name` from `players` WHERE `player_id`=`id`) AS `name`, `value` FROM `player_skills` WHERE `skillid`=0
1 club: 
2 sword: 
3 axe: 
4 dist: 
5 Shield: 
6 Fish
7 Hardcoded experience
8 Hardcoded maglevel
*/
include 'layout/overall/footer.php'; ?>

line 17 is $tmp = highscore_getAll();
 
Yes, all you need todo is to fetch the looktype, head, legs, body, feet from the user in the database and place it into the link.
already working a few hours and it really works!
thanks for the answer <3

b8IRwsc.png


new imgur loads images really fast lol
 
Hi, if someone can help me.. Im trying to include custom outfits from client, i did a replacement of sprites (the outfit i want to load is colourable elf as warrior 7.6) how can i do it? thanks in advance
 
engine/function/general.php
PHP:
function online_list() {
    if (config('TFSVersion') == 'TFS_10') return mysql_select_multi("SELECT `o`.`player_id` AS `id`, `p`.`looktype` as `looktype`, `p`.`lookaddons` as `lookaddons`, `p`.`lookhead` as `lookhead`, `p`.`lookbody` as `lookbody`, `p`.`looklegs` as `looklegs`, `p`.`lookfeet` as `lookfeet`, `p`.`name` as `name`, `p`.`level` as `level`, `p`.`vocation` as `vocation` FROM `players_online` as `o` INNER JOIN `players` as `p` ON o.player_id = p.id");
    else return mysql_select_multi("SELECT `name`, `level`, `vocation`, `looktype`, `lookaddons`, `lookhead`, `lookbody`, `looklegs`, `lookfeet` FROM `players` WHERE `online`='1' ORDER BY `name` DESC;");
}
onlinelist.php
PHP:
echo '<td><div style="position:relative; left:-32px; top:-48px;"><div style="background-image: url(outfitter.php?a='.$value['looktype'].'&b='.$value['lookaddons'].'&c='.$value['lookhead'].'&d='.$value['lookbody'].'&e='.$value['looklegs'].'&f='.$value['lookfeet'].'&g=0&h=3&i=1);width:64px;height:64px;position:absolute;background-repeat:no-repeat;background-position:right bottom;"></div></div></td>';

bjvZDWo.png


- - - Edit - - -

Download: Outfitter-1031
Hi, I got this code:

Code:
<div class="imageT" style="background-image: url('outfiter2/outfit.php?a=130&b=0&c=38&d=40&e=39&f=114&h=3');">
does this "outfitter.php" file works with it? how to make it work?
 
Back
Top