Ir para conteúdo

Featured Replies

Postado

.Qual servidor ou website você utiliza como base? OTX

 

Qual o motivo deste tópico? ajuda

 

Está surgindo algum erro? Se sim coloque-o aqui. 

Quote

Opa Galera Blz...

Estou com um problema com esse script,ele esta funcionando,esta teleportando,esta fazendo tudo que quero que faça,porem eu queria poder entrar na sala do boss apenas com 1 char ao envés de entrar com 5, Eu consigo fazer ele entrar com 1 porem é só com 1,queria que ele tivesse as opções de entrar com 1,2,3,5, chars,mas ou ele entra apenas 1 ou apenas 3-5....

já tentei apagar linhas do código para ver se dava certo,mas não consegui,então se alguém por favor puder me ajudar,eu fico muito agradecido. vllw!

 

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

local config = {
    requiredLevel = 1,
    timeToUseAgain = 1, -- time in days
    daily = false,
    centerOberonRoomPosition = Position(33257, 32051, 8),
    playerPositions = {
        Position(33261, 32083, 8),
    },
    newPositions = {
        Position(33264, 32064, 8),
    },
    oberonPositions = {
        Position(33266, 32059, 8)
    }
}


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

        for i = 1, #config.playerPositions do
            playerTile = Tile(config.playerPositions[i]):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:getExhaustion(171717) > 0 then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "".. playerTile:getName() .." need to wait for ".. player:getExhaustion(171717)/60 .." minutes.")
                return true
            end

               storePlayers[#storePlayers + 1] = playerTile
        end

        local specs, spec = Game.getSpectators(config.centerOberonRoomPosition, false, false, 25, 25, 25, 25)
        for i = 1, #specs do
            spec = specs[i]
            if spec:isPlayer() then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.")
                return true
            end

            spec:remove()
        end

        for i = 1, #config.oberonPositions do
            Game.createMonster("Grand Master Oberon", config.oberonPositions[i])
        end

        local players
        for i = 1, #storePlayers do
            players = storePlayers[i]
            config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF)
            players:teleportTo(config.newPositions[i])
            config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA)
            players:setDirection(DIRECTION_EAST)
            players:setExhaustion(171717, config.timeToUseAgain*60)
        end
    elseif item.itemid == 1945 then
        if config.daily then
            player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE))
            return true
        end
    end

    item:transform(item.itemid == 1946 and 1945 or 1946)
    return true
end

 

 

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

 

Editado por arthurgomess (veja o histórico de edições)

  • 2 months later...
Postado

Vou tentar copiar Script da Anihilator e modificar, se der certo eu posto aqui.

 

Tente remover not playerTile or not playerTile:isPlayer() e edita para not isPlayer() then

not playerTile or not playerTile:isPlayer()

Editado por Preguica
not playerTile:isPlayer() (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 520.2k

Informação Importante

Confirmação de Termo