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

Tibia 11 Discussion(+Tutorial how to able to use it)

do i have to edit something in login.php @Znote ??? im pretty sure i did everything okey with the client i have the same name t config-lua and config.php
i can get the character list ut whee i try to log in i get erros as these
im using otx 11.47- tfs1.3
char list
5mwMnlJ.png



errors...
HqsM5gH.png

SY8r9ku.png


we should stop using tibia clients u.u

In config.php, gameserver info must be correct (write your ip there, and the server name must match what is written in config.lua).
I just tested 11.47 and got the battlEye issue, but I tested on 11.46 and it worked. If you contact me on Discord I can hook you up with a download link to 11.46.
 
In config.php, gameserver info must be correct (write your ip there, and the server name must match what is written in config.lua).
I just tested 11.47 and got the battlEye issue, but I tested on 11.46 and it worked. If you contact me on Discord I can hook you up with a download link to 11.46.
i dont know how to use disccord could you link the 11.46 client here @Znote pls

regards men
 
@Znote Any updates on the Battleye issue? After the login screen it says it cannot connect to game server. I'm using 11.49.5921. Any way we can get info on reverting to 11.46?
 
Last edited:
@CipsoftStinks How do I get ahold of 11.44? I've tried googling for it, but Tibia 11's auto updates have made it more difficult.

EDIT: I found another OT that uses 11.44 and Im going to download and change the login page with notepad++. I still don't know where to find an official version.
 
Is that like the only way right now to find all the files for 11.**? Downloading and changing from a different server?.
 
@CipsoftStinks How do I get ahold of 11.44? I've tried googling for it, but Tibia 11's auto updates have made it more difficult.

EDIT: I found another OT that uses 11.44 and Im going to download and change the login page with notepad++. I still don't know where to find an official version.
ask it for znote or wait me till tomorrow i can upload for you and everyoe else here
i edited with ip 127.0.01

regards
 
I can't figure this out .. If I do the changes to the exe myself the client.exe won't have the tibia icon anymore and I get some fatal error when trying to run it. If I use the client2.exe that was provided in the first post, it tells me to patch to a newer version that I can't prevent...

Can someone confirm if the latest client version (11.50?) works like this? I know I'm doing something wrong and can't figure out what.
Also is there some way to prevent the automatic update ? I didn't find a way for that either even though I searched... Haven't been around here for many years so I am a bit confused.
(just set up a TFS 1.2 server yesterday before bumping into this client issue)
 
I have now exacly the same error someone can help ?

HqsM5gH.png
I have the same problem. Someone?

I've tried 3 different scripts. It all happens the same thing ...
With the tutorial activated can enter the game, however when the tutorial ends it takes kick and starts all over again.
 
Last edited:
login.php for 11.49:
PHP:
<?php
/**
* Created by Notepad++.
* User: Malucooo - Erick Nunes
* Remaked of login.php by JLCVP and parts of login.php by Monteiro. Thanks for both!
* Modified for MyAAC by slawkens
* Date: 18/09/17
* Time: 03:01
*/

require_once('common.php');
require 'config.php';
require 'config.local.php';
// comment to show E_NOTICE [undefinied variable etc.], comment if you want make script and see all errors
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE);

require_once(SYSTEM . 'functions.php');
require_once(SYSTEM . 'init.php');

/*error example:
{
    "errorCode":3,
    "errorMessage":"Account name or password is not correct."
}*/

# Declare variables with array structure
$characters = array();
$playerData = array();
$data = array();
$isCasting = false;

# error function
function sendError($msg){
    $ret = array();
    $ret["errorCode"] = 3;
    $ret["errorMessage"] = $msg;
  
    die(json_encode($ret));
}

# getting infos
$request = file_get_contents('php://input');
$result = json_decode($request, true);

# account infos
$accountName = $result["accountname"];
$password = $result["password"];

# game port
$port = $config['lua']['gameProtocolPort'];

