Ir para conteúdo

Featured Replies

Postado
Spoiler

local config = {
    requiredLevel = 100,
    daily = false,
    playerPositions = {
        Position(33391, 31178, 10),
        Position(33391, 31179, 10),
        Position(33391, 31180, 10),
        Position(33391, 31181, 10),
        Position(33391, 31182, 10)
    },
    newPositions = {
        Position(33356, 31185, 10),
        Position(33357, 31185, 10),
        Position(33358, 31185, 10),
        Position(33359, 31185, 10),
        Position(33360, 31185, 10)
    },
    BossPositions = {
        Position(33358, 31181, 10)
    }
}


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):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.BossPositions do
            Game.createMonster("Soul of Dragonking Zyrtarch", config.BossPositions)
        end

        local players
        for i = 1, #storePlayers do
            players = storePlayers
            config.playerPositions:sendMagicEffect(CONST_ME_POFF)
            players:teleportTo(config.newPositions)
            config.newPositions:sendMagicEffect(CONST_ME_ENERGYAREA)
            players:setDirection(DIRECTION_EAST)
        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

Olá, gostaria de saber como faço para poder puxar a Alavanca e ela ir com o tanto de players que estiverem nos sqm? por exemplo uma pessoa puxar e ir sozinha ou em dois etc.

O script está ai em cima como spoiler, tentei deletar a parte da mensagem dos 5 players, porem ai a alavanca não faz nada.

 





 

Editado por caiocst (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