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

Sorry i have other error :S white skull / kill pk = 3000 hours pz

Lucas Rodriguez

New Member
Joined
Sep 2, 2020
Messages
37
Reaction score
1
i have tfs .1.2 and have all good example:
Config :
pzLocked = 60000
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000

Configmanager.cpp:
integer[WHITE_SKULL_TIME] = getGlobalNumber(L, "whiteSkullTime", 15 * 60 * 1000);


where is the fail? thanks and sorry.... :S
 
Solution
Modify
Code:
g_config.getNumber(ConfigManager::WHITE_SKULL_TIME) * 1000, 0);
to
Code:
g_config.getNumber(ConfigManager::WHITE_SKULL_TIME), 0);
I can't think of anything but can you try decreasing it to 15 * 60 in both config.lua and configmanager.cpp it might be in seconds instead of MS?
 
Can you send this function?
Code:
bool Player::onKilledCreature(Creature* target, bool lastHit/* = true*/)

player.cpp btw
 
bool Player::eek:nKilledCreature(Creature* target, bool lastHit/* = true*/)
{
bool unjustified = false;

if (hasFlag(PlayerFlag_NotGenerateLoot)) {
target->setDropLoot(false);
}

Creature::eek:nKilledCreature(target, lastHit);

if (Player* targetPlayer = target->getPlayer()) {
if (targetPlayer && targetPlayer->getZone() == ZONE_PVP) {
targetPlayer->setDropLoot(false);
targetPlayer->setLossSkill(false);
} else if (!hasFlag(PlayerFlag_NotGainInFight) && !isPartner(targetPlayer)) {
if (!Combat::isInPvpZone(this, targetPlayer) && hasAttacked(targetPlayer) && !targetPlayer->hasAttacked(this) && targetPlayer != this) {
if (targetPlayer->getSkull() == SKULL_NONE && !isInWar(targetPlayer)) {
unjustified = true;
addUnjustifiedDead(targetPlayer);
}
}
}

if (lastHit && hasCondition(CONDITION_INFIGHT)) {
pzLocked = true;
Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_config.getNumber(ConfigManager::WHITE_SKULL_TIME) * 1000, 0);
addCondition(condition);
 
bool Player::eek:nKilledCreature(Creature* target, bool lastHit/* = true*/)
{
bool unjustified = false;

if (hasFlag(PlayerFlag_NotGenerateLoot)) {
target->setDropLoot(false);
}

Creature::eek:nKilledCreature(target, lastHit);

if (Player* targetPlayer = target->getPlayer()) {
if (targetPlayer && targetPlayer->getZone() == ZONE_PVP) {
targetPlayer->setDropLoot(false);
targetPlayer->setLossSkill(false);
} else if (!hasFlag(PlayerFlag_NotGainInFight) && !isPartner(targetPlayer)) {
if (!Combat::isInPvpZone(this, targetPlayer) && hasAttacked(targetPlayer) && !targetPlayer->hasAttacked(this) && targetPlayer != this) {
if (targetPlayer->getSkull() == SKULL_NONE && !isInWar(targetPlayer)) {
unjustified = true;
addUnjustifiedDead(targetPlayer);
}
}
}

if (lastHit && hasCondition(CONDITION_INFIGHT)) {
pzLocked = true;
Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_INFIGHT, g_config.getNumber(ConfigManager::WHITE_SKULL_TIME) * 1000, 0);
addCondition(condition);
If I read this correctly setting in your config.lua pzLocked to the value of 6 would fix it.
 
Modify
Code:
g_config.getNumber(ConfigManager::WHITE_SKULL_TIME) * 1000, 0);
to
Code:
g_config.getNumber(ConfigManager::WHITE_SKULL_TIME), 0);
 
Solution
i change : pzLocked = 60000 to 60
and

g_config.getNumber(ConfigManager::WHITE_SKULL_TIME) * 1000, 0);
to

g_config.getNumber(ConfigManager::WHITE_SKULL_TIME), 0);


Perfect thanks all!!!!!!!!!!!!!
 
Back
Top