Jump to content

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Former Staff

Try this one, I didn't test.

I just did a thing called "search".

quest nation_war begin
	state start begin
		--NPC--
		when 10033.chat."National War" or 10034.chat."National War" or 10035.chat."National War" begin
			local akroma_war = {{199, 300},{200, 300},{300, 300}}
			if game.get_event_flag("nation_war")== 0 then
				say("National War este inchis,in acest moment")
				say("Vei fi anuntat,cand va fi pornit")
			elseif game.get_event_flag("nation_war")== 1 then
				say("National War este deschis, vrei sa participi?")
				local nation_war = select("Da","Nu")
				if nation_war == 1 then
					if pc.level() < 65 then
						say("Ai nivel "..pc.level()..", trebuie sa ai minim 65.")
					else
						if pc.get_empire()== 1 then
							pc.warp(akroma_war[1])
						elseif pc.get_empire()== 2 then
							pc.warp(akroma_war[2])
						elseif pc.get_empire()== 3 then
							pc.warp(akroma_war[3])
						end
					end
				elseif nation_war == 2 then return end
			end
		end
		--GM--
		when 70040.use with pc.is_gm() begin
			if game.get_event_flag("nation_war")== 0 then
				say()
				local open_nation = select("Da","Nu")
				if open_nation == 1 then
					game.set_event_flag("nation_war",1)
					game.set_event_flag("jinno",0)
					game.set_event_flag("shinso",0)
					game.set_event_flag("chunjo",0)
					timer("nation_war1",600)
				else return end
			elseif game.get_event_flag("nation_war")== 1 then
				say()
				local close_nation = select("Da","Nu")
				if close_nation == 1 then
					game.set_event_flag("nation_war",0)
					game.set_event_flag("jinno",0)
					game.set_event_flag("shinso",0)
					game.set_event_flag("chunjo",0)
				else return end
			end
		end
		--Timers--
		when nation_war1.timer begin
			notice_all("Scor: Jinno:"..game.get_event_flag("jinno").." Shinso:"..game.get_event_flag("shinso").." Chunjo:"..game.get_event_flag("chunjo").." ")
			timer("nation_war2", 600)
		end
		when nation_war2.timer begin
			notice_all("Scor: Jinno:"..game.get_event_flag("jinno").." Shinso:"..game.get_event_flag("shinso").." Chunjo:"..game.get_event_flag("chunjo").." ")
			timer("nation_war3", 600)
		end
		when nation_war3.timer begin
			notice_all("Scor: Jinno:"..game.get_event_flag("jinno").." Shinso:"..game.get_event_flag("shinso").." Chunjo:"..game.get_event_flag("chunjo").." ")
			timer("nation_war4", 600)
		end
		when nation_war4.timer begin
			notice_all("Scor: Jinno:"..game.get_event_flag("jinno").." Shinso:"..game.get_event_flag("shinso").." Chunjo:"..game.get_event_flag("chunjo").." ")
			timer("nation_war5", 600)
		end
		when nation_war5.timer begin
			notice_all("Scor: Jinno:"..game.get_event_flag("jinno").." Shinso:"..game.get_event_flag("shinso").." Chunjo:"..game.get_event_flag("chunjo").." ")
			timer("nation_war6", 600)
		end
		when nation_war6.timer begin
			local imperios = {{game.get_event_flag("jinno")},{game.get_event_flag("shinso")},{game.get_event_flag("chunjo")}}
			if imperios[1] > imperios[2] and imperios[3] then
				notice_all("Jinno a castigat National War")
				warp_to_village()
			elseif imperios[2] > imperios[1] and imperios[3] then
				notice_all("Shinso a castigat National War")
				warp_to_village()
			elseif imperios[3] > imperios[1] and imperios[2] then
				notice_all("Chunjo a castigat National War")
				warp_to_village()
			end
		end
		--Scor kills--
		when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() begin
			if game.get_event_flag("nation_war") == 1 and pc.get_map_index()== 112 then
				if pc.get_empire() == 1 then
					game.set_event_flag("jinno", game.get_event_flag("jinno")+1)
					elseif pc.get_empire()== 2 then
					game.set_event_flag("shinso", game.get_event_flag("shinso")+1)
				elseif pc.get_empire()== 3 then
					game.set_event_flag("chunjo", game.get_event_flag("chunjo")+1)
				end
			elseif game.get_event_flag("nation_war") == 2 then
				syschat("Razboiul nu e activat.")
				warp_to_village()
			end
		end
	end
end

You may need to change some things.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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