acho que isso resolve:
function onLogin(player) local spawnPosition = Position(100, 50, 7) -- Coordenadas do spawn local occupied = false -- Verifica se existe algum jogador na posição de spawn for _, otherPlayer in ipairs(Game.getPlayers()) do if otherPlayer:getPosition() == spawnPosition then occupied = true break end end -- Se a posição de spawn estiver ocupada, move o jogador para uma posição próxima if occupied then local newPosition = spawnPosition:getRandomTile(1) -- obtém uma posição aleatória adjacente player:teleportTo(newPosition) else player:teleportTo(spawnPosition) end end -- Registra o evento de login para chamar a função onLogin function onLoginEvent(player) onLogin(player) end


info
Group: Artesão
Joined: 01/03/20
Posts: 110
Reputation: +1
Gender: Masculino
Tibia Character: Samuel on Issobra
-=[TFS]=- 0.3.6 8.60 - ME AJUDA POR FAVOR QUANDO PLAYER LOGA NO TEMPLO DA DEBUG POR QUE TEM OURO CHAR NA MESMA POSIÇÃO