# check if player wanna see cast list
if (strtolower($accountName) == "cast")
    $isCasting = true;

if ($isCasting) {
    $casts = $db->query("SELECT `player_id` FROM `live_casts`")->fetchAll();
    if (count($casts[0]) == 0)
        sendError("There is no live casts right now!");
    foreach($casts as $cast) {
        $character = new OTS_Player();
        $character->load($cast['player_id']);
      
        if ($character->isLoaded()) {
            $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
            $characters[] = $char;
        }
    }
  
    $port = 7173;
    $lastLogin = 0;

    $premiumAccount = true;
    $timePremium = 30 * 86400;
}
else {
    $account = new OTS_Account();
    $account->find($accountName);
  
    if (!$account->isLoaded())
        sendError("Failed to get account. Try again!");

    $config_salt_enabled = fieldExist('salt', 'accounts');
    $current_password = encrypt(($config_salt_enabled ? $account->getCustomField('salt') : '') . $password);
    if ($account->getPassword() != $current_password)
        sendError("The password for this account is wrong. Try again!");
  
    foreach($account->getPlayersList() as $character) {
        $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
        $characters[] = $char;
    }
  
    $save = false;
    $timeNow = time();

    $query = $db->query('SELECT `premdays`, `lastday` FROM `accounts` WHERE `id` = ' . $account->getId());
    if($query->rowCount() > 0) {
        $query = $query->fetch();
        $premDays = (int)$query['premdays'];
        $lastDay = (int)$query['lastday'];
        $lastLogin = $lastDay;
    }
    else {
        sendError("Error while fetching your account data. Please contact admin.");
    }
  
    if($premDays != 0 && $premDays != PHP_INT_MAX ) {
        if($lastDay == 0) {
            $lastDay = $timeNow;
            $save = true;
        } else {
            $days = (int)(($timeNow - $lastDay) / 86400);
            if($days > 0) {
                if($days >= $premDays) {
                    $premDays = 0;
                    $lastDay = 0;
                } else {
                    $premDays -= $days;
                    $remainder = (int)(($timeNow - $lastDay) % 86400);
                    $lastDay = $timeNow - remainder;
                }

                $save = true;
            }
        }
    } else if ($lastDay != 0) {
        $lastDay = 0;
        $save = true;
    }

    if($save) {
        $db->query('UPDATE `accounts` SET `premdays` = ' . $premDays . ', `lastday` = ' . $lastDay . ' WHERE `id` = ' . $account->getId());
    }

    $premiumAccount = $premDays > 0;
    $timePremium = time() + ($premDays * 86400);
}

$session = array(
/*    "fpstracking" => false,
    "isreturner" => true,
    "returnernotification" => false,
    "showrewardnews" => false,*/
    "sessionkey" => $accountName . "\n" . $password,
    "lastlogintime" => $lastLogin,
    "ispremium" => $premiumAccount,
    "premiumuntil" => $timePremium,
    "optiontracking" => false,
    "status" => "active"
);

$world = array(
    "id" => 0,
    "name" => $config['lua']['serverName'],
    "externaladdress" => $config['lua']['ip'],
    "externalport" => $config['lua']['gameProtocolPort'],
    "previewstate" => 0,
    "location" => "BRA",
    "anticheatprotection" => false,
    "externaladdressunprotected" =>  $config['lua']['ip'],
    "externaladdressprotected" =>  $config['lua']['ip']
);

$worlds = array($world);

$data["session"] = $session;
$playerData["worlds"] = $worlds;
$playerData["characters"] = $characters;
$data["playdata"] = $playerData;

header('Content-Type: application/json');
echo json_encode($data);
//echo '<pre>' . var_export($data, true) . '</pre>';

login.php for 11.80:

PHP:
<?php
/**
* Created by Notepad++.
* User: Malucooo - Erick Nunes
* Remaked of login.php by JLCVP and parts of login.php by Monteiro. Thanks for both!
* Modified for MyAAC by slawkens
* Date: 18/09/17
* Time: 03:01
*/

