Me falae ao certo oque você ta querendo fazer e oque ta dando de errado
- Forums
- xTibia - Notícias e Suporte
- Soluções
- Archived
- Ajuda Aqui Script Alavanca.
info
Group: Artesão
Joined: 16/06/11
Posts: 113
Reputation: +16

info
Group: Campones
Joined: 01/06/08
Posts: 2
Reputation: 0
Tibia Character: Knight of Mage

Quero teleportar UM player colocando 4 items em cada lugar para ir pra outra sala..

info
Group: Campones
Joined: 01/06/08
Posts: 2
Reputation: 0
Tibia Character: Knight of Mage

/\ Pow, não funfou ![]()
aqui a foto do erro

aqui o script que vc passou configurado :
local config = {
-- level para fazer a quest
level = 100,
-- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards)
redo = {
status = false, -- true = unlimited, false = once
storageValue = 61111 -- only if status is false this will be used
},
-- vocation requirement, positions and item configuration
{
vocations = {1, 5},
itemId = 6548,
playerPos = {x=1038, y=1022, z=8}, -- posicao do tile
newPos = {x=1030, y=1011, z=8}, -- nova posicao.
itemPos = {x=1029, y=1021, z=8} -- Position do item.
},
{
itemId = 6549
itemPos = {x=1039, y=1022, z=8} --Position do item.
},
{
itemId = 6550
itemPos = {x=1043, y=1022, z=8} --Position do item.
},
{
itemId = 6551
itemPos = {x=1035, y=1032, z=8} --Position do item.
}
}
function onUse(cid)
local players = {}
for _, v in ipairs(config) do
v.playerPos.stackpos = 253
local player = getThingfromPos(v.playerPos).uid
if isPlayer(player) == FALSE then
return doPlayerSendCancel(cid, "There are not enough players.")
elseif getPlayerLevel(player) < config.level then
players.level = true
elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then
players.vocation = false
elseif config.redo.status and getPlayerStorageValue(cid, config.redo.storageValue) ~= TRUE then
players.done = true
else
v.itemPos.stackpos = 1
local item = getThingfromPos(v.itemPos)
if item.itemid ~= v.itemId then
players.item = true
else
table.insert(players, player)
end
end
end
if players.level then
doPlayerSendCancel(cid, "All players need to be level " .. config.level .. " or above.")
elseif players.vocation then
doPlayerSendCancel(cid, "All players must stand on the correct tiles.")
elseif players.item then
doPlayerSendCancel(cid, "All items must be on the correct positions.")
else
for k, player in ipairs(players) do
doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF)
doTeleportThing(player, config[k].newPos)
doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT)
end
end
return TRUE
end
Edited Novembro 25 by knightmage
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

o teu script ta certo só falta colocar no "actions.xml" a tag:
<action uniqueid="50102" event="script" value="nomedoteuscript.lua"/>
e na alavanca com o mapa editor poem o id "50102".
E configura as posições corretas que ficarão os itens no scripts. Se puder passar todas as posições, Exemplo:
posição item 1 : (x = 10, y = 20, z = 6)
posição item2 : (x = 50, y = 30, z = 5)
.
.
posição playerTeleportado: (x= 100, y = 50, z = 7)
Eu configuro pra ti, é sóh passar!



info
Group: Campones
Joined: 01/06/08
Posts: 2
Reputation: 0
Tibia Character: Knight of Mage
Eu uso este script, que acredito eu já esta configurado corretamente (eu peguei num outro topico aqui e arrumei com as cordenadas do meu ot e talz.. o script é esse :
O erro é, que mesmo com os items td no lugar certo, da o erro "Algum item está faltando.", ajudem por favor, não sei se esqueci de colocar algo no script ou não.. dou +REP.
Aqui o script original :
Edited Novembro 24 by knightmage