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

TFS 8.60 with Cast System

I use TFS 1.5/1.5
He's not asking you; he's actually asking @chucky91, kkkkkk. I want to know if the OP is referring to TFS? If it's TFS 1.x or higher, I'd like to implement it in my TFS, yes... The guy didn't mention which version of TFS, whether it's 0.4 or 1.x, and I'm waiting for his response. lol.

@johnsamir If the OP is really just talking about TFS 0.4, you might as well give up on his commit :) because it won't work with your TFS 1.x, you see? It's important to know the information before asking to avoid embarrassment, haha.
 
He's not asking you; he's actually asking @chucky91, kkkkkk. I want to know if the OP is referring to TFS? If it's TFS 1.x or higher, I'd like to implement it in my TFS, yes... The guy didn't mention which version of TFS, whether it's 0.4 or 1.x, and I'm waiting for his response. lol.

@johnsamir If the OP is really just talking about TFS 0.4, you might as well give up on his commit :) because it won't work with your TFS 1.x, you see? It's important to know the information before asking to avoid embarrassment, haha.

Pretty sure its 0.4 :D
 
He's not asking you; he's actually asking @chucky91, kkkkkk. I want to know if the OP is referring to TFS? If it's TFS 1.x or higher, I'd like to implement it in my TFS, yes... The guy didn't mention which version of TFS, whether it's 0.4 or 1.x, and I'm waiting for his response. lol.

@johnsamir If the OP is really just talking about TFS 0.4, you might as well give up on his commit :) because it won't work with your TFS 1.x, you see? It's important to know the information before asking to avoid embarrassment, haha.
I'm using gigastarcast system it's TFS 1.3 ive upgraded to 1.4/1.5 but can't login to the game yet
 
yes, here it's GitHub - Fablow77/TFS-CastSystem: Credits to dj-slavi-tfs team otland.net (https://github.com/Fablow77/TFS-CastSystem) the cast system is for 10.xx tibia im trying to adapt it to 8.6 i can log in to char list bug cant log into the game the server crashes with no warning
i was debugging and get thisView attachment 82961
You have to see what type of value your database is sending, yes it is int16, int32 or int64.
see in iodatabase.cpp what type of query in the players table about health!
see you don't need a conversion like static_cast<uint32_t>(value);
 
You have to see what type of value your database is sending, yes it is int16, int32 or int64.
see in iodatabase.cpp what type of query in the players table about health!
see you don't need a conversion like static_cast<uint32_t>(value);
could you help me fix this? paid ofc

 
upup ! i have removed all errors while debugging i have this line

Lua:
     theforgottenserver-x64.exe!IOLoginData::loadPlayerById(Player * player, unsigned int id) Line 209    C++
which points to:
Code:
bool IOLoginData::loadPlayerById(Player* player, uint32_t id)
{
    Database& db = Database::getInstance();

//<<<<<<< HEAD
    //return loadPlayer(player, db.storeQuery(fmt::format("SELECT `id`, `name`, `account_id`, `group_id`, `sex`, `vocation`, `experience`, `level`, `maglevel`, `health`, `healthmax`, `blessings`, `mana`, `manamax`, `manaspent`, `soul`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastlogout`, `lastip`, `conditions`, `skulltime`, `skull`, `town_id`, `balance`, `offlinetraining_time`, `offlinetraining_skill`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `direction` FROM `players` WHERE `id` = {:d}", id)));
//=======
    return loadPlayer(player, db.storeQuery(fmt::format("SELECT `id`, `name`, `account_id`, `group_id`, `sex`, `vocation`, `experience`, `level`, `maglevel`, `health`, `healthmax`, `blessings`, `mana`, `manamax`, `manaspent`, `soul`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `lookmount`, `ridingmount`, `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastlogout`, `lastip`, `conditions`, `skulltime`, `skull`, `town_id`, `balance`, `offlinetraining_time`, `offlinetraining_skill`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `direction` FROM `players` WHERE `id` = {:d}", id)));
//>>>>>>> 2017b131 (fix in database due mounts + new blocked outfitss for mounts added)

}
the exact line is this :
Code:
    return loadPlayer(player, db.storeQuery(fmt::format("SELECT `id`, `name`, `account_id`, `group_id`, `sex`, `vocation`, `experience`, `level`, `maglevel`, `health`, `healthmax`, `blessings`, `mana`, `manamax`, `manaspent`, `soul`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `lookmount`, `ridingmount`, `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastlogout`, `lastip`, `conditions`, `skulltime`, `skull`, `town_id`, `balance`, `offlinetraining_time`, `offlinetraining_skill`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `direction` FROM `players` WHERE `id` = {:d}", id)));
//>>>>>>> 2017b131 (fix in database due mounts + new blocked outfitss for mounts added)

the seccond debugg warning / error is this
Code:
>    theforgottenserver-x64.exe!ProtocolGame::login(const std::string & name, unsigned int accountId, OperatingSystem_t operatingSystem) Line 229    C++

which points to:

