local c = {
[11111yourUidNr1111] = {
pos = {
{x = 1111, y = 2222, z = 333}, -- wall pos 1
{x = 1111, y = 2222, z = 333}, -- wall pos 2
{x = 1111, y = 2222, z = 333} -- wall pos 3
},
relocate = {
{x = 1111, y = 2222, z = 333}, -- relocate pos from pos 1
{x = 1111, y = 2222, z = 333}, -- relocate pos from pos 2
{x = 1111, y = 2222, z = 333} -- relocate pos from pos 3
},
statua = 1304, -- wall itemid
time = 10 -- how much seconds
},
[22222yourUidNr2222] = {
pos = {
{x = 1111, y = 2222, z = 333}, -- wall pos 1
{x = 1111, y = 2222, z = 333}, -- wall pos 2
...
{x = 1111, y = 2222, z = 333}, -- wall pos n-1
{x = 1111, y = 2222, z = 333} -- wall pos n
},
relocate = {
{x = 1111, y = 2222, z = 333}, -- relocate pos from pos 1
{x = 1111, y = 2222, z = 333}, -- relocate pos from pos 2
...
{x = 1111, y = 2222, z = 333} -- relocate pos from pos n-1
{x = 1111, y = 2222, z = 333} -- relocate pos from pos n
},
statua = 2343242, -- itemid
time = 10 -- how much seconds
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local u = c[item.uid]
if u then
local iu = item.uid
if(item.itemid == 1946) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
return true
end
if u.pos then
for i = 1, #u.pos do
if getTileItemById(u.pos[i], u.statua).uid > 0 then
doRemoveItem(getTileItemById(u.pos[i], u.statua).uid, 1)
doSendMagicEffect(u.pos[i], CONST_ME_POFF)
addEvent(function()
doRelocate(u.pos[i], u.relocate[i])
doCreateItem(u.statua, 1, u.pos[i])
doTransformItem(iu, 1945)
end, u.time*1000)
end
end
end
end
return true
end