require_once('common.php');
require 'config.php';
require 'config.local.php';
// comment to show E_NOTICE [undefinied variable etc.], comment if you want make script and see all errors
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE);

require_once(SYSTEM . 'functions.php');
require_once(SYSTEM . 'init.php');

/*error example:
{
    "errorCode":3,
    "errorMessage":"Account name or password is not correct."
}*/

# Declare variables with array structure
$characters = array();
$playerData = array();
$data = array();
$isCasting = false;

# error function
function sendError($msg){
    $ret = array();
    $ret["errorCode"] = 3;
    $ret["errorMessage"] = $msg;
  
    die(json_encode($ret));
}

# getting infos
$request = file_get_contents('php://input');
$result = json_decode($request, true);

# account infos
$accountName = $result["accountname"];
$password = $result["password"];

# game port
$port = $config['lua']['gameProtocolPort'];

# check if player wanna see cast list
if (strtolower($accountName) == "cast")
    $isCasting = true;

if ($isCasting) {
    $casts = $db->query("SELECT `player_id` FROM `live_casts`")->fetchAll();
    if (count($casts[0]) == 0)
        sendError("There is no live casts right now!");
    foreach($casts as $cast) {
        $character = new OTS_Player();
        $character->load($cast['player_id']);
      
        if ($character->isLoaded()) {
            $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
            $characters[] = $char;
        }
    }
  
    $port = 7173;
    $lastLogin = 0;

    $premiumAccount = true;
    $timePremium = 30 * 86400;
}
else {
    $account = new OTS_Account();
    $account->find($accountName);
  
    if (!$account->isLoaded())
        sendError("Failed to get account. Try again!");

    $config_salt_enabled = fieldExist('salt', 'accounts');
    $current_password = encrypt(($config_salt_enabled ? $account->getCustomField('salt') : '') . $password);
    if ($account->getPassword() != $current_password)
        sendError("The password for this account is wrong. Try again!");
  
    foreach($account->getPlayersList() as $character) {
        $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
        $characters[] = $char;
    }
  
    $save = false;
    $timeNow = time();

    $query = $db->query('SELECT `premdays`, `lastday` FROM `accounts` WHERE `id` = ' . $account->getId());
    if($query->rowCount() > 0) {
        $query = $query->fetch();
        $premDays = (int)$query['premdays'];
        $lastDay = (int)$query['lastday'];
        $lastLogin = $lastDay;
    }
    else {
        sendError("Error while fetching your account data. Please contact admin.");
    }
  
    if($premDays != 0 && $premDays != PHP_INT_MAX ) {
        if($lastDay == 0) {
            $lastDay = $timeNow;
            $save = true;
        } else {
            $days = (int)(($timeNow - $lastDay) / 86400);
            if($days > 0) {
                if($days >= $premDays) {
                    $premDays = 0;
                    $lastDay = 0;
                } else {
                    $premDays -= $days;
                    $remainder = (int)(($timeNow - $lastDay) % 86400);
                    $lastDay = $timeNow - remainder;
                }

                $save = true;
            }
        }
    } else if ($lastDay != 0) {
        $lastDay = 0;
        $save = true;
    }

    if($save) {
        $db->query('UPDATE `accounts` SET `premdays` = ' . $premDays . ', `lastday` = ' . $lastDay . ' WHERE `id` = ' . $account->getId());
    }

    $premiumAccount = $premDays > 0;
    $timePremium = time() + ($premDays * 86400);
}

$session = array(
/*    "fpstracking" => false,
    "isreturner" => true,
    "returnernotification" => false,
    "showrewardnews" => false,*/
    "sessionkey" => $accountName . "\n" . $password,
    "lastlogintime" => $lastLogin,
    "ispremium" => $premiumAccount,
    "premiumuntil" => $timePremium,
    "optiontracking" => false,
    "status" => "active"
);

