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

AAC Login.php issue - Client 12.00 Character list

Kakoseco

New Member
Joined
Feb 16, 2009
Messages
18
Reaction score
0
Hello,
I'm having problems when trying to log into the game, i can access using lower clients versions like 11.44
but when using 12.00 it just loads with char names in black and without world/level info.

There's my Login.php from website
<?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'],
"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>';

Config.lua

-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
worldID= 1
hotkeyAimbotEnabled = true
protectionLevel = 7
pzLocked = 60 * 1000
removeChargesFromRunes = true
removeChargesFromPotions = true
removeWeaponAmmunition = true
removeWeaponCharges = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
dayKillsToRedSkull = 3
weekKillsToRedSkull = 5
monthKillsToRedSkull = 10
redSkullDuration = 30
blackSkullDuration = 45
orangeSkullDuration = 7

-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
-- NOTE: MaxPacketsPerSeconds if you change you will be subject to bugs by WPE, keep the default value of 25
ip = "clm1.ddns.net"
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 0
motd = "Bem vindo ao OTBR Global!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "OTBR-Global"
statusTimeout = 5 * 1000
replaceKickOnLogin = true
maxPacketsPerSecond = 25
maxItem = 2000
maxContainer = 100

-- Version Manual
clientVersionMin = 1100
clientVersionMax = 1200
clientVersionStr = "11.71"

-- Depot Limit
freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 17

-- GameStore
gamestoreByModules = true

-- Quest Sytem
loadQuestLua = true

-- Casting System
enableLiveCasting = true
liveCastPort = 7173

-- Expert Pvp Config
expertPvp = true

-- Deaths
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
-- death penalty formula. For the old formula, set it to 10. For
-- no skill/experience loss, set it to 0.
deathLosePercent = -1

-- Houses
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
housePriceEachSQM = 1000
houseRentPeriod = "never"

-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 500

-- Map
-- NOTE: set mapName WITHOUT .otbm at the end
mapName = "realmap"
mapAuthor = "Cipsoft"

-- Market
marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

-- MySQL
mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = "xxxx"
mysqlDatabase = "xxxx"
mysqlPort = 3306
mysqlSock = ""
passwordType = "sha1"

-- Misc.
allowChangeOutfit = true
freePremium = true
kickIdlePlayerAfterMinutes = 15
idleWarningTime = 10 * 60 * 1000
idleKickTime = 15 * 60 * 1000
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false
allowWalkthrough = true
coinPacketSize = 25
coinImagesURL = "http://avernus.sytes.net/store/"
classicAttackSpeed = false

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 1
rateSkill = 50
rateLoot = 3
rateMagic = 25
rateSpawn = 1

-- Monster rates
rateMonsterHealth = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50

-- Stamina
staminaSystem = true

-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true

-- Startup
-- NOTE: defaultPriority only works on Windows and sets process
-- priority, valid values are: "normal", "above-normal", "high"
defaultPriority = "high"
startupDatabaseOptimization = true

-- Status server information
ownerName = "OTBR-Global"
ownerEmail = ""
url = ""
location = ""

I'm using MyAcc 0.7.10.
 

Attachments

Last edited:
I apologize for offering no solution to your issue. However, how do you have a tibia 12 client. i would love to host my own, but i cannot seem to find it.
 
Back
Top