Jump to content

Bug em missao


JD9
 Share

Recommended Posts

Boas tardes, tenho um bug na quest da baronesa que é, quando um grupo entra ao mesmo tempo que outro ou quando um grupo entra e altera, a quest fica bugada e diz que o ninho está ocupado mas não está lá ninguém, mesmo que de reboot com a quest desinstalada e depois de qc a quest diz-me sempre a mesma coisa, vou por a quest aqui.

Spoiler

 

quest baronesa begin
    state start begin

    when 30130.chat."Aranha Baronesa" begin
            if game.get_event_flag("sd3_frei") == 2 then
                say("O ninho está ocupado actualmente.")
                return
            end
        if pc.count_item(30324) < 1 then
                say("Não te posso teleportar sem teres")
                say(""..item_name(30324).."")
                say_item_vnum(30324)
                say("Tens de arranjar uma.")
            elseif pc.count_item("30324") < 1 and party.is_party() == false then
                say("Para entrares no ninho da baronesa")
                say("tens de estar em grupo.")
                say("Tens de ter contigo tambem uma")
                say(""..item_name(30324).."")
                say_item_vnum(30324)
            elseif pc.count_item("30324") >= 1 and party.is_party() == false then
                say("Para entrares no ninho da baronesa")
                say("tens de estar em grupo.")
            elseif pc.count_item("30324") >= 1 and party.is_party() then
                say("Queres entrar no ninho?")
                local s = select ("Sim","Nao")
                if s == 1 then
                    if party.is_leader() == true then
                        notice_all("O Grupo "..pc.get_name().." entrou no Ninho da Baronesa!")
                        game.set_event_flag("sd3_frei",1)
                        server_timer("exit",60*20)
                        server_timer("exit1",60*5)
                        server_timer("exit2",60*30)
                        mob.spawn(2096, 368, 585, 1, 1, 1)
                        mob.spawn(2076, 368, 585, 40, 15, 15)
                        mob.spawn(2075, 368, 585, 40, 15, 15)
                        say("Vou te teleportar, os jogadores do teu grupo tem      5 minutos para entrar no Ninho da Baronesa.         Tem 30m para derrotar a Aranha Baronesa.")
                        pc.remove_item("30324",1)
                        wait()
                        pc.warp(88200, 615200)
                        else
                        say("O líder do grupo tem de entrar primeiro.")
                        wait()
                    end
                    if not party.is_leader() then
                    if game.get_event_flag("sd3_frei") == 1 then
                        say("Vou te teleportar.")
                        wait()
                        pc.remove_item("30324",1)
                        pc.warp(88200, 615200)
                    end
                    end
                elseif s == 2 then
                return
                end
        end
    end

        when exit1.server_timer begin
            game.set_event_flag("sd3_frei",2)
        end

        when exit.server_timer begin
            purge_area(82700, 612700, 93700,625700)
            warp_all_in_area_to_area(82700, 612700, 93700,625700, 69100, 611200, 69100, 611200)
        end

        when kill with npc.get_race() == 2096 begin
         if pc.level >= 1 and pc.level <= 105 then
         local piranha = number(1,1)
         if piranha == 1 then
         game.drop_item_with_ownership("30327",1)
         end
         end
         end
           when 30327.use begin
        if pc.get_map_index() == 80 then
        if pc.count_item(30327) >= 1 then

            local coor_x = pc.get_local_x()
            local coor_y = pc.get_local_y()
            local cor_x = math.random(0,5)
            local cor_y = math.random(0,5)
            pc.remove_item("30327",1)
            mob.spawn(2092, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)
            mob.spawn(2076, coor_x + cor_x , coor_y + cor_y, 1)

        end
        end
        end

        when 2092.kill with pc.get_map_index() == 80 begin
            notice_all(" "..pc.get_name().." e o seu grupo mataram a Aranha Baronesa!")
                purge_area(82700, 612700, 93700,625700)
                server_timer("exit",60*2)
        end

        when exit2.server_timer begin
            game.set_event_flag("sd3_frei",0)
            notice_all("Já podes entrar no Ninho da Baronesa novamente.")
        end

end
end

 

 

Link to comment
Share on other sites

1 hora atrás, Elliot disse:

provavelmente n fechas-te o if

O erro foi a compilar a quest dele.

 

Edit: Consegui instalar mas tenho 2 bugs com a tua quest @juniorsilva, primeiro depois de matar o rei , não aparece ovos nem a baronesa, segundo depois de 2 pessoas de um reino sairem de lá, ninguém mais consegue entar e o tempo só aumenta e está negativo.

Edited by JD9
Link to comment
Share on other sites

Antes de mais:

pc.warp(88200, 615200)

Isto só irá teleportar o jogador que clicar no NPC e não o grupo em si.

O que tu queres fazer é:

new_jump_party(x,y) -- Substituindo pelas coordenadas

 

Acerca do problema, não faz sentido dizeres que os membros do teu grupo têm apenas 5 minutos para entrar visto que não meteste nenhum party.setf somente para eles, ou seja, qualquer pessoa que não seja parte do grupo poderá entrar antes desses 5 minutos.

Recomendo-te fazeres o seguinte:

-- Adiciona isto antes do when 30130.chat."Aranha Baronesa" begin
function get_time_remaining()
	return (game.get_event_flag("sd3_frei") + 1800 - get_global_time())
end

-- Adiciona isto antes do if game.get_event_flag("sd3_frei") == 2 then
if baronesa.get_time_remaining() > 0 then
	say_title("Metin2:")
	say()
	say("Já existe um grupo a fazer a cave.[ENTER]",
	"Espera um pouco.")
	return
end

 

Agora apaga  isto:

if game.get_event_flag("sd3_frei") == 2 then
                say("O ninho está ocupado actualmente.")
                return
            end


server_timer("exit1",60*5)

when exit1.server_timer begin
            game.set_event_flag("sd3_frei",2)
        end 

 

Link to comment
Share on other sites

16 horas atrás, JD9 disse:

O erro foi a compilar a quest dele.

 

Edit: Consegui instalar mas tenho 2 bugs com a tua quest @juniorsilva, primeiro depois de matar o rei , não aparece ovos nem a baronesa, segundo depois de 2 pessoas de um reino sairem de lá, ninguém mais consegue entar e o tempo só aumenta e está negativo.

Abrir spider_nest.quest e alterar o index = 193 por id do seu map.

when 30327.use with pc.getx() >= 827 and pc.get_map_index() == 193 and pc.getx() <= 937 and pc.gety() >= 6127 and  pc.gety() <= 6257 begin

 

Edited by juniorsilva
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...