antiblock
https://arwen2.global/
  • Chatbox

    You don't have permission to chat.
    Load More

Archived

This topic is now archived and is closed to further replies.

  • 0
igoriap

Quest Guerra da Tocha

Question

Olá a todos, compartilho minha guerra da tocha com vocês em quest para poder obter uma solução;

Quando o player do reino amarelo por exemplo mata uma tocha, conta pontos para azul, e assim no modo random para os reinos

Deveria quando o player amarelo derrotar uma tocha contabilizar pontos   para o reino amarelo, e não para os outros.

 

quest evento_tochas begin
	state start begin
	
        
		when 20016.chat."GM: GUERRA DA TOCHA" 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. Fala 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 20011.chat."Evento das Tochas" with game.get_event_flag("evento_tocha") == 1 begin
			say_title("Desejas participar?")
			if (select("Sim", "Nao") == 1) then
				if pc.get_empire() == 1 then
					pc.warp(972800,102400)
				elseif pc.get_empire() == 2 then
					pc.warp(972800,102400)
				else
					pc.warp(972800,102400)
				end
			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") == 30 then	-- Limite de tochas a destruir
					notice_all("O reino vencedor foi o reino RED. Parabéns e vai com deus.")
					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)
					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") == 30 then	-- Limite de tochas a destruir
					notice_all("O reino vencedor foi o reino Azul. Parabéns e vai com deus.")
					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)
					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") == 30 then	-- Limite de tochas a destruir
					notice_all("O reino vencedor foi o reino Amarelo. Parabéns e vai com deus.")
					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)
					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

 

Share this post


Link to post
Share on other sites

0 answers to this question

There have been no answers to this question yet