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

[Gesior AAC] Show outfit (characters & whoisonline.php)

Status
Not open for further replies.

Ninja

Global Moderator
Staff member
Global Moderator
Joined
Apr 6, 2010
Messages
5,947
Solutions
34
Reaction score
1,584
Location
Sweden
Hello!

I've seen in averatec's thread that there's a lot of people who is asking for this, so I thought that I could show how to make this for Gesior AAC. I'm going to use the standard characters.php & whoisonline.php for this.

characters.php

Locate the following line.
Code:
<td rowspan="2" width="68" height="68" align="center" valign="bottom">'.$playerOutfit.'</td>

and replace it with this.
Code:
<td rowspan="2" width="68" height="68" align="center" valign="bottom"><image src="[COLOR=#ff0000]outfitter.php[/COLOR]?id='.$player->getLookType().'&addons='.$player->getLookAddons().'&head='.$player->getLookHead().'&body='.$player->getLookBody().'&legs='.$player->getLookLegs().'&feet='.$player->getLookFeet().'"/></td>

Another version for characters.php
Add this above the comment code in characters.php
Code:
            // ** OUTFIT SHOWER                             if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                            $main_content .= '<TD BGCOLOR="'.$bgcolor.'">Outfit:<TD style="background-color: '.$bgcolor.'"><image src="[COLOR=#ff0000]outfitter.php[/COLOR]?id='.$player->getLookType().'&addons='.$player->getLookAddons().'&head='.$player->getLookHead().'&body='.$player->getLookBody().'&legs='.$player->getLookLegs().'&feet='.$player->getLookFeet().'"/></TD></TD>';
            //END

whoisonline.php

Locate this
Code:
<TD WIDTH=60%>'.$flag.'<A HREF="index.php?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].'</A></TD>

and add this above it
Code:
<TD><div style="position: relative; width: 32px; height: 32px;"><div style="background-image: url(\'[COLOR=#ff0000]outfitter.php[/COLOR]?id='.$player['looktype'].'&addons='.$player['lookaddons'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].'\'); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 0px; bottom: 0px;"></div></div></TD>

Find this.
Code:
<TD><A HREF="index.php?subtopic=whoisonline&order=name" CLASS=white>Name</A></TD>

and add this above.
Code:
<TD CLASS=white><b>Outfit</b></TD>

Remember to change the path for the outfitter.php if it's not working!

How it looks like when it's done

cAhyHWl.png


5UyvHA3.png


bB4g_3i.png


Remember to change the path for the outfitter.php if it's not working!

PHP files that I used for this

  • Characters.php: here

  • Whoisonline.php: here

Enjoy!

Sincerely,
Ninja
 
Last edited:
You're welcome.

The position of the outfit needs to get adjusted in whoisonline.php to make it look better though. :p

If anyone needs this for their online list (CipSoft look a like), leave a message here.
 
You're welcome.

The position of the outfit needs to get adjusted in whoisonline.php to make it look better though. :p

If anyone needs this for their online list (CipSoft look a like), leave a message here.

Mee want!
 
I need for Modern account ,, who is online..

I add code.. but page no respond..

<?php
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = POT::getInstance()->getDBHandle();

global $config;

require("system/application/config/create_character.php");
$GLOBALS['players'] = $players;

echo '<br /><div align="center">';
@$_world = (int)$_REQUEST['world'];
if(!@$config['servers'][$_world]['vapusid'])
echo @"Please edit your config.php:<br /><span style=\"font-size: 8px\">\$config['servers'][{$_world}]['vapusid'] = ID; // Replace ID with the server id from **********<br />
To get the ID just register and click on the server the last number in the URL is your ID (/otlist.serv/10 means ID = 10)
</span>";
else
echo @'<a href="http://**********/otlist.serv/'.$config['servers'][$_world]['vapusid'].'"><img src="http://**********/otlist.graph/'.$config['servers'][$_world]['vapusid'].'/'.$config['VAPusGraphStep'].'" alt="http://********** Server Graph" /></a>';

echo "</div><br />";

