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

Won't lose any items on death below level 100;

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I want make the players below level 100 won't lose any items on death unless they have white, red or black skull.


Thanks.
 
LUA:
function onPrepareDeath(cid, killer)
	if getCreatureSkullType(cid) == SKULL_NONE then
		doSetCreatureDropLoot(cid, false)
	end
return true
end
 
Code:
    local level = getPlayerLevel(cid)
             if level < 101 then
  doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)
        else
        doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 100)
       end
         if level < 101 then
       doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0)
       end
         else
           doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 100)


add in login.lua
 
Last edited:
Back
Top