• 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 Decay Doors

Exoltes

Novia OTserv Developer
Joined
Jul 2, 2009
Messages
563
Reaction score
47
Location
Belgium
I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).

I'm wondering what would be the best way to decay my open doors back to closed doors after 30 seconds.

I thought just adding decay in items.xml with duration but that doesn't seem to work.
Code:
    <item id="9170" article="an" name="open door">
        <attribute key="duration" value="1"/>
        <attribute key="decayTo" value="9169"/>
        <attribute key="type" value="door"/>
    </item>
Maybe someone can tell me why this doesn't work and what probbably would be the most efficient way to fix this?

Thanks in advance.
 
use this script
Code:
function onUse(cid, item, frompos, item2, topos)
            doTransformItem(item.uid,9170)
            doDecayItem(item.uid)
      return true
end
or in file doors.lua

add this
doDecayItem(item.uid)
after
doTransformItem(item.uid,
 
Last edited:
In case it's not clear, you'll want to use @Sir Islam's script/help, as well as, the decayTo in items.xml
 
Back
Top