• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Prevent lose items without AOL

Rodo

New Member
Joined
Oct 23, 2007
Messages
575
Solutions
1
Reaction score
3
Location
Mexico
Creaturescripts.xml:

PHP:
<event type="death" name="NoAol" event="script" value="noaol.lua"/>


Add to login.lua:

Lua:
	registerCreatureEvent(cid, "NoAol")


noaol.lua:

Lua:
function onPrepareDeath(cid, deathList)
  if (isPlayer(cid)) == TRUE then
    doCreatureSetDropLoot(cid, false)
  end
  return TRUE
end


It doesn't matter if you have redskull.

Based on this idea:
http://otland.net/f16/aol-help-83041/
:peace:
 
This may be good for fun servers but is it possible to make it like if they get killed by players they lose the items?
 
Cant you just do Deathlosspercent thing in config.lua? or is that just for levels and skills?
 
<event type="death" name="NoAol" event="script" value="noaol.lua"/>
to
<event type="preparedeath" name="NoAol" event="script" value="noaol.lua"/>
 
<event type="death" name="NoAol" event="script" value="noaol.lua"/>
to
<event type="preparedeath" name="NoAol" event="script" value="noaol.lua"/>

when not using this, it doesnt work on 0.4, when you use yours with preparedeath, it works but it shows u r dead at temple position and the body disappears...
 
Last edited:
if your going to give everyone no lootloss go to login.lua and add this under

function onLogin(cid)

Lua:
doCreatureSetDropLoot(cid, false)
 
@up that makes them also not have a dead body. Also made a problem in my server where nobody can get frags.

But it does work where they loose no loot.

@topic my players still looses their ammys and yes you do still have RS item loss. All items are taken still.
 
Last edited:
Back
Top