Code:
void ProtocolGame::login(const std::string& name, uint32_t accountId, OperatingSystem_t operatingSystem)
{
    // OTCv8 features and extended opcodes
    if (otclientV8 || operatingSystem >= CLIENTOS_OTCLIENT_LINUX) {
        if(otclientV8)
            sendFeatures();
        NetworkMessage opcodeMessage;
        opcodeMessage.addByte(0x32);
        opcodeMessage.addByte(0x00);
        opcodeMessage.add<uint16_t>(0x00);
        writeToOutputBuffer(opcodeMessage);
    }

    //dispatcher thread
    Player* foundPlayer = g_game.getPlayerByName(name);
    if (!foundPlayer || g_config.getBoolean(ConfigManager::ALLOW_CLONES)) {
        player = new Player(getThis());
        player->setName(name);

        player->incrementReferenceCounter();
        player->setID();

        if (!IOLoginData::preloadPlayer(player, name)) {
            disconnectClient("Your character could not be loaded.");
            return;
        }

        if (IOBan::isPlayerNamelocked(player->getGUID())) {
            disconnectClient("Your character has been namelocked.");
            return;
        }

        if (g_game.getGameState() == GAME_STATE_CLOSING && !player->hasFlag(PlayerFlag_CanAlwaysLogin)) {
            disconnectClient("The game is just going down.\nPlease try again later.");
            return;
        }

        if (g_game.getGameState() == GAME_STATE_CLOSED && !player->hasFlag(PlayerFlag_CanAlwaysLogin)) {
            disconnectClient("Server is currently closed.\nPlease try again later.");
            return;
        }

        if (g_config.getBoolean(ConfigManager::ONE_PLAYER_ON_ACCOUNT) && player->getAccountType() < ACCOUNT_TYPE_GAMEMASTER && g_game.getPlayerByAccount(player->getAccount())) {
            disconnectClient("You may only login with one character\nof your account at the same time.");
            return;
        }

        if (!player->hasFlag(PlayerFlag_CannotBeBanned)) {
            BanInfo banInfo;
            if (IOBan::isAccountBanned(accountId, banInfo)) {
                if (banInfo.reason.empty()) {
                    banInfo.reason = "(none)";
                }

                if (banInfo.expiresAt > 0) {
                    disconnectClient(fmt::format("Your account has been banned until {:s} by {:s}.\n\nReason specified:\n{:s}", formatDateShort(banInfo.expiresAt), banInfo.bannedBy, banInfo.reason));
                } else {
                    disconnectClient(fmt::format("Your account has been permanently banned by {:s}.\n\nReason specified:\n{:s}", banInfo.bannedBy, banInfo.reason));
                }
                return;
            }
        }

        if (std::size_t currentSlot = clientLogin(*player)) {
            uint8_t retryTime = getWaitTime(currentSlot);
            auto output = OutputMessagePool::getOutputMessage();
            output->addByte(0x16);
            output->addString(fmt::format("Too many players online.\nYou are at place {:d} on the waiting list.", currentSlot));
            output->addByte(retryTime);
            send(output);
            disconnect();
            return;
        }

        if (!IOLoginData::loadPlayerById(player, player->getGUID())) {
            disconnectClient("Your character could not be loaded.");
            return;
        }

        player->setOperatingSystem(operatingSystem);

        if (!g_game.placeCreature(player, player->getLoginPosition())) {
            if (!g_game.placeCreature(player, player->getTemplePosition(), false, true)) {
                disconnectClient("Temple position is wrong. Contact the administrator.");
                return;
            }
        }

        if (operatingSystem >= CLIENTOS_OTCLIENT_LINUX) {
            player->registerCreatureEvent("ExtendedOpcode");
        }

        player->lastIP = player->getIP();
        player->lastLoginSaved = std::max<time_t>(time(nullptr), player->lastLoginSaved + 1);
        acceptPackets = true;
    } else {
        if (eventConnect != 0 || !g_config.getBoolean(ConfigManager::REPLACE_KICK_ON_LOGIN)) {
            //Already trying to connect
            disconnectClient("You are already logged in.");
            return;
        }

        if (foundPlayer->client) {
            foundPlayer->disconnect();
            foundPlayer->isConnecting = true;

            eventConnect = g_scheduler.addEvent(createSchedulerTask(1000, [=, thisPtr = getThis(), playerID = foundPlayer->getID()]() {
                thisPtr->connect(playerID, operatingSystem);
            }));
        } else {
            connect(foundPlayer->getID(), operatingSystem);
        }
    }
    OutputMessagePool::getInstance().addProtocolToAutosend(shared_from_this());
}
and this is the exact line:

Code:
disconnectClient("Your character could not be loaded.");

lend me a hand please i've been struggling with this for weeks maybe months

edit: this happens when players tries to log in to the world
 
Can anyone help please :) why my website installment and even my TFS.exe (0.4) can't seem to find my config.lua.. iv'e done OT's in the past but why is it now a "DIST File" Type, instead of lua/document? im clearly doing something so easily wrong i just cant figure out what :<
 
Can anyone help please :) why my website installment and even my TFS.exe (0.4) can't seem to find my config.lua.. iv'e done OT's in the past but why is it now a "DIST File" Type, instead of lua/document? im clearly doing something so easily wrong i just cant figure out what :<
Is it named schema.lua.dist?
If so, make a copy (backup) of it, remove the .dist, so it becomes a schema.lua
 
Is it named schema.lua.dist?
If so, make a copy (backup) of it, remove the .dist, so it becomes a schema.lua
in which directory would this be? because my config.lua "dist" in server directory has no Schema there other than the folder with the SQL's inside! nothing with any lua :/

here is photo of my Directory to the server with the list of credentials, if it helps :)
otlahd.png
 
Download new server xD
No, but sorry I have no idea how to work with 0.4
 
Download new server xD
No, but sorry I have no idea how to work with 0.4
fixed the lua issue with "config.lua.dist" now i just cant seem to get my TFS.exe to execute to mysql, even though everything seems to be fitting in all directories correctly, website connect's to PHPMYADMIN when making an account, no errors coming through website just the exe. wont execute to my mysql :<madness.pngmadness.png
 
Back
Top