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

Player with/without skull loss

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
All we know if we set this code below the Killed will not leave corpse and the killer will not gain frag
LUA:
doCreatureSetDropLoot(cid, false)

I have this script below and if possible I want this features:

* This script add via sql code the frag to Killer
* This script add via sql code the death to Killed
* This script will set name to corpse (You recognize Killed he/she was killed by Killer)
* Killer receive this message "Warning! The murder of Killed was not justified."

LUA:
local corpse_ids = {
	[0] = 3065, -- female
	[1] = 3058  -- male
}
function onPrepareDeath(cid, deathList)
 
		doCreatureSetDropLoot(cid, false)
	end
	return true
end

This script will be added in the Hardcore/War server that I'll add in this Forum this week. The credits of ALL scripts will be added in a changelog in the post and inside server dir.
 
Last edited:
What you want to do by this function??
LUA:
doCreatureSetDropLoot(cid, false)


That in corpse there won't be any item?? Player don't loss anything?? Or what??
 
What you want to do by this function??
LUA:
doCreatureSetDropLoot(cid, false)


That in corpse there won't be any item?? Player don't loss anything?? Or what??

I want killed don't lose loot(He must lose exp/skills/ml normal)

PS.: Killed will not lose loot if have red/black skull
 
In player.cpp remove red code:
Code:
		if([COLOR="red"]skull > SKULL_WHITE || [/COLOR](item->getContainer() && tmp < loss) || (!item->getContainer() && tmp < itemLoss))
		{
			g_game.internalMoveItem(NULL, this, corpse, INDEX_WHEREEVER, item, item->getItemCount(), 0);
			sendRemoveInventoryItem((slots_t)i, inventory[(slots_t)i]);
		}


Should work.
 
I used this function to Black skull attack players with spell areas and runes.
But black skull can't attack players with weapons/wand and keep they in target

Can someone just tell me what do I have to remove/replace in Sources?
 
Remove red conde in combat.cpp
Code:
	if(target->getPlayer() && !Combat::isInPvpZone(player, target) && player->getSkullType(target->getPlayer()) == SKULL_NONE)
	{
		if(player->getSecureMode() == SECUREMODE_ON)
			return RET_TURNSECUREMODETOATTACKUNMARKEDPLAYERS;

[COLOR="#FF0000"]		if(player->getSkull() == SKULL_BLACK)
			return RET_YOUMAYNOTATTACKTHISPLAYER;[/COLOR]
	}



I don't exactly know what for it is but remove it :p (x2)
Code:
	if(change < 0 && caster && caster->getPlayer() && target->getPlayer()[COLOR="#FF0000"] && target->getPlayer()->getSkull() != SKULL_BLACK[/COLOR])
		change = change / 2;




I didn't test it so not sure that it will work.
 
I'll test it later, im in job now thanks :***

EDIT:
Removing red words black skull can cast spells xD
Code:
if(change < 0 && caster && caster->getPlayer() && target->getPlayer() && target->getPlayer()->getSkull() != SKULL_BLACK)
		change = change / 2;


EDIT2: WORKING!
 
Last edited:
All we know if we set this code below the Killed will not leave corpse and the killer will not gain frag
LUA:
doCreatureSetDropLoot(cid, false)

I have this script below and if possible I want this features:

* This script add via sql code the frag to Killer
* This script add via sql code the death to Killed
* This script will set name to corpse (You recognize Killed he/she was killed by Killer)
* Killer receive this message "Warning! The murder of Killed was not justified."

LUA:
local corpse_ids = {
	[0] = 3065, -- female
	[1] = 3058  -- male
}
function onPrepareDeath(cid, deathList)
 
	if getPlayerLevel(cid) < 50 and getCreatureSkullType(cid) < 3 then
		doCreatureSetDropLoot(cid, false)
	
	end
end
	return true
end

It'll protect all players level 50- (without skull) in PVP Servers (UpLevel).
 
Back
Top