Curiosidade minha, mas qual o porquê de deixar um hiperlink para uma busca no google sobre alavancas?
local position_of_wall = {x = 88, y = 125, z = 7}
local wall_item_id = 1040
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
local wall = getTileItemById(position_of_wall, wall_item_id)
if wall.uid > 0 then
addEvent(function()
doTransformItem(item.uid, 1945)
doCreateItem(wall_item_id, position_of_wall)
end, 15 * 1000)
doRemoveItem(wall.uid, 1)
doTransformItem(item.uid, 1946)
end
elseif item.itemid == 1946 then
doPlayerSendCancel(cid, "This lever is stuck.")
end
return true
end
Bai