[QUEST] Batalia regatelor

PoKe
Site Admin
Mesaje: 29
Membru din: Sâm Mai 30, 2020 6:33 pm

Vin Iun 26, 2020 8:17 pm

Cod: Selectaţi tot

quest forked_road begin
    state start begin
	when login begin
		-- 114 sungzi
		-- 115 116 117 118 119 120 Road
	    if forked.isforkedmapindex( pc.get_map_index() ) == 1  then
			if game.get_event_flag("threeway_war") == 0 then
				warp_to_village();
			else
				--if forked.getdeadcount() <= 0 then
				--	warp_to_village();
				--end
				if forked.issungzimapindex( pc.get_map_index() ) == 0 then
					say( "Batalia Regatelor" )
					say( "Trebuie sa omori Regele Tigru Galben" )
					say( "El detine sigiliul acestei harti!" )
					say( "Fara el nu poti sa treci mai departe:" )
					say_item( "Acesta este sigiliul!",50089,"");
				else
					say( "Bun venit la Batalia Regatelor!" )
					say( "Aici te porti intalni cu alte regate" )
					say( "Pentru a va da cate o palma peste fundu" )
					say( "unu altuia sa vedeti care doare mai tare!!" )
				end
				
			end
		end
	end
	when 11001.chat."Batalia Regatelor" or 11003.chat."Batalia Regatelor" or 11005.chat."Batalia Regatelor" begin
	    if game.get_event_flag("threeway_war") == 0 then
			say("Protile regatelor de lupta")
			say("Sunt inchise pentru moment!")
	    else
			say("Buna!")
			say("Portile de lupta sunt deschise!")
			say("Vrei sa intrii?")
			local s = select("Da","Nu!")
			if s == 1 then
			if pc.get_level() < 50 then
				say("Nivelul tau este prea mic.Vino cand o sa ai peste LVL 50!");
				return 
			end
				
			forked.setdeadcount();
			if pc.getempire() == 1 then
				if game.get_event_flag("threeway_war_open_gate1" ) == 0 then
					say("Aceasta este o Tara Sfanta.[ENTER] Unde cei mai buni pot intra aici!" );
					return
				end
			elseif pc.getempire() == 2 then
				if game.get_event_flag("threeway_war_open_gate2" ) == 0 then
					say("Aceasta este o Tara Sfanta.[ENTER] Unde cei mai buni pot intra aici!" );
					return
				end
			elseif pc.getempire() == 3 then
				if game.get_event_flag("threeway_war_open_gate3" ) == 0 then
					say("Aceasta este o Tara Sfanta.[ENTER] Unde cei mai buni pot intra aici!" );
					return
				end
			else
				say(locale.forked_man_say_you_cant2 )
			end
			pc.warp( forked.getpassstartposx() , forked.getpassstartposy() )
			end
		end
	end
	when 1306.kill begin		
		game.drop_item(50089, 1 )
		say("TIgrul Galebn a dat sigilil![ENTER]Acum puteti intra in lupta!") ;
	end	


	when 20081.take with item.vnum == 50089 begin
		say_in_map( pc.get_map_index() , locale.forked_open_gate , 1); 
		npc.purge()
		item.remove()
		
		--??? ???
		forked.setdeadcount()
		forked.initkillcount()
		forked.initmobkillcount()
		
		if pc.getempire() == 1 then
			game.set_event_flag("threeway_war_open_gate1", 0 )
			notice_all("Intra in Tara Sfanta" ) 
		elseif pc.getempire() == 2 then
			game.set_event_flag("threeway_war_open_gate2", 0 )
		    notice_all("Intra in Tara Sfanta" )
		elseif pc.getempire() == 3 then
			game.set_event_flag("threeway_war_open_gate3", 0 )
			notice_all("Intra in Tara Sfanta" )
		else
			say(locale.forked_man_say_you_cant2 )
		end
		local iEmpire = pc.getempire()
		
		warp_all_in_map( pc.get_map_index() , forked.getsungzimapindex() ,forked.getsungziposx() , forked.getsungziposy() , 10 );
	end

	when 11001.chat."Manager Lupte Regat" or 11003.chat."Manager Lupte Regat" or 11005.chat."Manager Lupte Regat" with pc.is_gm() begin
		
		local s = select("Lupta Regatelor Start" , "Lupta Regatelor Sfarsit" );
		if s == 1 then

			-- ??? ?? ?? ?? ???
			kill_all_in_map( forked.getsungzimapindex() );
			kill_all_in_map( forked.getpassmapindexbyempire(1) );
			kill_all_in_map( forked.getpassmapindexbyempire(2) );
			kill_all_in_map( forked.getpassmapindexbyempire(3) );

			-- ??? 
			forked.initforked()
			-- ??? ??? ?? 
			regen_in_map( forked.getpassmapindexbyempire(1), forked.getpasspathbyempire(1) .."regen.txt" );
			regen_in_map( forked.getpassmapindexbyempire(1), forked.getpasspathbyempire(1) .."npc.txt" );
			regen_in_map( forked.getpassmapindexbyempire(2), forked.getpasspathbyempire(2) .."regen.txt" );
			regen_in_map( forked.getpassmapindexbyempire(2), forked.getpasspathbyempire(2) .."npc.txt" );
			regen_in_map( forked.getpassmapindexbyempire(3), forked.getpasspathbyempire(3) .."regen.txt" );
			regen_in_map( forked.getpassmapindexbyempire(3), forked.getpasspathbyempire(3) .."npc.txt" );

			-- ?? ??? ??
			game.set_event_flag("threeway_war",1)


			-- ??? ?? ? ?? ??
			game.set_event_flag("threeway_war_dead_count", 5)
			game.set_event_flag("threeway_war_mob_count", 150 )
			game.set_event_flag("threeway_war_kill_count", 200 )
			game.set_event_flag("threeway_war_kill_boss_count", 1 );
			-- ??? ?? ??/?? ??
			game.set_event_flag("threeway_war_open_gate1", 1 )
			game.set_event_flag("threeway_war_open_gate2", 1 )
			game.set_event_flag("threeway_war_open_gate3", 1 )
			
			notice_all("Batalia Regatelor Incepe!")
			notice_all("" )
		else	
			game.set_event_flag("threeway_war",0)
			kill_all_in_map( forked.getsungzimapindex() );
			kill_all_in_map( forked.getpassmapindexbyempire(1) );
			kill_all_in_map( forked.getpassmapindexbyempire(2));
			kill_all_in_map( forked.getpassmapindexbyempire(3));
			notice_all("Batalia Regatelor incheiata!")
			notice_all("Pro-Area.com")
			warp_all_to_village( forked.getsungzimapindex() , 1 )
			warp_all_to_village( forked.getpassmapindexbyempire(1) , 1 )
			warp_all_to_village( forked.getpassmapindexbyempire(2) , 1 )
			warp_all_to_village( forked.getpassmapindexbyempire(3) , 1 )
		end
	end
	
	
	when 11001.chat."Sungzi Deschis" or 11003.chat."Sungzi Deschis" or 11005.chat."Sungzi Deschis" with pc.is_gm() begin
		game.set_event_flag("threeway_war",1)
		game.set_event_flag("threeway_war_dead_count", 5)
		game.set_event_flag("threeway_war_mob_count", 150 )
		game.set_event_flag("threeway_war_kill_count", 200 )
		game.set_event_flag("threeway_war_kill_boss_count", 1 );
		game.set_event_flag("threeway_war_open_gate1", 1 )
		game.set_event_flag("threeway_war_open_gate2", 1 )
		game.set_event_flag("threeway_war_open_gate3", 1 )
		command("warp 9463 254")
	end
	end
end

Tutorial instalare quest:
1. Salvati continutul quest-ului intr-un fisier text cu extensia .quest (exp: nume.quest)
2. Va conectati la filezilla / winscp si intrati in /usr/game/share/locale/romania/quest (depinde ce tip de server aveti, poate fi diferita calea).
3. Il urcati acolo (atentie sa fie .quest) si da-ti permisiuni 777.
4. Apoi te loghezi in FreeBSD / putty si scrii in felul următor: cd /usr/game/share/locale/romania/quest apoi ./qc nume.quest
5. Intrati pe server si scrieti /reload q .
6. Acum intrati pe server si testati questul.
Scrie răspuns