Ir para conteúdo

Featured Replies

Postado
  • Autor
Em 30/06/2017 ás 12:38, Tingasgo disse:

Estava interessado em aprender script se poder me falar como aprendeu eu ficaria grato ^^ 

 

lua.org é um bom começo para você ter noção sobre Lua.

 

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

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

  • 2 weeks later...
  • Respostas 17
  • Visualizações 2.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • data/player/events.lua local config = { [2160] = {title = 'Filha de sei la quem'}, [2161] = {title = 'Filho da filha de nao sei quem'} } if thing:isCreature() and thing:isPlayer() then loca

  • Troca o 'You see' por 'Voce ve'

  • @Duduks Esse script que você passou não possui nenhuma interação com o spawn de Bosses. Existem duas funções warzoneConfig.spawnBoss e spawnBoss, e ela não está sendo chamada em nenhum desses casos. V

Posted Images

Postado

Bom dia Vankk tudo certo?

Vankk você por um acaso saberia como deixar os slots do items, quando o char estiver de bless com uma aura dourada (imagem com bless) e quando tiver sem bless ficar normal (imagem sem bless)???

 

Desde já agradeço

 

Muito obrigado

 

Jp Oxtenta

Bless.jpg

  • 6 months later...
Postado

Olá, @vankk, gostaria da sua ajuda em dois assuntos primeiro seria o boss final da Warzone 3, "Abyssador", aparentemente o script está certinho e outros dois bosses funcionam normal, porém quando entra mais de um player no tp, após amatar o mini boss "Versperoth", nascem dois, "Abyssador" ao invés de 1, segue o script: 

Spoiler

 


if not warzoneConfig then
    warzoneConfig = {
            [45700] = {
                center = Position(33110, 31965, 10),
                maxRangeX = 12, minRangeX = 26, minRangeY = 15, maxRangeY = 17,
                bossResp = Position(33102, 31956, 10),
                boss = "Deathstrike",
                teleportTo = Position(33096, 31955, 10),
                locked = false,
                storage = Storage.BigfootBurden.BossWarzone1,
                interval = 20 * 60 * 60,
                exit = Position(33001, 31900, 9)
            },

            [45701] = {
                center = Position(33117, 31956, 11),
                maxRangeX = 14, minRangeX = 14, minRangeY = 14, maxRangeY = 14,
                bossResp = Position(33116, 31956, 11),
                boss = "Gnomevil",
                teleportTo = Position(33106, 31955, 11),
                locked = false,
                storage = Storage.BigfootBurden.BossWarzone2,
                interval = 20 * 60 * 60,
                exit = Position(33001, 31900, 9),
                wall = 18459
            },

            [45702] = {
                center = Position(33090, 31910, 12),
                maxRangeX = 12, minRangeX = 12, minRangeY = 12, maxRangeY = 12,
                bossResp = Position(33088, 31910, 12),
                boss = "Abyssador",
                teleportTo = Position(33083, 31904, 12),
                locked = false,
                storage = Storage.BigfootBurden.BossWarzone3,
                interval = 20 * 60 * 60,
                exit = Position(33001, 31900, 9)
            }
    }

    warzoneConfig.spawnBoss = function (name, pos)
        local boss = Game.createMonster(name, pos)
        if boss then
            local c = warzoneConfig.findByName(name)
            c.locked = true
            boss:registerEvent('WarzoneBossDeath')
        end
    end

    warzoneConfig.findByName = function(name, last)
        local i, v = next(warzoneConfig, last)
        if type(v) == 'table' and v.boss == name then
            return v
        elseif not i then
            return nil
        end
        return warzoneConfig.findByName(name, i)
    end

    warzoneConfig.resetRoom = function(roomInfo, msg, releaseRoom)
        if releaseRoom then
            roomInfo.locked = false
        end

        local spectators = Game.getSpectators(roomInfo.center, false, false, roomInfo.minRangeX, roomInfo.maxRangeX, roomInfo.minRangeY, roomInfo.maxRangeY)
        for i = 1, #spectators do
            if spectators[i]:isPlayer() then
                spectators[i]:teleportTo(roomInfo.exit)
                spectators[i]:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, msg)
            else
                spectators[i]:remove()
            end
        end
    end
end

local function filter(list, f, i)
    if i < #list then
        if f(list[i]) then
            return list[i], filter(list, f, i + 1)
        else
            return filter(list, f, i + 1)
        end
    elseif list[i] and f(list[i]) then
        return list[i]
    end
end

local function spawnBoss(inf)
    local boss = Game.createMonster(inf.boss, inf.bossResp)
    boss:registerEvent('WarzoneBossDeath')
end

function onStepIn(creature, item, pos, fromPosition)
    if not creature:isPlayer() then
        creature:teleportTo(fromPosition)
        return false
    end

    local info = warzoneConfig[item:getActionId()]
    if not info then
        return false
    end

    if  creature:getStorageValue(info.storage) > os.time() then
        creature:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have already cleared this warzone in the last 20 hours.")
        creature:teleportTo(fromPosition)
        return false
    end

    if info.locked then
        creature:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Please, wait until the room is cleared. This happens 30 minutes after the last team entered.")
        creature:teleportTo(fromPosition)
        return true
    end

    creature:teleportTo(info.teleportTo)
    creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have half an hour to heroically defeat the " .. info.boss .. ". Otherwise you'll be teleported out by the gnomish emergency device." )
    return true
end

 

 

 

O segundo problema seria acredito que nas storages, pois 2 players do meu server não conseguem abrir os corpos de alguns bosses que possuem o sistema de pegar no bau reward.

Editado por Duduks (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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo