Jump to content

Recommended Posts

my quest  have some problem 

dungeon start but dont spawn the mobs ....
 

Spoiler

quest ship begin
    state start begin
        when 20438.chat."Iniciar Dungeon" with pc.level >= 90 begin
            say_title("Defesa do Navio")
            say("Você deseja iniciar a dungeon?")
            local r = select("Sim", "Não")
            if r == 1 then
                notice_all("A dungeon começará em breve!")
                timer("start_dungeon", 10)
            end
        end

        when start_dungeon.timer begin
            notice_all("A dungeon começou!")
            timer("first_wave", 3)
        end

        when first_wave.timer begin
            notice_all("Primeira Wave: Mate todos os monstros!")

            -- Coordenadas de spawn para cada grupo de monstros
            local spawn_coordinates = {
                {x = 394, y = 402},
                {x = 382, y = 404},
                {x = 380, y = 394},
                {x = 394, y = 396}
            }

            -- Spawn de cada grupo de monstros nas coordenadas especificadas
            for i, coords in ipairs(spawn_coordinates) do
                local x = coords.x
                local y = coords.y
                d.spawn_mob(4301 + i, x, y, 358)  -- Adicionando o índice do mapa (358)
                d.spawn_mob(4302 + i, x, y, 358)
                d.spawn_mob(4303 + i, x, y, 358)
                d.spawn_mob(4304 + i, x, y, 358)
            end

            timer("check_first_wave", 10)
        end

        when check_first_wave.timer begin
            if d.count_monster(4301) == 0 and d.count_monster(4302) == 0 and d.count_monster(4303) == 0 and d.count_monster(4304) == 0 then
                notice_all("Todos os monstros foram derrotados! A dungeon está completa.")
                timer("teleport_out", 5)
            else
                timer("check_first_wave", 10)
            end
        end

        when teleport_out.timer begin
            d.exit_all()
        end
    end
end

 

Link to comment
https://metin2.dev/topic/32677-problem-with-quest/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.