local config = {
wall = {id = 1039, pos = {x = 94, y = 132, z = 7}},
transformid = 425,
time = 10, -- time in minutes
playerpos = {
{x = 94, y = 130, z = 7},
{x = 94, y = 131, z = 7}
}
}
function onStepIn(cid, item, position, fromPosition)
if(getTileItemById(config.wall.pos, config.wall.id).uid > 0) then
local n = 0
for pos = 1, #config.playerpos do
if(isPlayer(getTopCreature(config.playerpos[pos]).uid)) then
n = n + 1
end
end
if(n == #config.playerpos) then
doSendMagicEffect(config.wall.pos, CONST_ME_MAGIC_RED)
doRemoveItem(getTileItemById(config.wall.pos, config.wall.id).uid,1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wall is removed.")
addEvent(doCreateItem, config.time * 60 * 1000, config.wall.id, 1, config.wall.pos)
end
end
doTransformItem(item.uid, config.transformid)
return true
end