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

Lua Red Skull No Loss Items without edit sources?

Ghazer

Member
Joined
Mar 13, 2009
Messages
350
Reaction score
6
How to do it? red skull when die no loss items? I dont want edit source =/ its possible?
 
Lua:
function onDeath(cid, corpse, deathList)
if getPlayerBlessing(cid,5) then
if (getCreatureSkullType(cid) == SKULL_RED) then
doCreatureSetDropLoot(cid, false)
end
end
return true
end

Not tested.
 
You need edit sources:
In players.cpp change:
Lua:
if(skull > SKULL_WHITE || (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]);
}
for
Lua:
if(skull > SKULL_BLACK || (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]);
}
 
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if getCreatureSkullType(cid) == SKULL_RED) then
		doCreatureSetDropLoot(cid, false)
	end
return true
end

You should not need to edit sources.
This is untested.
 
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if getCreatureSkullType(cid) == SKULL_RED) then
doCreatureSetDropLoot(cid, false)
end
return true
end

Dont work

717d02ea709847909b77830.png


- - - Updated - - -

BUMP¿?

- - - Updated - - -

gfdfd
 

Attachments

  • 717d02ea709847909b77830.jpg
    717d02ea709847909b77830.jpg
    14.3 KB · Views: 8 · VirusTotal
Last edited:
Sorry there was a sneaky bracket in there, try this.
Still untested.
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if getCreatureSkullType(cid) == SKULL_RED then
doCreatureSetDropLoot(cid, false)
end
return true
end
 
I dont want compile bro, thank for your help really but I want know if its possible do it without compiling...

ignore my bad english haha
 
Back
Top