Fiz aqui rapidinho; sabe fazer a tag?
local posis = {
[1] = {{x = x, y = y, z = z}, {x = x, y = y, z = z}}, --{posição que deve ficar, posição para onde irá},
[2] = {{x = x, y = y, z = z}, {x = x, y = y, z = z}},
[3] = {{x = x, y = y, z = z}, {x = x, y = y, z = z}},
[4] = {{x = x, y = y, z = z}, {x = x, y = y, z = z}},
}
function onUse(cid, item, frompos, item2, topos)
local alavanca = item.itemid == 1945 and 1946 or 1945
local check = false
for _, pos in pairs(posis) do
local creature = getThingFromPos(pos[1])
if not isPlayer(creature) then
check = true
break
end
end
if check then
return doPlayerSendCancel(cid, "Algum jogador não se encontra na posição correta.") and doTransformItem(item.uid, alavanca)
else
doTransformItem(item.uid, alavanca)
for a, b in pairs(posis) do
doTeleportThing(getThingFromPos(b[1]), b[2])
doPlayerSendTextMessage(getThingFromPos(b[1]), "Boa sorte.")
end
end
return true
end
Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.