• 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 1.X+ Skull appearing on all creatures on PK

L0FIC

Active Member
Joined
May 29, 2024
Messages
71
Reaction score
45
Hey guys,

I am using TFS 1.5 downgrade by nekiro and otcv8 client to try and set up a 7.72 tibia OT server.
I have one or two problems that appear upon PK:ing another player. Scenarios below in text and screenshots attached.

* If player 1 attacks player 2, player 1 gets a skull BUT also all other creatures and players on the map get it if player 1 leaves screen and comes back (only visually, for player 1 on his client). See image player1 pov2 attached. player1 pov is before leaving the screen and coming back.

* Player 2 (on his/her client), does not even see the skull of PK:ing player 1. See attached image player2 pov.

* Same issue for RS

Anyone that has seen/solved this before that can help? I know the source code involves skull on monsters and npc etc, personally I do not want that. So if I can inactivate it without having to recompile everything would be nice. But that might also be a separate issue from what I am experiencing here.

Thanks!
 

Attachments

Update: Issue seems to be almost 100% related to this function below in player.cpp.
I tried commenting off parts of the code snippet to try and locate the issue, seems to be related to setSkull command.
But I have compared sources to other TFS downgrade sources and other 7.72 server codes like nostalrius, still no success.

C++:
void Player::onAttackedCreature(Creature* target, bool addFightTicks /* = true */)
{
    Creature::onAttackedCreature(target);


    if (target->getZone() == ZONE_PVP) {
        return;
    }


    if (target == this) {
        if (addFightTicks) {
            addInFightTicks();
        }
        return;
    }


    if (hasFlag(PlayerFlag_NotGainInFight)) {
        return;
    }


    Player* targetPlayer = target->getPlayer();
    if (targetPlayer && !isPartner(targetPlayer) && !isGuildMate(targetPlayer)) {
        if (!pzLocked && g_game.getWorldType() == WORLD_TYPE_PVP_ENFORCED) {
            pzLocked = true;
            sendIcons();
        }


        targetPlayer->addInFightTicks();


        if (getSkull() == SKULL_NONE && getSkullClient(targetPlayer) == SKULL_YELLOW) {
            addAttacked(targetPlayer);
            targetPlayer->sendCreatureSkull(this);
        } else if (!targetPlayer->hasAttacked(this)) {
            if (!pzLocked) {
                pzLocked = true;
                sendIcons();
            }


            if (!Combat::isInPvpZone(this, targetPlayer) && !isInWar(targetPlayer)) {
                addAttacked(targetPlayer);


                if (targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE) {
                    setSkull(SKULL_WHITE);
                }


                if (getSkull() == SKULL_NONE) {
                    targetPlayer->sendCreatureSkull(this);
                }
            }
        }
    }


    if (addFightTicks) {
        addInFightTicks();
    }
}
 
pretty sure its an client issue as
runs on nekiro 7.72 and no problems like that ever occured
however this nekiro dont have working writeables so no parcels so better give up on that engine.
 
pretty sure its an client issue as
runs on nekiro 7.72 and no problems like that ever occured
however this nekiro dont have working writeables so no parcels so better give up on that engine.
hmm.. i got the same problem when using cipsofts 7.72 client with my server code. :/

parcels not fixed? fixed according to @Nekiro back in 2021: Save depot locker items · nekiro/TFS-1.5-Downgrades@f907320 (https://github.com/nekiro/TFS-1.5-Downgrades/commit/f90732099a6623df967faf55e0d5211b5855f706)
 
you cant use writeable items label etc they bug out
1721082782819.png
Post automatically merged:

Post automatically merged:

UPDATE/SOLUTION: Recompiling solved it! Now i just need to find out what caused this error in the first place...
 
Last edited:

Similar threads

Back
Top