/*
$online = mysql_select_single("SELECT COUNT(`player_id`) AS `count` FROM `players_online`;");
$response = array(
    'playersonline'         => ($online !== false) ? (int)$online['count'] : 0,
    'twitchstreams'         => 0,
    'twitchviewer'         => 0,
    'gamingyoutubestreams'     => 0,
    'gamingyoutubeviewer'     => 0
)*/

$world = array(
    "id" => 0,
    "name" => $config['lua']['serverName'],
    "externalportunprotected" => $port,
    "externalportprotected" => $port,
    "previewstate" => 0,
    "location" => "BRA",
    "anticheatprotection" => false,
    "externaladdressunprotected" => $config["lua"]["ip"],
    "externaladdressprotected" => $config["lua"]["ip"]
);

$worlds = array($world);

$data["session"] = $session;
$playerData["worlds"] = $worlds;
$playerData["characters"] = $characters;
$data["playdata"] = $playerData;

header('Content-Type: application/json');
echo json_encode($data);
//echo '<pre>' . var_export($data, true) . '</pre>';
 
I get a connection refused with the client that ZNote (I think) posted (client2.exe). I checked already my login.php, config.lua and have the newest ZNote from their github. Am I missing something? Can someone help? I can use OT Client to log in but I want a friend (the one that I am doing an OT server with) to log in but he cant. Thank you
 
login.php for 11.49:
PHP:
<?php
/**
* Created by Notepad++.
* User: Malucooo - Erick Nunes
* Remaked of login.php by JLCVP and parts of login.php by Monteiro. Thanks for both!
* Modified for MyAAC by slawkens
* Date: 18/09/17
* Time: 03:01
*/

require_once('common.php');
require 'config.php';
require 'config.local.php';
// comment to show E_NOTICE [undefinied variable etc.], comment if you want make script and see all errors
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE);

require_once(SYSTEM . 'functions.php');
require_once(SYSTEM . 'init.php');

/*error example:
{
    "errorCode":3,
    "errorMessage":"Account name or password is not correct."
}*/

# Declare variables with array structure
$characters = array();
$playerData = array();
$data = array();
$isCasting = false;

# error function
function sendError($msg){
    $ret = array();
    $ret["errorCode"] = 3;
    $ret["errorMessage"] = $msg;
 
    die(json_encode($ret));
}

# getting infos
$request = file_get_contents('php://input');
$result = json_decode($request, true);

# account infos
$accountName = $result["accountname"];
$password = $result["password"];

# game port
$port = $config['lua']['gameProtocolPort'];

# check if player wanna see cast list
if (strtolower($accountName) == "cast")
    $isCasting = true;

