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

Someone have the login.php for 11.03 newversion tibia?
I tryed all scripts here, but when i get character list so i cant enter in game.

and this script is buged... i put just ACC NAME and him got my account... dont need password wtf

Code:
<?php
//really ugly script, feel free to release a better one :)
// be aware that we don't even test the password in this script
$host = "localhost";
$user = "root";
$passwd = "";
$db = "otserv";

$lnk = mysql_connect("$host", "$user", "$passwd") or die ('ERROR MySql: ' . mysql_error());
mysql_select_db("$db", $lnk) or die ('ERROR MySql: ' . mysql_error());   

$request_body = file_get_contents('php://input');
$result = json_decode($request_body, true);

$acc = $result["accountname"];
$password = $result["password"];

$dbResource = mysql_query("SELECT `id` FROM `accounts` WHERE `name` = '$acc' LIMIT 1;");

if(!$dbResource) {
    die("failed to get account.");
}

$dbRet = mysql_fetch_array($dbResource);

$accId = $dbRet[0];

$dbResource = mysql_query("SELECT `name` FROM `players` WHERE `account_id` = '$accId';");
if(!$dbResource) {
    die("failed to get charactters.");
}

$accArray = array();

while ($dbRet = mysql_fetch_array($dbResource, MYSQL_BOTH)) {
    $dict = array("worldid" => 0, "name" => $dbRet["name"]);
    $accArray[] = $dict;
}

$data = array();

$session = array(
    "sessionkey" => $acc . "\n" . $password,
    "lastlogintime" => 1461290246,
    "ispremium" => true,
    "premiumuntil" => 1463788913,
    "status" => "active"   
);

$data["session"] = $session;

$playerData = array();

$world = array(
    "id" => 0,
    "name" => "EveryOTS",
    "externaladdress" => "", // masked ;>
    "externalport" => 7172,
    "previewstate" => 0
);

$worlds = array($world);
$playerData["worlds"] = $worlds;
$playerData["characters"] = $accArray;


$data["playdata"] = $playerData;

echo json_encode($data);


//echo '{   "session": {     "sessionkey": "DhZUxAPjDFQqwCy65z2JQKB145750y",     "lastlogintime": 1461290246,     "ispremium": true,     "premiumuntil": 1463788913,     "status": "active"   },   "playdata": {     "worlds": [       {         "id": 0,         "name": "Amera",         "externaladdress": "127.0.0.1",         "externalport": 7172,         "previewstate": 0       },       {         "id": 1,         "name": "Chrona",         "externaladdress": "127.0.0.1",         "externalport": 7172,         "previewstate": 0       },       {         "id": 2,         "name": "Eldera",         "externaladdress": "127.0.0.1",         "externalport": 7172,         "previewstate": 0       }     ],     "characters": [       {         "worldid": 0,         "name": "Paladin"       },       {         "worldid": 1,         "name": "Sorcerer"       },       {         "worldid": 2,         "name": "Druid"       }     ]   },   "survey": {     "id": 759822,     "invitationtext": "Dear Tibian! A few days ago, you have received an email invitation to join the Beta phase of Tibia 11. We\'d love to hear about your experiences with client version 11.0 so please help us with your feedback by completing this survey.",     "invitationtoken": "9ILillainoj7CsWxxoCRgOqSnGtt3L",     "endtimestamp": 1461535200   } }';

