Tenta usar esse código , cria um script de action chamado alavanca.lua
e coloque esse código
local playerPosition =
{
{x = 247, y = 659, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 247, y = 660, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 247, y = 661, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 247, y = 662, z = 13, stackpos = STACKPOS_TOP_CREATURE}
}
local newPosition =
{
{x = 189, y = 650, z = 13},
{x = 189, y = 651, z = 13},
{x = 189, y = 652, z = 13},
{x = 189, y = 653, z = 13}
}
-- Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = TRUE
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
for i = 1, 4 do
player[i] = getThingfromPos(playerPosition[i])
if player[i].itemid > 0 then
if isPlayer(player[i].uid) == TRUE then
if getPlayerStorageValue(player[i].uid, 30015) == nil then
if getPlayerLevel(player[i].uid) >= 100 then
failed = FALSE
end
end
end
end
if failed == TRUE then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
failed = TRUE
end
for i = 1, 4 do
doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
doTeleportThing(player[i].uid, newPosition[i], FALSE)
doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1946 then
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return TRUE
end
Só troque essa parte :
local playerPosition =
{
{x = 247, y = 659, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 247, y = 660, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 247, y = 661, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 247, y = 662, z = 13, stackpos = STACKPOS_TOP_CREATURE}
}
local newPosition =
{
{x = 189, y = 650, z = 13},
{x = 189, y = 651, z = 13},
{x = 189, y = 652, z = 13},
{x = 189, y = 653, z = 13}
}
esses
4 x é a pocisão dos 4 players cada 1 é a pocisão de 1 player diferente
no actions.
VocÊ poem no actions.xml
<action actionid="ID" event="script" value="quests/alavanca.lua"/>
ID=action id que vc quer usar
e depois voce vai no map editor e coloca a alavanca la e da o click direito na alavanca propriedades e troca o action id para o id que vc coloco anteriormente o id da action...
boa sorte
ajudei?? rep+ por favor



info
Grupo: Campones
Registrado: 22/06/11
Posts: 4
Reputação: +1
Char no Tibia: Kathara Vico
Por favor alguem me ajuda, quero apenas uma alavanca que teleporte de uma sala para outra, apenas isso e nimguem ajuda, muitas pessoas tem topico com pedido igual ou parecido ao meu sem estar respondido, intão tirem a minha duvida e a de muito aqui do XTibia. E tipo se puder eu queria que teleportace pra tal sala e logo apos pudece entrar mais 4 players tipo segundo time. Obrigado, agradeço des de já, 30 REP+ a quem solucionar meu problema.