Posted: Fri Jun 29, 2007 7:07 am Post subject: Deleting Items
Where i can specify time after what item , which are not in player back pack and not at House, are destroying.
For example : I drop a not usefull ore on the ground of cave. It must be destroyed . What script do that ?
Thnx
There are a couple of approaches.
1. You can specify the decay timer in the itemdesc.cfg files entry for the item. (Default is 10 minutes if you don't override it.) decaytime is read at creation of the item. To set it to 30 minutes:
DecayTime=30
2. You can change the decay via script at any time. In this example you can set the decay time to 60 seconds from now:
item.decayat := ReadGameClock() + 60;
Turn off decay with
item.decayat := 0
or lock down the item.
3. In pol097 you can script the entire decay system. Enable this in servspecopt.cfg with:
DecayItems=0
See the 097 distro for an example of how to script the entire decay system yourself.
The default decay cycle runs every 10 minutes and sweeps the world at moderate speed. That means an item can decay at a minimum of 10 minutes and may be a bit longer.