$ide = new IDE;
try { $ide->loadInjections("players_online"); } catch(Exception $e) { error($e->getMessage()); }
echo form_open("character/online", array('method'=>'POST'));
if(count($config['worlds']) > 1) {
echo "<b>World </b> &nbsp; <select name='world'>";
echo "<option value=''>All</optino>";
foreach($config['worlds'] as $key=>$value) {
echo "<option ".set_select('world', $key)." value='$key'>$value</option>";
}
echo "</select>&nbsp; &nbsp;";

}
echo "<b>Sort by </b> &nbsp; <select name='sort'>";
echo "<option value=''>None</option>";
echo "<option ".set_select('sort', 'level')." value='level'>Level</option>";
echo "<option ".set_select('sort', 'Vocation')." value='Vocation'>Profession</option>";
echo "<option ".set_select('sort', 'name')." value='name'>Name</option>";
echo "</select>";
echo "&nbsp; <input type='submit' value='Order'>";
echo "</form>";

echo "</form>";

$playerss = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `online`>0;')->fetch();
echo '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD CLASS=black><B>Server Status</B></TD>
</TR>
<TR BGCOLOR='.$config['site']['darkborder'].'>
<TD>';

ECHO 'Currently there are '.$playerss[0].' active players';
ECHO ' on Beregond.<br>
</TD>
</TR>


</TABLE><BR>';

function online_list() {
$count = user_count_online();
$query = mysql_query("SELECT `name`, `level`, `vocation`, `lookfeet`, `lookhead`, `looklegs`, `lookbody`, `looktype`, `lookaddons` FROM `players` WHERE `online`='1' ORDER BY `name` DESC;");
for ($i = 0; $i < $count; $i++) {
$row = mysql_fetch_row($query);
$array[] = $row;
}

if (isset($array)) {
return $array;
} else {
return false;
}
}


if(count($players) > 0) {
echo "<table width='100%'>";
echo "<tr><td><center><b>Name</b></center></td><td><center><b>Level</b></center></td><td><center><b>Vocation</b></center></td><td><center><b>World</b></center></td></tr>";
foreach($players as $row) {
if(in_array(strtolower($row['name']), $config['restricted_names'])) continue;
echo "<tr><td><center><a href=\"../character/view/".$row['name']."\">".$row['name']."</a></center></td><td><center>".$row['level']."</center></td><td><center>".getVocationName($row['vocation'], $row['promotion'])."</center></td><td><center>".$config['worlds'][$row['world_id']]."</center></td></tr>";
}
echo "</table>";
}
else
alert("There is no players online.");
?>
 
in my gesior no have the lines cited on topic in whoisonline and characters '-'
 
It's not made for all the characters.php & whoisonline.php out there. Can't you see what I've done it the first post and try to add it to your files?
 
The script I used is at the bottom of the first post.

Send me a PM with your script so I can take a look at it. :p
 
Yes I could do that when I'm at a computer. :p

- - - Updated - - -

I did this on my phone but should work. Remember to change the oufiter path..

http://pastebin.com/t1VAhdZJ
 
Thx, now i dont get more a blank page, the images were not showing up, why you missed a "t" in outfitter, but now its working thx.
 
I didn't missed a "t" though because it is supposed to be "outfiter" instead of "outfitter", averatec probably added a "t" by mistake. :p

- - - Updated - - -

Here's online list for modern aac.

http://pastebin.com/JSNS2cRp

remember to change the outfiter location and change `online`='0' to `online`='1' (Tested outfits through that way). I used divs this time to make it look better.
 
Mistake or not, but players downloading his file and everyone got this problem, so good code is:
Code:
<TD><image src="outfitter/outfitter.php?id='.$player['looktype'].'&addons='.$player['lookaddons'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].'"/></TD>
 
It's just the name that's different. Still the very same code.
 
Well i know, but not everyone can know that after downloading author file, so there are 2 options:
1. Change name in code to "outfitter" or put download link to file with changed this name to "outfiter" or everyone needs to read this thread to fix it.
Just make life a bit easier.
 
Status
Not open for further replies.
Back
Top