• 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 player isn't getting frag if the attacked fight back

Lurk

Active Member
Joined
Dec 4, 2017
Messages
336
Reaction score
48
Hello, I'm using tfs 0.4 Fir3element/3777 (https://github.com/Fir3element/3777) and I'm having this problem with my frag system
If a player kills another without the attacked fighting back, the injust kill works just fine and the player (attacker) get the frag
If let's say I get attack (attacked) by a white skull (attacker) and hit him back he doesn't get a frag when he kills me
as far as I'm concerned the attacker should get a frag even if I fight back, I have tried changing allowFightback from my cconfig.lua but it didn't work

I have this on my config.lua
Lua:
deathListEnabled = true
useFragHandler = true
allowFightback = true -- tho I've tried false as well

I'm not using any playerdeath or frag script, this guy seem to have had the same problem Frag System is broken (https://otland.net/threads/frag-system-is-broken.242290/)
 
Last edited:
After fightback no white skull player recive yellow skull ?

Check function in player.cpp
Lua:
bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
{
    if(!Creature::onKilledCreature(target, entry))
        return false;

    if(hasFlag(PlayerFlag_NotGenerateLoot))
        target->setDropLoot(LOOT_DROP_NONE);

    Condition* condition = NULL;
    if(target->getMonster() && !target->isPlayerSummon() && !hasFlag(PlayerFlag_HasInfiniteStamina)
        && (condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_HUNTING,
        g_config.getNumber(ConfigManager::HUNTING_DURATION))))
        addCondition(condition);

    if(hasFlag(PlayerFlag_NotGainInFight) || getZone() != target->getZone())
        return true;

    Player* targetPlayer = target->getPlayer();
    if(!targetPlayer || Combat::isInPvpZone(this, targetPlayer) || isPartner(targetPlayer) || isAlly(targetPlayer))
        return true;

    War_t enemy;
    if(targetPlayer->getEnemy(this, enemy) && (!entry.isLast() || IOGuild::getInstance()->war(enemy)))
        entry.setWar(enemy);

    if(!entry.isJustify() || !hasCondition(CONDITION_INFIGHT))
        return true;

    if(!targetPlayer->hasAttacked(this) && target->getSkull() == SKULL_NONE && targetPlayer != this
        && (addUnjustifiedKill(targetPlayer, !enemy.war) || entry.isLast()))
        entry.setUnjustified();

    addInFightTicks(true, g_config.getNumber(ConfigManager::WHITE_SKULL_TIME));
    return true;
}
 
Back
Top