/*
example json
{
  "session": {
    "sessionkey": "DhZUxAPjDFQqwCy65z2JQKB145750y",
    "lastlogintime": 1461290246,
    "ispremium": true,
    "premiumuntil": 1463788913,
    "status": "active"
  },
  "playdata": {
    //an array/list of worlds and theirs data
    "worlds": [
      {
        "id": 0,
        "name": "Amera",
        "externaladdress": "66.150.54.19",
        "externalport": 7171,
        "previewstate": 0
      },
      {
        "id": 1,
        "name": "Chrona",
        "externaladdress": "193.200.156.112",
        "externalport": 7171,
        "previewstate": 0
      },
      {
        "id": 2,
        "name": "Eldera",
        "externaladdress": "66.150.54.94",
        "externalport": 7171,
        "previewstate": 0
      }
    ],
    "characters": [
      {
        "worldid": 0,
        "name": "Paladin"
      },
      {
        "worldid": 1,
        "name": "Sorcerer"
      },
      {
        "worldid": 2,
        "name": "Druid"
      }
    ]
  },
  //i believe this can just be removed, not needed
}
*/
?>

I receveid this msg:
"The remote host closed the connection"

and i cant enter..
 
Last edited:
Someone have the login.php for 11.03 newversion tibia?
I tryed all scripts here, but when i get character list so i cant enter in game.

and this script is buged... i put just ACC NAME and him got my account... dont need password wtf

Code:
<?php
//really ugly script, feel free to release a better one :)
// be aware that we don't even test the password in this script
$host = "localhost";
$user = "root";
$passwd = "";
$db = "otserv";

$lnk = mysql_connect("$host", "$user", "$passwd") or die ('ERROR MySql: ' . mysql_error());
mysql_select_db("$db", $lnk) or die ('ERROR MySql: ' . mysql_error());  

$request_body = file_get_contents('php://input');
$result = json_decode($request_body, true);

$acc = $result["accountname"];
$password = $result["password"];

$dbResource = mysql_query("SELECT `id` FROM `accounts` WHERE `name` = '$acc' LIMIT 1;");

if(!$dbResource) {
    die("failed to get account.");
}

$dbRet = mysql_fetch_array($dbResource);

$accId = $dbRet[0];

$dbResource = mysql_query("SELECT `name` FROM `players` WHERE `account_id` = '$accId';");
if(!$dbResource) {
    die("failed to get charactters.");
}

$accArray = array();

while ($dbRet = mysql_fetch_array($dbResource, MYSQL_BOTH)) {
    $dict = array("worldid" => 0, "name" => $dbRet["name"]);
    $accArray[] = $dict;
}

$data = array();

$session = array(
    "sessionkey" => $acc . "\n" . $password,
    "lastlogintime" => 1461290246,
    "ispremium" => true,
    "premiumuntil" => 1463788913,
    "status" => "active"  
);

$data["session"] = $session;

$playerData = array();

$world = array(
    "id" => 0,
    "name" => "EveryOTS",
    "externaladdress" => "", // masked ;>
    "externalport" => 7172,
    "previewstate" => 0
);

$worlds = array($world);
$playerData["worlds"] = $worlds;
$playerData["characters"] = $accArray;


$data["playdata"] = $playerData;

echo json_encode($data);


//echo '{   "session": {     "sessionkey": "DhZUxAPjDFQqwCy65z2JQKB145750y",     "lastlogintime": 1461290246,     "ispremium": true,     "premiumuntil": 1463788913,     "status": "active"   },   "playdata": {     "worlds": [       {         "id": 0,         "name": "Amera",         "externaladdress": "127.0.0.1",         "externalport": 7172,         "previewstate": 0       },       {         "id": 1,         "name": "Chrona",         "externaladdress": "127.0.0.1",         "externalport": 7172,         "previewstate": 0       },       {         "id": 2,         "name": "Eldera",         "externaladdress": "127.0.0.1",         "externalport": 7172,         "previewstate": 0       }     ],     "characters": [       {         "worldid": 0,         "name": "Paladin"       },       {         "worldid": 1,         "name": "Sorcerer"       },       {         "worldid": 2,         "name": "Druid"       }     ]   },   "survey": {     "id": 759822,     "invitationtext": "Dear Tibian! A few days ago, you have received an email invitation to join the Beta phase of Tibia 11. We\'d love to hear about your experiences with client version 11.0 so please help us with your feedback by completing this survey.",     "invitationtoken": "9ILillainoj7CsWxxoCRgOqSnGtt3L",     "endtimestamp": 1461535200   } }';