if ($isCasting) {
    $casts = $db->query("SELECT `player_id` FROM `live_casts`")->fetchAll();
    if (count($casts[0]) == 0)
        sendError("There is no live casts right now!");
    foreach($casts as $cast) {
        $character = new OTS_Player();
        $character->load($cast['player_id']);
     
        if ($character->isLoaded()) {
            $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
            $characters[] = $char;
        }
    }
 
    $port = 7173;
    $lastLogin = 0;

    $premiumAccount = true;
    $timePremium = 30 * 86400;
}
else {
    $account = new OTS_Account();
    $account->find($accountName);
 
    if (!$account->isLoaded())
        sendError("Failed to get account. Try again!");

    $config_salt_enabled = fieldExist('salt', 'accounts');
    $current_password = encrypt(($config_salt_enabled ? $account->getCustomField('salt') : '') . $password);
    if ($account->getPassword() != $current_password)
        sendError("The password for this account is wrong. Try again!");
 
    foreach($account->getPlayersList() as $character) {
        $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
        $characters[] = $char;
    }
 
    $save = false;
    $timeNow = time();

    $query = $db->query('SELECT `premdays`, `lastday` FROM `accounts` WHERE `id` = ' . $account->getId());
    if($query->rowCount() > 0) {
        $query = $query->fetch();
        $premDays = (int)$query['premdays'];
        $lastDay = (int)$query['lastday'];
        $lastLogin = $lastDay;
    }
    else {
        sendError("Error while fetching your account data. Please contact admin.");
    }
 
    if($premDays != 0 && $premDays != PHP_INT_MAX ) {
        if($lastDay == 0) {
            $lastDay = $timeNow;
            $save = true;
        } else {
            $days = (int)(($timeNow - $lastDay) / 86400);
            if($days > 0) {
                if($days >= $premDays) {
                    $premDays = 0;
                    $lastDay = 0;
                } else {
                    $premDays -= $days;
                    $remainder = (int)(($timeNow - $lastDay) % 86400);
                    $lastDay = $timeNow - remainder;
                }

                $save = true;
            }
        }
    } else if ($lastDay != 0) {
        $lastDay = 0;
        $save = true;
    }

    if($save) {
        $db->query('UPDATE `accounts` SET `premdays` = ' . $premDays . ', `lastday` = ' . $lastDay . ' WHERE `id` = ' . $account->getId());
    }

    $premiumAccount = $premDays > 0;
    $timePremium = time() + ($premDays * 86400);
}

$session = array(
/*    "fpstracking" => false,
    "isreturner" => true,
    "returnernotification" => false,
    "showrewardnews" => false,*/
    "sessionkey" => $accountName . "\n" . $password,
    "lastlogintime" => $lastLogin,
    "ispremium" => $premiumAccount,
    "premiumuntil" => $timePremium,
    "optiontracking" => false,
    "status" => "active"
);

$world = array(
    "id" => 0,
    "name" => $config['lua']['serverName'],
    "externaladdress" => $config['lua']['ip'],
    "externalport" => $config['lua']['gameProtocolPort'],
    "previewstate" => 0,
    "location" => "BRA",
    "anticheatprotection" => false,
    "externaladdressunprotected" =>  $config['lua']['ip'],
    "externaladdressprotected" =>  $config['lua']['ip']
);

$worlds = array($world);

$data["session"] = $session;
$playerData["worlds"] = $worlds;
$playerData["characters"] = $characters;
$data["playdata"] = $playerData;

header('Content-Type: application/json');
echo json_encode($data);
//echo '<pre>' . var_export($data, true) . '</pre>';

login.php for 11.80:

PHP:
<?php
/**
* Created by Notepad++.
* User: Malucooo - Erick Nunes
* Remaked of login.php by JLCVP and parts of login.php by Monteiro. Thanks for both!
* Modified for MyAAC by slawkens
* Date: 18/09/17
* Time: 03:01
*/

require_once('common.php');
require 'config.php';
require 'config.local.php';
// comment to show E_NOTICE [undefinied variable etc.], comment if you want make script and see all errors
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE);

require_once(SYSTEM . 'functions.php');
require_once(SYSTEM . 'init.php');

/*error example:
{
    "errorCode":3,
    "errorMessage":"Account name or password is not correct."
}*/

# Declare variables with array structure
$characters = array();
$playerData = array();
$data = array();
$isCasting = false;

# error function
function sendError($msg){
    $ret = array();
    $ret["errorCode"] = 3;
    $ret["errorMessage"] = $msg;
 
    die(json_encode($ret));
}

# getting infos
$request = file_get_contents('php://input');
$result = json_decode($request, true);

# account infos
$accountName = $result["accountname"];
$password = $result["password"];

# game port
$port = $config['lua']['gameProtocolPort'];

# check if player wanna see cast list
if (strtolower($accountName) == "cast")
    $isCasting = true;

