Code:
function onDeath(cid, corpse, killer)
local key = 2089 -- key number
local creaturename = getCreatureName(cid)
if creaturename == 'demon' then -- <span class="highlight">monster</span> name
local key = doAddContainerItem(corpse, key, 1)
doSetItemActionId(key, 6000) -- action ID, same as door action ID
end
end
how can i make the door close in xx time with the same action id?