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

Protection Action

ToninhoGC

WarGate.EnT
Joined
Oct 2, 2007
Messages
194
Reaction score
1
I need an action, which is when the person dies it is less than level 30, it does not lose any items, lost level, skills, most do not miss the items, this is possible?
 
Code:
function onPrepareDeath(cid, killer) 
    if getPlayerLevel(cid) <= 30 then 
        doSetCreatureDropLoot(cid, 0) 
    end 
return TRUE
end

Ofc register this creature event etc.

No idea for exp, skills, but my script should prevent lvls <= 30 from dropping any items.
 
onPreparedDeath this working 100% in 0.3? Good for skills is easy, just make a function to change the information of system loss in the database, I wanted even more so for items ^ ^, Thanks
 
Code:
function onPrepareDeath(cid, killer) 
    if getPlayerLevel(cid) <= 30 then 
        for i = LOSS_EXPERIENCE, LOSS_ITEMS do
	doPlayerSetLossPercent(cid, i, 0)
    end 
    end 
return TRUE
end

Test it
 
Code:
function onLogin(cid)
	   if getPlayerLevel(cid) <= 30 then
 for i = LOSS_EXPERIENCE, LOSS_ITEMS do
	   doPlayerSetLossPercent(cid, i, 0)
 end
 return TRUE
end
 
Back
Top