• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Gesior, Server Offline / Player Afk Problem!

Dylanaw

Godly Member
Joined
Feb 18, 2009
Messages
473
Reaction score
10
Hello guys, (Since i may not even say what tfs i am using i will use "*" instead.)

I use Gesrior version for TFS 0.* rev. ****+.
My TFS is 0.* rev ****.
I use Uniform server.
Also i'm on Windows.

My problem:
The website says my server is offline, BUT the server is online!
Second Problem:
It says 1 player is afk. (But the character is not afk in-game.)
Also when a second player log-in then it just shows 2 players afk, it never shows 1 Player Active or 2 Player active.

Here is a screenshot for better understanding:

2ls9xj9.png


If u want me to post any file then please say so.

I hope someone is able to help me.

Kind regards,

Dylanaw
 
Last edited:
Use latest Gesior, I didnt had any problem with it, Gesior 2012 1.0.1 http://otland.net/f118/gesior-2012-version-1-0-1-0-2-x-0-3-6-all-0-4-a-176677/

I am using it currently...

I hope my thread wont be again closed for just copy paste the information of what version of gesior im using...

this is the one i'm using.
https://github.com/gesior/Gesior2012..._rev_3703+.zip - version for TFS 0.4 rev. 3703+

(AGAIN IM NOT ASKING ANY HELP WITH >>>TFS 0.4<<< , IM ASKING HELP WITH GESIOR!)
 
Goto Layout.php
find this
LUA:
if($config['status']['serverStatus_online'] == 1)
change it for this
LUA:
if($config['status']['serverStatus_online'] >= 0)

find this
LUA:
echo $config['status']['serverStatus_players'].'<br />Players Online';
change it for this
LUA:
echo ''.$number_of_players_online.'<br />Players Online';

BEFORE
<head>
paste this
LUA:
  <?PHP
$update_interval = 10;
if(count($config['site']['worlds']) > 1)
{
        $worlds .= '<i>Select world:</i> ';
        foreach($config['site']['worlds'] as $id => $world_n)
        {
                $worlds .= ' <a href="?subtopic=whoisonline&world='.$id.'">'.$world_n.'</a> , ';
                if($id == (int) $_GET['world'])
                {
                        $world_id = $id;
                        $world_name = $world_n;
                }
        }
        $main_content .= substr($worlds, 0, strlen($worlds)-3);
}
if(!isset($world_id))
{
        $world_id = 0;
        $world_name = $config['server']['serverName'];
}
$order = $_REQUEST['order'];
if($order == 'level')
        $orderby = 'level';
elseif($order == 'vocation')
        $orderby = 'vocation';
if(empty($orderby))
        $orderby = 'name';
$tmp_file_name = 'cache/whoisonline-'.$orderby.'-'.$world_id.'.tmp';
if(file_exists($tmp_file_name) && filemtime($tmp_file_name) > (time() - $update_interval))
{
        $tmp_file_content = explode(",", file_get_contents($tmp_file_name));
        $number_of_players_online = $tmp_file_content[0];
        $players_rows = $tmp_file_content[1];
}
else
{
        $players_online_data = $SQL->query('SELECT * FROM players WHERE world_id = '.(int) $world_id.' AND online > 0 ORDER BY '.$orderby);
        $number_of_players_online = 0;
        foreach($players_online_data as $player)
        {
                $number_of_players_online++;
                $acc = $SQL->query('SELECT * FROM '.$SQL->tableName('accounts').' WHERE '.$SQL->fieldName('id').' = '.$player['account_id'].'')->fetch();
                if(is_int($number_of_players_online / 2))
                        $bgcolor = $config['site']['darkborder'];
                else
                        $bgcolor = $config['site']['lightborder'];
                        $rs = "";
if ($player['skulltime'] > 0 && $player['skull'] == 3)
                $rs = "<img style='border: 0;' src='./images/whiteskull.gif'/>";
        elseif ($player['skulltime'] =  $player['skull'] == 4)
                $rs = "<img style='border: 0;' src='./images/redskull.gif'/>";
        elseif ($player['skulltime'] =  $player['skull'] == 5)
                $rs = "<img style='border: 0;' src='./images/blackskull.gif'/>";
                
                $players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=10%><image src="images/flags/'.$acc['flag'].'.png"/></TD><TD WIDTH=70%><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].$rs.'</A></TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD></TR>';
        }

Credits to GodMartin from Blacktibia.
 
I tried it.

The script:
LUA:
 <?PHP
$update_interval = 10;
if(count($config['site']['worlds']) > 1)
{
        $worlds .= '<i>Select world:</i> ';
        foreach($config['site']['worlds'] as $id => $world_n)
        {
                $worlds .= ' <a href="?subtopic=whoisonline&world='.$id.'">'.$world_n.'</a> , ';
                if($id == (int) $_GET['world'])
                {
                        $world_id = $id;
                        $world_name = $world_n;
                }
        }
        $main_content .= substr($worlds, 0, strlen($worlds)-3);
}
if(!isset($world_id))
{
        $world_id = 0;
        $world_name = $config['server']['serverName'];
}
$order = $_REQUEST['order'];
if($order == 'level')
        $orderby = 'level';
elseif($order == 'vocation')
        $orderby = 'vocation';
if(empty($orderby))
        $orderby = 'name';
$tmp_file_name = 'cache/whoisonline-'.$orderby.'-'.$world_id.'.tmp';
if(file_exists($tmp_file_name) && filemtime($tmp_file_name) > (time() - $update_interval))
{
        $tmp_file_content = explode(",", file_get_contents($tmp_file_name));
        $number_of_players_online = $tmp_file_content[0];
        $players_rows = $tmp_file_content[1];
}
else
{
        $players_online_data = $SQL->query('SELECT * FROM players WHERE world_id = '.(int) $world_id.' AND online > 0 ORDER BY '.$orderby);
        $number_of_players_online = 0;
        foreach($players_online_data as $player)
        {
                $number_of_players_online++;
                $acc = $SQL->query('SELECT * FROM '.$SQL->tableName('accounts').' WHERE '.$SQL->fieldName('id').' = '.$player['account_id'].'')->fetch();
                if(is_int($number_of_players_online / 2))
                        $bgcolor = $config['site']['darkborder'];
                else
                        $bgcolor = $config['site']['lightborder'];
                        $rs = "";
if ($player['skulltime'] > 0 && $player['skull'] == 3)
                $rs = "<img style='border: 0;' src='./images/whiteskull.gif'/>";
        elseif ($player['skulltime'] =  $player['skull'] == 4)
                $rs = "<img style='border: 0;' src='./images/redskull.gif'/>";
        elseif ($player['skulltime'] =  $player['skull'] == 5)
                $rs = "<img style='border: 0;' src='./images/blackskull.gif'/>";
 
                $players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=10%><image src="images/flags/'.$acc['flag'].'.png"/></TD><TD WIDTH=70%><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].$rs.'</A></TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD></TR>';
        }
It gives a error.
When i edit it and save it when i reload page. It says internal 500 error, wrongly configured, i did exatly same as u said.

- - - Updated - - -

Problem fixed. Godiskungen helped me =)
 
i need help what did u do
?


system/load.compat.php

replace
PHP:
$statusInfo = new ServerStatus($config['server']['ip'], $config['server']['statusPort'], 1);

with this
PHP:
$statusInfo = new ServerStatus('127.0.0.1', $config['server']['statusPort'], 1);
 
Last edited:
Back
Top