if ($isCasting) {
    $casts = $db->query("SELECT `player_id` FROM `live_casts`")->fetchAll();
    if (count($casts[0]) == 0)
        sendError("There is no live casts right now!");
    foreach($casts as $cast) {
        $character = new OTS_Player();
        $character->load($cast['player_id']);
     
        if ($character->isLoaded()) {
            $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
            $characters[] = $char;
        }
    }
 
    $port = 7173;
    $lastLogin = 0;

    $premiumAccount = true;
    $timePremium = 30 * 86400;
}
else {
    $account = new OTS_Account();
    $account->find($accountName);
 
    if (!$account->isLoaded())
        sendError("Failed to get account. Try again!");

    $config_salt_enabled = fieldExist('salt', 'accounts');
    $current_password = encrypt(($config_salt_enabled ? $account->getCustomField('salt') : '') . $password);
    if ($account->getPassword() != $current_password)
        sendError("The password for this account is wrong. Try again!");
 
    foreach($account->getPlayersList() as $character) {
        $char = array("worldid" => 0, "name" => $character->getName(), "ismale" => (($character->getSex() == 1) ? true : false), "tutorial" => false);
        $characters[] = $char;
    }
 
    $save = false;
    $timeNow = time();

    $query = $db->query('SELECT `premdays`, `lastday` FROM `accounts` WHERE `id` = ' . $account->getId());
    if($query->rowCount() > 0) {
        $query = $query->fetch();
        $premDays = (int)$query['premdays'];
        $lastDay = (int)$query['lastday'];
        $lastLogin = $lastDay;
    }
    else {
        sendError("Error while fetching your account data. Please contact admin.");
    }
 
    if($premDays != 0 && $premDays != PHP_INT_MAX ) {
        if($lastDay == 0) {
            $lastDay = $timeNow;
            $save = true;
        } else {
            $days = (int)(($timeNow - $lastDay) / 86400);
            if($days > 0) {
                if($days >= $premDays) {
                    $premDays = 0;
                    $lastDay = 0;
                } else {
                    $premDays -= $days;
                    $remainder = (int)(($timeNow - $lastDay) % 86400);
                    $lastDay = $timeNow - remainder;
                }

                $save = true;
            }
        }
    } else if ($lastDay != 0) {
        $lastDay = 0;
        $save = true;
    }

    if($save) {
        $db->query('UPDATE `accounts` SET `premdays` = ' . $premDays . ', `lastday` = ' . $lastDay . ' WHERE `id` = ' . $account->getId());
    }

    $premiumAccount = $premDays > 0;
    $timePremium = time() + ($premDays * 86400);
}

$session = array(
/*    "fpstracking" => false,
    "isreturner" => true,
    "returnernotification" => false,
    "showrewardnews" => false,*/
    "sessionkey" => $accountName . "\n" . $password,
    "lastlogintime" => $lastLogin,
    "ispremium" => $premiumAccount,
    "premiumuntil" => $timePremium,
    "optiontracking" => false,
    "status" => "active"
);

/*
$online = mysql_select_single("SELECT COUNT(`player_id`) AS `count` FROM `players_online`;");
$response = array(
    'playersonline'         => ($online !== false) ? (int)$online['count'] : 0,
    'twitchstreams'         => 0,
    'twitchviewer'         => 0,
    'gamingyoutubestreams'     => 0,
    'gamingyoutubeviewer'     => 0
)*/

$world = array(
    "id" => 0,
    "name" => $config['lua']['serverName'],
    "externalportunprotected" => $port,
    "externalportprotected" => $port,
    "previewstate" => 0,
    "location" => "BRA",
    "anticheatprotection" => false,
    "externaladdressunprotected" => $config["lua"]["ip"],
    "externaladdressprotected" => $config["lua"]["ip"]
);

$worlds = array($world);

$data["session"] = $session;
$playerData["worlds"] = $worlds;
$playerData["characters"] = $characters;
$data["playdata"] = $playerData;

header('Content-Type: application/json');
echo json_encode($data);
//echo '<pre>' . var_export($data, true) . '</pre>';

As a PHP programmer
1r5pbd.jpg
 
Back
Top