/*
example json
{
  "session": {
    "sessionkey": "DhZUxAPjDFQqwCy65z2JQKB145750y",
    "lastlogintime": 1461290246,
    "ispremium": true,
    "premiumuntil": 1463788913,
    "status": "active"
  },
  "playdata": {
    //an array/list of worlds and theirs data
    "worlds": [
      {
        "id": 0,
        "name": "Amera",
        "externaladdress": "66.150.54.19",
        "externalport": 7171,
        "previewstate": 0
      },
      {
        "id": 1,
        "name": "Chrona",
        "externaladdress": "193.200.156.112",
        "externalport": 7171,
        "previewstate": 0
      },
      {
        "id": 2,
        "name": "Eldera",
        "externaladdress": "66.150.54.94",
        "externalport": 7171,
        "previewstate": 0
      }
    ],
    "characters": [
      {
        "worldid": 0,
        "name": "Paladin"
      },
      {
        "worldid": 1,
        "name": "Sorcerer"
      },
      {
        "worldid": 2,
        "name": "Druid"
      }
    ]
  },
  //i believe this can just be removed, not needed
}
*/
?>

I receveid this msg:
"The remote host closed the connection"

and i cant enter..


//really ugly script, feel free to release a better one :)
// be aware that we don't even test the password in this script

^ ^ ^
 
Has anyone else ran into the problem using this script where it will allow the actual localhost to enter the game, but if another computer on the same network tries to enter the game it just fails to enter gameworld?
 
Has anyone else ran into the problem using this script where it will allow the actual localhost to enter the game, but if another computer on the same network tries to enter the game it just fails to enter gameworld?
I think its because its using 127.0.0.1 as the game world ip.
 
I think its because its using 127.0.0.1 as the game world ip.
You're correct, I figured it out a couple days ago after realizing I had spent so much time playing around with the script and source edit that I forgot to adjust the ip and other basic settings. I didn't want to double post so I never said anything. Thank you anyway.
 
Someone edited successfully motdUrl?
0508f1284edc4037b819a0258d06e2eb.png
 
The new 11.10 change the login:
{"session":{"sessionkey":"sessionkey","lastlogintime":1486580678,"ispremium":false,"premiumuntil":0,"status":"active"},"playdata":{"worlds":[{"id":0,"name":"Fidera","externaladdress":"tibia-ip-us.ciproxy.com","externalport":7171,"previewstate":0,"location":"USA","externaladdressunprotected":"tibia-pool-us.ciproxy.com","externaladdressprotected":"tibia-ip-us.ciproxy.com"},{"id":1,"name":"Quilia","externaladdress":"tibia-ip-eu.ciproxy.com","externalport":7171,"previewstate":0,"location":"EUR","externaladdressunprotected":"tibia-pool-eu.ciproxy.com","externaladdressprotected":"tibia-ip-eu.ciproxy.com"}],"characters":[{"worldid":1,"name":"Char1","ismale":true,"tutorial":false},{"worldid":1,"name":"Char2","ismale":true,"tutorial":false},{"worldid":1,"name":"Char3","ismale":true,"tutorial":false},{"worldid":0,"name":"Char4","ismale":true,"tutorial":false}]}}
 
