Jump to content

Configuração Guerra da Tocha


igoriap
 Share

Recommended Posts

Olá , eu tenho esta quest da guerra da tocha, tenho um seguinte problema:

 

Quando o player do reino Azul destroi uma tocha que está configurada para o reino amarelo, o ponto conta para o reino amarelo, gostaria que contasse para o reino de quem destruiu a tocha.

 

Ex: Sou do reino Vermelho e destrui uma tocha do reino azul, o ponto somaria para o reino vermelho pois eu há destrui.

 

Citar

quest evento_tochas begin
    state start begin
    
        when 20016.chat."Evento: Tochas" with pc.is_gm() begin
            if (select("Activar", "Desactivar") == 1) then
                say("O evento foi activado")
                game.set_event_flag("evento_tocha",1)
                notice_all("O evento da Tocha está ativado. Fale com o Uriel para participar.")
            else
                say("O evento foi desativado")
                game.set_event_flag("tocha_red",0)
                game.set_event_flag("tocha_amarela",0)
                game.set_event_flag("tocha_azul",0)
                game.set_event_flag("evento_tocha",0)
                notice_all("Evento das Tochas - O evento foi desativado pelo GM")
                timer("exit_map", 60)
            end
        end
        
        when 11507.kill begin                                 -- ID da tocha_Red
            if pc.get_map_index() != 181 then return end             -- 100 index do mapa
            if game.get_event_flag("evento_tocha") != 1 then return end
            if pc.get_empire() != 0 then
                if game.get_event_flag("tocha_red") == 20 then    -- Limite de tochas a destruir
                    notice_all("O reino vencedor foi o reino RED. Até a próxima Guerra!")
                    game.set_event_flag("tocha_red",1)
                    game.set_event_flag("tocha_amarela",1)
                    game.set_event_flag("tocha_azul",1)
                    game.set_event_flag("evento_tocha",0)
                    timer("exit_map", 60)
                else
                    game.set_event_flag("tocha_red", game.get_event_flag("tocha_red") +1)
                --    notice_all("Evento das Tochas - "..pc.get_name().." partiu a tocha do reino Red.")
                    notice_all("Evento das Tochas - Total de tochas destruidas Shinsoo: "..game.get_event_flag("tocha_red").." ,Chunjo: "..game.get_event_flag("tocha_amarela").." ,Jinno: "..game.get_event_flag("tocha_azul").."")
                end
            end
        end
        
        when 11508.kill begin                                 -- ID da tocha_azul
            if pc.get_map_index() != 181 then return end             -- 100 index do mapa
            if game.get_event_flag("evento_tocha") != 1 then return end
            if pc.get_empire() != 2 then
                if game.get_event_flag("tocha_azul") == 20 then    -- Limite de tochas a destruir
                    notice_all("O reino vencedor foi o reino Azul. Até a próxima Guerra!.")
                    game.set_event_flag("tocha_red",1)
                    game.set_event_flag("tocha_amarela",1)
                    game.set_event_flag("tocha_azul",1)
                    game.set_event_flag("evento_tocha",0)
                    timer("exit_map", 60)
                else
                    game.set_event_flag("tocha_azul", game.get_event_flag("tocha_azul") +1)
                --    notice_all("Evento das Tochas - "..pc.get_name().." partiu a tocha do reino Azul.")
                    notice_all("Evento das Tochas - Total de tochas destruidas Shinsoo: "..game.get_event_flag("tocha_red").." ,Chunjo: "..game.get_event_flag("tocha_amarela").." ,Jinno: "..game.get_event_flag("tocha_azul").."")
                end
            end
        end
        
        
        when 11509.kill begin                             -- ID da tocha_amarela
            if pc.get_map_index() != 181 then return end             -- 100 index do mapa
            if game.get_event_flag("evento_tocha") != 1 then return end
            if pc.get_empire() != 1 then
                if game.get_event_flag("tocha_amarela") == 20 then    -- Limite de tochas a destruir
                    notice_all("O reino vencedor foi o reino Amarelo. Até a próxima Guerra!.")
                    game.set_event_flag("tocha_red",1)
                    game.set_event_flag("tocha_amarela",1)
                    game.set_event_flag("tocha_azul",1)
                    game.set_event_flag("evento_tocha",0)
                    timer("exit_map", 60)
                else
                    game.set_event_flag("tocha_amarela", game.get_event_flag("tocha_amarela") +1)
                --    notice_all("Evento das Tochas - "..pc.get_name().." partiu a tocha do reino Amarelo.")
                    notice_all("Evento das Tochas - Total de tochas destruidas Shinsoo: "..game.get_event_flag("tocha_red").." ,Chunjo: "..game.get_event_flag("tocha_amarela").." ,Jinno: "..game.get_event_flag("tocha_azul").."")
                    
                end
            end
        end
        
        when exit_map.timer begin
            warp_all_to_village( pc.get_map_index() , 5 )
        end
        
        
        
    end
end

 

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...