• 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 0.X GM Ghost - Crashing when goes to player

potinho

Intermediate OT User
Joined
Oct 11, 2009
Messages
1,397
Solutions
17
Reaction score
148
Location
Brazil
Good morning people, everything fine? I have a bug, I believe it is known. My engine is OTX 2 (TFS 0.X), when I become invisible (ghost) with the GM and I /goto the player, if it is moving it bugs, could you help me to fix this bug?
 
The problem can be the effect of ghost, maybe client player side doesnt have the effect.
This problem can go unnoticed when you use otclient, as it may not debug even if an effect is missing, while the tibia client when it doesn't support something gives the bug.
 
The problem can be the effect of ghost, maybe client player side doesnt have the effect.
This problem can go unnoticed when you use otclient, as it may not debug even if an effect is missing, while the tibia client when it doesn't support something gives the bug.
I realize that, there's a way to fix? Some guys told me its in tile.cpp, but i dont know how to begin
 
But 2.15 is 8.6 protocol, no? Did you make changes to the protocol by yourself?
Used one similar to this:


Came with multi-protocol (7.4, 7.6 and 7.72)
 
Used one similar to this:


Came with multi-protocol (7.4, 7.6 and 7.72)
this one has modifications in the client, otxserver 2.15 is 8.6, I don't know if there were other versions, now if you are using the one from the link you sent me, it has its own client, that is, it has modifications, and one of these may have to do with the ghost, or it could be that the problem is something else and we are just delusional
 
this one has modifications in the client, otxserver 2.15 is 8.6, I don't know if there were other versions, now if you are using the one from the link you sent me, it has its own client, that is, it has modifications, and one of these may have to do with the ghost, or it could be that the problem is something else and we are just delusional
This is what happens in client when i /goto on player with gm in ghost mode:

GIF_17-06-2022_10-14-44.gif
 
The bug still happening when i logout in same stack of player and when i deghost.
1702549812213.gif

I realize few errors on client side:

ERROR: no thing at pos:615 58 5, stackpos:1
at:
[C++]: ?getMappedThing@ProtocolGame@@QAE?AV?$shared_object_ptr@VThing@@@stdext@@ABV?$shared_object_ptr@VInputMessage@@@3@@Z
ERROR: no creature found to move
at:
[C++]: ?parseCreatureMove@ProtocolGame@@AAEXABV?$shared_object_ptr@VInputMessage@@@stdext@@@Z
ERROR: no thing at pos:616 58 5, stackpos:1
at:
[C++]: ?getMappedThing@ProtocolGame@@QAE?AV?$shared_object_ptr@VThing@@@stdext@@ABV?$shared_object_ptr@VInputMessage@@@3@@Z
ERROR: no creature found to move
at:
[C++]: ?parseCreatureMove@ProtocolGame@@AAEXABV?$shared_object_ptr@VInputMessage@@@stdext@@@Z
ERROR: no thing at pos:615 58 5, stackpos:1
at:
[C++]: ?getMappedThing@ProtocolGame@@QAE?AV?$shared_object_ptr@VThing@@@stdext@@ABV?$shared_object_ptr@VInputMessage@@@3@@Z
ERROR: no creature found to move
at:
[C++]: ?parseCreatureMove@ProtocolGame@@AAEXABV?$shared_object_ptr@VInputMessage@@@stdext@@@Z
ERROR: no thing at pos:615 57 5, stackpos:1
at:
[C++]: ?getMappedThing@ProtocolGame@@QAE?AV?$shared_object_ptr@VThing@@@stdext@@ABV?$shared_object_ptr@VInputMessage@@@3@@Z
ERROR: no creature found to move
at:
[C++]: ?parseCreatureMove@ProtocolGame@@AAEXABV?$shared_object_ptr@VInputMessage@@@stdext@@@Z
 
its like that you cant walk inside gm, if I rememer correct, in 7.7, you cant walk inside players, maybe its a client problem, and the solution is the use of otc
You can walk into other players/monsters on any Tibia version by walking up/down stairs.

Before 8.x - probably 8.1, but i'm not 100% sure - protocol GMs/Stalkers were not 100% invisible. They were hidden by setting outfit ID to 0, which made them invisible in client, but they could be easily detect with bot (there were bots changing outfit ID from 0 to Stalker outfit, which made 'invisible Stalkers' visible in client).
It was because packet adding creature to tile (up to 8.0 client update), did not set 'stackpos' of creature. New creature walking into tile was always added 'on top'.
Your server is downgrade of 8.0+ server with new invisibility code, which calculates custom 'stackpos' for each client (ex. GM sees himself of stack 1 and player on stack 2, but player sees himself on stack 1 and there is no information about invisible GM/Stalker in network packet).

7.72 does not send stackpos:
8.60 sends stackpos:

GM sees himself of stack 1 and player on stack 2, but player sees himself on stack 1 and there is no information about invisible GM/Stalker in network packet
With situation described above, server knows that GM has stack 1 and player stack 2 (as player logged on GM position, he was added 'on top' of GM and get higher stack number).
When GM turns off invisibility, nothing changes in GM client, but server sends 'addCreature' to player client, client 7.x adds it 'on top', which makes 'player stack 1, GM stack 2' in player client, but on server it's 'player stack 2, GM stack 1'. Now when player makes step, server sends to everyone on screen that creature from 'tile x,y,z stack pos 2 moved to tile x,y,z'. GM client moves player, but player client moves GM, as it thinks that GM is on stack pos 2.

There are 2 possible fixes:
  • remove 8.x invisibility code and send invisible creatures to client, just change outfit ID to 0, to make them not visible in client
  • resend whole tile, when creature changes invisibility, resending tile will remove all creatures and add again in valid order, so they will have same stackpos in client as on server, but there is one problem: if you resend creature that is attacked/followed by some, it will cancel attack/follow in client, as for moment client will think that creature does not exist anymore
 
Have you tried just adding a comment to the line that the gesior placed?
My engine its not the same, so have huge differences:

C++:
void ProtocolGame::sendUpdateTile(const Tile* tile, const Position& pos)
{
    if(!canSee(pos))
        return;

    NetworkMessage_ptr msg = getOutputBuffer();
    if(!msg)
        return;

    TRACK_MESSAGE(msg);
    msg->put<char>(0x69);
    msg->putPosition(pos);
    if(tile)
    {
        GetTileDescription(tile, msg);
        msg->put<char>(0x00);
        msg->put<char>(0xFF);
    }
    else
    {
        msg->put<char>(0x01);
        msg->put<char>(0xFF);
    }
}

void ProtocolGame::sendAddCreature(const Creature* creature, const Position& pos, uint32_t stackpos)
{
    if(!canSee(creature))
        return;

    NetworkMessage_ptr msg = getOutputBuffer();
    if(!msg)
        return;

    TRACK_MESSAGE(msg);
    if(creature != player)
    {
        AddTileCreature(msg, pos, stackpos, creature);
        return;
    }

    msg->put<char>(0x0A);
    msg->put<uint32_t>(player->getID());
    msg->put<char>(0x32);
    msg->put<char>(0x00);

    msg->put<char>(player->hasFlag(PlayerFlag_CanReportBugs));
    if(Group* group = player->getGroup())
    {
        int32_t reasons = group->getViolationReasons();
        if(reasons > 1)
        {
            msg->put<char>(0x0B);
            for(int32_t i = 0; i < 32; ++i)
            {
                msg->put<char>(0xFF);
            }
        }
    }

    AddMapDescription(msg, pos);
    for(int32_t i = SLOT_FIRST; i < SLOT_LAST; ++i)
        AddInventoryItem(msg, (slots_t)i, player->getInventoryItem((slots_t)i));

    AddPlayerStats(msg);
    AddPlayerSkills(msg);

    LightInfo lightInfo;
    g_game.getWorldLightInfo(lightInfo);

    AddWorldLight(msg, lightInfo);
    AddCreatureLight(msg, creature);

    player->sendIcons();

    if (m_spectator)
        return;

    for(VIPSet::iterator it = player->VIPList.begin(); it != player->VIPList.end(); ++it)
    {
        std::string vipName;
        if(IOLoginData::getInstance()->getNameByGuid((*it), vipName))
        {
            Player* tmpPlayer = g_game.getPlayerByName(vipName);
            sendVIP((*it), vipName, (tmpPlayer && player->canSeeCreature(tmpPlayer)));
        }
    }
}

void ProtocolGame::sendRemoveCreature(const Creature*, const Position& pos, uint32_t stackpos)
{
    if(!canSee(pos))
        return;

    NetworkMessage_ptr msg = getOutputBuffer();
    if(!msg)
        return;

    TRACK_MESSAGE(msg);
    RemoveTileItem(msg, pos, stackpos);
}
 
Before 8.x - probably 8.1, but i'm not 100% sure - protocol GMs/Stalkers were not 100% invisible. They were hidden by setting outfit ID to 0, which made them invisible in client, but they could be easily detect with bot (there were bots changing outfit ID from 0 to Stalker outfit, which made 'invisible Stalkers' visible in client).
It was because packet adding creature to tile (up to 8.0 client update), did not set 'stackpos' of creature. New creature walking into tile was always added 'on top'.
Your server is downgrade of 8.0+ server with new invisibility code, which calculates custom 'stackpos' for each client (ex. GM sees himself of stack 1 and player on stack 2, but player sees himself on stack 1 and there is no information about invisible GM/Stalker in network packet).

If anyone is curious about when Cipsoft changed this, it was with update 8.41*. Same update that removed the ability to stairhop :)

invisible creature.PNG

*src
 
Last edited:
in this distro its working perfectly. (the ghost command) stacking and all. this is one of the 7.72 protocol with 7.4 it has like client inside item folder with old tibianic dll or something i think build in i dont remember but its pretty solid distro
 
Back
Top