• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Old fragsystem (hours) in 0.3.6pl1 ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
Anyone got old frag system from 8.4/8.42
ex.
1 frag = timetodecreasefrags

Anyone got that code in Cpp compatible for 0.3.6pl1 ?
 
Last edited:
Hello.
Anyone got old frag system from 8.4/8.42
ex.
1 frag = timetodecreasefrags

Anyone got that code in Cpp compatible for 0.3.6pl1 ?

I don't want to be rude, but you're the person that starts the topics in this forum the most. Try to make things by yourself.
 
search-gif.gif
 
I don't want to be rude, but you're the person that starts the topics in this forum the most. Try to make things by yourself.

I don't know how I can add the frag time ex. 1 frag = 3 hours until dissapear.

@EliteOTs
I searched the otland and i not found any topic similar to my request.
 
I don't know how I can add the frag time ex. 1 frag = 3 hours until dissapear.

@EliteOTs
I searched the otland and i not found any topic similar to my request.

search more specific then.
Need it for 8.4, then look for 8.4 tfs sources and check it up.

Search doesn't mean you write "help!" and the forum know exactly what you mean and give you what you need.
Sometime you need to search after several things, look around.
 
I checked the 8.4 sources but idk how i can move that decreasePlayerFragTime to 8.54 ;/
God... thats why i started the thread.

When i trying CTLR+C + CTRL+V and i do it analogy i got problem with login at server ;/ (Cant find character at account).
 
I wasn't able to find anything released for "non-premium" member's. All of the frags time has been summed up in recent updates.

To change this, it requires source editions.

LUA:
deathAssistCount = 1 -- will show lastHit + maxDamageKiller
dailyFragsToRedSkull = 3 -- 3 frags and you'll have RS

redSkullLength = 6 * 60 * 60 -- this is 2 hour's for one frag, (3 x 2 = 6)
useBlackSkull = false -- obviously turns off black skull

I understand this isn't exactly what you want, but I tried. :(
 
Last edited:
You can mimic the old system by editing Player::addUnjustifiedKill.
Remove any code related to monthly and weekly frags, and change the remaining 86400/84600 (the second is elf's typo in 0.3.6) to 10800 for 3 hours.

Don't forget to edit frags.lua
 
[cpp]bool Player::addUnjustifiedKill(const Player* attacked)
{
if(g_game.getWorldType() == WORLD_TYPE_PVP_ENFORCED || attacked == this || hasFlag(
PlayerFlag_NotGainInFight) || hasCustomFlag(PlayerCustomFlag_NotGainSkull))
return false;

if(client)
{
char buffer[90];
sprintf(buffer, "Warning! The murder of %s was not justified.",
attacked->getName().c_str());
client->sendTextMessage(MSG_STATUS_WARNING, buffer);
}

time_t now = time(NULL), today = (now - 10800);
std::vector<time_t> dateList;
IOLoginData::getInstance()->getUnjustifiedDates(guid, dateList, now);

dateList.push_back(now);
uint32_t tc = 0;
for(std::vector<time_t>::iterator it = dateList.begin(); it != dateList.end(); ++it)
{
if((*it) > today)
tc++;
}

uint32_t d = g_config.getNumber(ConfigManager::RED_DAILY_LIMIT);
if(skull < SKULL_RED && d > 0 && tc >= d)
setSkullEnd(now + g_config.getNumber(ConfigManager::RED_SKULL_LENGTH), false, SKULL_RED);

if(!g_config.getBool(ConfigManager::USE_BLACK_SKULL))
{
d += g_config.getNumber(ConfigManager::BAN_DAILY_LIMIT);
if(d <= 0 || tc < d)
return true;

if(!IOBan::getInstance()->addAccountBanishment(accountId, (now + g_config.getNumber(
ConfigManager::KILLS_BAN_LENGTH)), 20, ACTION_BANISHMENT, "Unjustified player killing.", 0, guid))
return true;

sendTextMessage(MSG_INFO_DESCR, "You have been banished.");
g_game.addMagicEffect(getPosition(), MAGIC_EFFECT_WRAPS_GREEN);
Scheduler::getInstance().addEvent(createSchedulerTask(1000, boost::bind(
&Game::kickPlayer, &g_game, getID(), false)));
}
else
{
d += g_config.getNumber(ConfigManager::BLACK_DAILY_LIMIT);
if(skull < SKULL_BLACK && d > 0 && tc >= d)
{
setSkullEnd(now + g_config.getNumber(ConfigManager::BLACK_SKULL_LENGTH), false, SKULL_BLACK);
setAttackedCreature(NULL);
destroySummons();
}
}

return true;
}[/cpp]
 
Search for 84600 in player.cpp and change it to 10800 as Cykotitan showed above :o
 
And what is frag time now ? 1 frag = how many hours ?

And how about talkaction ?
 
Last edited:
Back
Top