Hello all,
I'm new to this Tibia 11 client stuff, and I am wondering if anyone could help me or shed some light on it. I am trying just to login to any server through localhost.
The error I get is this (on 127.0.0.1):
Screenshot
The error I get when I switch from 127.0.0.1 to my IP address:
Screenshot
This is what I have done/tried:
-Ports open 80/7171/7172/7173/7174
-Turned off all Anti-virus / Firewalls
-Different login scripts
-Hex edit Tibia Client (someone was trying to help me)
-Changed distro
-Added 'world_ID' to players (in PHPMYADMIN)
-Added 'secret' to players (in PHPMYADMIN)
What am I using?:
-OTX 3.9
-Gesior Acc
My Login.php script:
My Config.lua:
Any help is appreciated! If someone does help me fix this problem, I could also send a donation your way, or if you fix this as a 'job' and I also send a donation your way (Just my way of saying thank you).
I few days ago when I started to try, I couldn't even load the character list, and now I get to this point. I feel like I'm close but need some help!
Thanks in advance!
I'm new to this Tibia 11 client stuff, and I am wondering if anyone could help me or shed some light on it. I am trying just to login to any server through localhost.
The error I get is this (on 127.0.0.1):
Screenshot
The error I get when I switch from 127.0.0.1 to my IP address:
Screenshot
This is what I have done/tried:
-Ports open 80/7171/7172/7173/7174
-Turned off all Anti-virus / Firewalls
-Different login scripts
-Hex edit Tibia Client (someone was trying to help me)
-Changed distro
-Added 'world_ID' to players (in PHPMYADMIN)
-Added 'secret' to players (in PHPMYADMIN)
What am I using?:
-OTX 3.9
-Gesior Acc
My Login.php script:
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!
* Date: 18/09/17
* Time: 03:01
*/
require 'config/config.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);
// true = show sent queries and SQL queries status/status code/error message
define('DEBUG_DATABASE', false);
define('INITIALIZED', true);
if (!defined('ONLY_PAGE'))
define('ONLY_PAGE', true);
// check if site is disabled/requires installation
include_once('./system/load.loadCheck.php');
// fix user data, load config, enable class auto loader
include_once('./system/load.init.php');
// DATABASE
include_once('./system/load.database.php');
if (DEBUG_DATABASE)
Website::getDBHandle()->setPrintQueries(true);
// DATABASE END
/*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 = 7172;
# check if player wanna see cast list
if (strtolower($accountName) == "cast")
$isCasting = true;
if ($isCasting) {
$casts = $SQL->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 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;
} else {
$account = new Account();
$account->find($accountName);
if (!$account->isLoaded())
sendError("Failed to get account. Try again!");
if ($account->getPassword() != Website::encryptPassword($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;
}
$lastLogin = $account->getLastLogin();
}
$session = array(
"fpstracking" => false,
"isreturner" => true,
"returnernotification" => false,
"showrewardnews" => false,
"sessionkey" => $accountName . "\n" . $password,
"lastlogintime" => $lastLogin,
"ispremium" => true,
"premiumuntil" => 0,
"status" => "active"
);
$world = array(
"id" => 0,
"name" => "RealOTS",
"externaladdress" => "75.154.187.59",
"externalport" => 7172,
"previewstate" => 0,
"location" => "BRA",
"anticheatprotection" => false
);
$worlds = array($world);
$data["session"] = $session;
$playerData["worlds"] = $worlds;
$playerData["characters"] = $characters;
$data["playdata"] = $playerData;
echo json_encode($data);
My Config.lua:
Lua:
-- Combat settings
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 100
killsToRedSkull = 6
killsToBlackSkull = 15
pzLocked = 30 * 1000
removeChargesFromRunes = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 7 * 60 * 1000
stairJumpExhaustion = 1 * 1000
experienceByKillingPlayers = true
expFromPlayersLevelRange = 100
-- Connection Config
ip = "75.154.187.59"
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 2000
motd = "RealOpenTibia.com!"
onePlayerOnlinePerAccount = false
allowClones = false
serverName = "RealOTS"
statusTimeout = 5 * 1000
replaceKickOnLogin = true
maxPacketsPerSecond = 300
-- Store in-Game Config
coinPacketSize = 50
coinImagesURL = "http://localhost/images/store/"
-- PVP-Expert Config
expertPvp = false
-- Version Manual
clientVersionMin = 1100
clientVersionMax = 1149
clientVersionStr = "Only clients with protocol 11.49 are allowed!"
-- Depot Limit
freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 17
-- Casting System
enableLiveCasting = true
liveCastPort = 7173
-- Deaths
deathLosePercent = -1
-- Houses
housePriceEachSQM = 5000
houseRentPeriod = "weekly"
-- Item Usage
timeBetweenActions = 500
timeBetweenExActions = 1000
-- Map
mapName = "global"
mapAuthor = "cipsoft"
-- Market
marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100
-- MySQL
sqltype = "MySQL"
mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = ""
mysqlDatabase = "realots"
mysqlPort = 3306
mysqlSock = ""
passwordType = "sha1"
-- Misc.
allowChangeOutfit = true
freePremium = true
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
emoteSpells = true
classicEquipmentSlots = true
allowWalkthrough = true
-- Rates
rateExp = 500
rateSkill = 30
rateLoot = 2
rateMagic = 15
rateSpawn = 2
-- Monsters
deSpawnRange = 2
deSpawnRadius = 50
-- Stamina
staminaSystem = true
-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true
-- Startup
defaultPriority = "high"
startupDatabaseOptimization = true
-- Status server information
ownerName = "RealOpenTibia.com"
ownerEmail = ""
url = ""
location = "United States"
Any help is appreciated! If someone does help me fix this problem, I could also send a donation your way, or if you fix this as a 'job' and I also send a donation your way (Just my way of saying thank you).
I few days ago when I started to try, I couldn't even load the character list, and now I get to this point. I feel like I'm close but need some help!
Thanks in advance!