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

[Request] Declare war - No frags if actived.

mamon_2

Banned User
Joined
Jul 2, 2007
Messages
424
Reaction score
0
Hi, well I was thinking that if you use a command like !war guildName, all players integrated to war, when they kill each other, they dont get frags... Ofcourse the leaders have to accept it with other command, like !war accept, or !war decline.
It would be very funny, since there are some wars on OTs that are 5 to 20, where the 5 can win, but gets red and then banned, so no chance...

Any one knows how to do a system with this idea? It would be wonderfull.
 
Not sure, but in my opinion it would need source edit, to be more specific at player.cpp part -> addUnjustifiedKill function.

If you know C++ you could add there a check if the player has defined storage value set to 1 and if the victim has it, if both return value = 1, then it wont add redSkullTime.

Im not any good at C++, but you can try:
Code:
void Player::addUnjustifiedDead(const Player* attacked)
{
	if(hasFlag(PlayerFlag_NotGainInFight) || attacked == this){
		return;
	}

	std::stringstream Msg;
	if(getStorageValue(GUILD_WAR_STORAGE, 1) && attacked->getStorageValue(GUILD_WAR_STORAGE, 1))
	{
		Msg << "You have killed " << attacked->getName() << ".";
	}
	else
	{
		Msg << "Warning! The murder of " << attacked->getName() << " was not justified.";
		redSkullTicks += g_config.getNumber(ConfigManager::FRAG_TIME);
	}
	sendTextMessage(MSG_STATUS_WARNING, Msg.str());

It will be still somewhat bugged, but w/e, just a try.
 
well if your gunna do a source edit, than you might as well make the skull system not work if one guild is at war with another, not work for those two dueling anyway. seems possible
 
well if your gunna do a source edit, than you might as well make the skull system not work if one guild is at war with another, not work for those two dueling anyway. seems possible

Uhm... That need some more edits:
iologindata.cpp, player.cpp, game.cpp and something in combat.cpp I guess. Will take a look at it later :P

But as I mentioned, Im noob at C++
 
you just have to check if its ok x guild and of y guild on void Player::addUnjustifiedDead(const Player* attacked), but its not that easy I could do it but if you get war you will have to edit sources manually or even a config.lua could be used, maybe also a db read and check the guilds involved if the killed is on war the dont add frag to the killer xD
 
Back
Top