The new 11.10 change the login:
{"session":{"sessionkey":"sessionkey","lastlogintime":1486580678,"ispremium":false,"premiumuntil":0,"status":"active"},"playdata":{"worlds":[{"id":0,"name":"Fidera","externaladdress":"tibia-ip-us.ciproxy.com","externalport":7171,"previewstate":0,"location":"USA","externaladdressunprotected":"tibia-pool-us.ciproxy.com","externaladdressprotected":"tibia-ip-us.ciproxy.com"},{"id":1,"name":"Quilia","externaladdress":"tibia-ip-eu.ciproxy.com","externalport":7171,"previewstate":0,"location":"EUR","externaladdressunprotected":"tibia-pool-eu.ciproxy.com","externaladdressprotected":"tibia-ip-eu.ciproxy.com"}],"characters":[{"worldid":1,"name":"Char1","ismale":true,"tutorial":false},{"worldid":1,"name":"Char2","ismale":true,"tutorial":false},{"worldid":1,"name":"Char3","ismale":true,"tutorial":false},{"worldid":0,"name":"Char4","ismale":true,"tutorial":false}]}}
where is this change? @comedinha @Jo3Bingham
 
where is this change? @comedinha @Jo3Bingham

Only need add the changes on world...

$dict = array(
"id" => (int)$dbRet["id"],
"name" => $dbRet["name"],
"externaladdress" => $dbRet["ip"],
"externalport" => (int)$ServerPort,
"previewstate" => (int)$dbRet["previewer"],
"location" => $dbRet["location"],
"externaladdressunprotected" => $dbRet["ip"],
"externaladdressprotected" => $dbRet["ip"]
);

$dict = array(
"worldid" => (int)$dbRet["world_id"],
"name" => $dbRet["name"],
"ismale" => $isMale,
"tutorial" => false
);
 
Last edited:
with this chances is possible to connect using 11.10 ? or need the changes like your connection.cpp @comedinha
 
I have one more question, also how to make this changes in login.php ?
this is how it look atm
Code:
$gameserver = $config['gameserver'];
            $response = array(
                'session' => array(
                    'sessionkey' => $username."\n".$jsonObject->password."\n".$token."\n".floor(time() / 30),
                    'lastlogintime' => 0,
                    'ispremium' => ($account['premdays'] > 0) ? true : false,
                    'premiumuntil' => time() + ($account['premdays'] * 86400),
                    'status' => 'active'
                ),
                'playdata' => array(
                    'worlds' => array(
                        array(
                            'id' => 0,
                            'name' => $gameserver['name'],
                            'externaladdress' => $gameserver['ip'],
                            'externalport' => $gameserver['port'],
                            'previewstate' => 0
                        )
                    ),
                    'characters' => array(
                        //array( 'worldid' => ASD, 'name' => asd ),
                    )
                )
            );
 
I have one more question, also how to make this changes in login.php ?
this is how it look atm

Code:
$gameserver = $config['gameserver'];
            $response = array(
                'session' => array(
                    'sessionkey' => $username."\n".$jsonObject->password."\n".$token."\n".floor(time() / 30),
                    'lastlogintime' => 0,
                    'ispremium' => ($account['premdays'] > 0) ? true : false,
                    'premiumuntil' => time() + ($account['premdays'] * 86400),
                    'status' => 'active'
                ),
                'playdata' => array(
                    'worlds' => array(
                        array(
                            'id' => 0,
                            'name' => $gameserver['name'],
                            'externaladdress' => $gameserver['ip'],
                            'externalport' => $gameserver['port'],
                            'previewstate' => 0,
                            'location' => "US", //Server Location
                            'externaladdressunprotected' => $gameserver['ip'],
                            'externaladdressprotected' => $gameserver['ip']
                        )
                    ),
                    'characters' => array(
                        //array(
                            'worldid' => ASD,
                            'name' => asd,
                            'ismale' => false, //Put to check sex
                            'tutorial' => false
                        ),
                    )
                )
            );
 
Is there any way to run 11.01 on Forgotten Server? Can someone point me where to look? I can get to the character screen, but after selecting a character - TFS closes the socket and connection :'(
 
@silveralol Znote AAC now supports Client 11 loginWebService.
Client 11 support. (loginWebService) · Znote/ZnoteAAC@6617966 · GitHub

Grab and configure latest version of Znote AAC, point the @Jo3Bingham Client 11 IP changer toward your URL and your good to go.
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
 
Back
Top