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

Source edit (OTHIRE)

Eldora

Banned User
Joined
Oct 19, 2009
Messages
604
Reaction score
26
Need help to replace the white skull system with a message saying "PK!" above the players head instead.

I have already disabled the white skull, just need to add the "PK!" text message instead :)

player.cpp
C++:
void Player::onAttackedCreature(Creature* target)
{
    Creature::onAttackedCreature(target);

    if(!hasFlag(PlayerFlag_NotGainInFight)){
        bool doPzLock = false;
        if(target != this){
            if(Player* targetPlayer = target->getPlayer()){
                doPzLock = checkPzBlock(targetPlayer);

                #ifdef __SKULLSYSTEM__
                if( !isPartner(targetPlayer) &&
                    !Combat::isInPvpZone(this, targetPlayer) &&
                    !targetPlayer->hasAttacked(this)){

                    addAttacked(targetPlayer);

                    if(targetPlayer->getSkull() == SKULL_NONE && getSkull() == SKULL_NONE){
                        //add a white skull
                        //setSkull(SKULL_WHITE);
                        //g_game.updateCreatureSkull(this);
                    }

                    if(getSkull() == SKULL_NONE){
                        //yellow skull
                        targetPlayer->sendCreatureSkull(this);
                    }
                }
                #endif
            }
        }

        addInFightTicks(g_config.getNumber(ConfigManager::IN_FIGHT_DURATION), doPzLock);
    }
}
 
Back
Top