Ir para conteúdo

Featured Replies

Postado

Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website).

Ex. TFS 1.3;

Base: 

1.3

 

Qual erro está surgindo/O que você procura?

fala galera estou com o seguinte erro nesse script da forgotten vão os 5 players na sala onde tem a alavanca pra ir para a sala do boss Melting Frozen Horror porem quando o primeiro puxa a alavanca somente ele vai para a sala do boss e os outros ficam parados no msm lugar tentei fixar mais n tive exito será que alguem sabe o que pode ser? se souber e puder compartilhar ficarei grato xD!!!

 

Você tem o código disponível? Se tiver publique-o aqui:

local config = {
    requiredLevel = 8,
    daily = false,
    playerPositions = {
        Position(32302, 31088, 14),
        Position(32302, 31089, 14),
        Position(32302, 31090, 14),
        Position(32302, 31091, 14),
        Position(32302, 31092, 14)
    },
    newPositions = {
        Position(32271, 31100, 14),
        Position(32270, 31100, 14),
        Position(32269, 31100, 14),
        Position(32268, 31100, 14),
        Position(32267, 31100, 14)
    },
    bosspos = {
        Position(32269, 31088, 14)
    }
}

local timerStorage = 65300

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.itemid == 9826 then
        local storePlayers, playerTile = {}

        for i = 1, #config.playerPositions do
            playerTile = Tile(config.playerPositions):getTopCreature()
            if not playerTile or not playerTile:isPlayer() then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 5 players.")
                return true
            end

            if playerTile:getLevel() < config.requiredLevel then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "All the players need to be level ".. config.requiredLevel .." or higher.")
                return true
            end

            storePlayers[#storePlayers + 1] = playerTile
        end

        for i = 1, #config.bosspos do
            Game.createMonster("Melting Frozen Horror", config.bosspos)
        end

        local players
        for i = 1, #storePlayers do
            if player:getStorageValue(timerStorage) > os.time() then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need to wait 20 hours!")
                return true
            end
            
            players = storePlayers
            config.playerPositions:sendMagicEffect(CONST_ME_POFF)
            players:teleportTo(config.newPositions)
            config.newPositions:sendMagicEffect(CONST_ME_ENERGYAREA)
            players:setDirection(DIRECTION_EAST)
            player:setStorageValue(timerStorage, os.time() + (1*60*60*20)) -- 20 horas here.
        end
    elseif item.itemid == 9825 then
        if config.daily then
            player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE))
            return true
        end
    end

    item:transform(item.itemid == 9826 and 9825 or 9826)
    return true
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

Postado

Testa aê!
 

local config = {
    requiredLevel = 8,
    Daily = false,
    BossPosition = Position(32269, 31088, 14),
    playerPositions = {
        Position(32302, 31088, 14),
        Position(32302, 31089, 14),
        Position(32302, 31090, 14),
        Position(32302, 31091, 14),
        Position(32302, 31092, 14)
    },
    newPositions = {
        Position(32271, 31100, 14),
        Position(32270, 31100, 14),
        Position(32269, 31100, 14),
        Position(32268, 31100, 14),
        Position(32267, 31100, 14)
    }
}

local timerStorage = 65300

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.itemid == 9826 then

        local storePlayers, playerTile = {}

        for i = 1, #config.playerPositions do
            playerTile = Tile(config.playerPositions):getTopCreature()
            if not playerTile or not playerTile:isPlayer() then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 5 players.")
                return true
            end

            if playerTile:getLevel() < config.requiredLevel then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "All the players need to be level ".. config.requiredLevel .." or higher.")
                return true
            end

            if playerTile:getStorageValue(timerStorage) > os.time() then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "QUALQUER DESCRIÇÂO")
                return true
            end
        end

            storePlayers[#storePlayers + 1] = playerTile
        end

        Game.createMonster("Melting Frozen Horror", config.BossPosition, true, true)

        local players
        for i = 1, #storePlayers do 
            players = storePlayers
            config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF)
            players:teleportTo(config.newPositions[i])
            config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA)
            players:setDirection(DIRECTION_EAST)
            players:setStorageValue(timerStorage, os.time() + (20 * 60 * 60)) -- 20 horas here.
        end
    elseif item.itemid == 9825 then
        if config.Daily then
            player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE))
            return true
        end
    end

    item:transform(item.itemid == 9826 and 9825 or 9826)
    return true
end

 

Editado por FlavioHulk
Editar o script (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo