Quest PvP

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
zdabest10
Nou Venit

Nou Venit
Mesaje: 37
Membru din: 27 Aug 2014, 13:35
Aprecieri: 0
Mulţumiri: 2  
Medalii

Buna seara , ma puteti ajuta cu un quest pentru o mapa PVP , gen sa fie start PVP ,( sa se deschida protiile ) , Inchide PVP ( sa se inchida portiile ) SI inchidere fortata sa duca toti playerii in map 1
Si coordonatele o sa le modific eu
Multumesc,
Avatar utilizator
ZuLu
Nivel 2

Nivel 2
Mesaje: 221
Membru din: 18 Ian 2014, 14:12
Regat: Jinno
Aprecieri: 2  
Mulţumiri: 1  
Medalii

Incearca acest quest

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
Imagine
Imagine
Afișează semnătura
Avatar utilizator
zdabest10
Nou Venit

Nou Venit
Mesaje: 37
Membru din: 27 Aug 2014, 13:35
Aprecieri: 0
Mulţumiri: 2  
Medalii

Salut , nu merge ,
"
Calls undeclared function! :
forked.getpassstartposx
forked.getpassstartposy
forked.getsungziposx
forked.getsungziposy
forked.initmobkillcount
Abort trap: 6 (core dumped) "
acest quest il am si eu ... Dar vroiam unu de la uriel : care sa dau : "start event", "inchide portiile", "Inchide foratat" si mapa in care te teleporteaza sa o modific eu....
Avatar utilizator
AlexTzutzu
Nivel 10

Nivel 10
Mesaje: 2345
Membru din: 12 Feb 2014, 13:59
Server: Am RENUNTAT
Regat: Jinno
Aprecieri: 18  
Mulţumiri: 91  
 Contact:
Medalii

Acele functii "Calls undeclared function! :
forked.getpassstartposx
forked.getpassstartposy
forked.getsungziposx
forked.getsungziposy
forked.initmobkillcount" daca nu ma insel trebuie sa le scrii tu un quest_function parca(nu stiu exact numele la acel fisier).
Imagine


The quieter you become,the more you are able to hear.
Afișează semnătura
Avatar utilizator
ZuLu
Nivel 2

Nivel 2
Mesaje: 221
Membru din: 18 Ian 2014, 14:12
Regat: Jinno
Aprecieri: 2  
Mulţumiri: 1  
Medalii

Incearca acuma

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
Imagine
Imagine
Afișează semnătura
Avatar utilizator
Tears^
Fost Moderator

Fost Moderator
Mesaje: 774
Membru din: 07 Apr 2014, 17:01
Aprecieri: 129  
Mulţumiri: 35  
Discord: Copiază ID
Medalii

Poti modifica questul de la ox ( sper ca nu ma insel)
Discord: Teck#7457
Afișează semnătura
Avatar utilizator
zdabest10
Nou Venit

Nou Venit
Mesaje: 37
Membru din: 27 Aug 2014, 13:35
Aprecieri: 0
Mulţumiri: 2  
Medalii

Cod: Selectaţi tot

quest TSeventScoici begin
	state start begin
		when login with pc.get_map_index() == 46 begin
			if game.get_event_flag("TSeventScoici") == 0 and pc.is_gm() == false then
				warp_to_village()
			end
		end
			when 20011.chat."Event PvP" with game.get_event_flag("TSeventScoici") > 0 begin
					say_title("Event PvP:")
					say("")
					say("Vrei sa participi?.")
					say("Lasa-ma sa vad daca esti pregatit.")
					say("")
					wait()
					if game.get_event_flag("TSeventScoici_open"..pc.get_empire()) == 0 then
				say_title("Event PvP:")
				say("")
				
						say("Scuze,regatul tau nu poate participa.")
						say("")
						return
					end
					if game.get_event_flag("TSeventScoici_minlv") > pc.level then
						say_title("Event v:")
						say("")
                		say("Scuze, ai nevoie de nivelul "..game.get_event_flag("TSeventScoici_minlv").." pentru a participa.")
                		say("")
                		return
                	end
                	if game.get_event_flag("TSeventScoici_maxlv") < pc.level then
						say_title("Event PvP:")
						say("")
                		say("Nivelul tau este prea mare.Nivelul maxim este "..game.get_event_flag("TSeventScoici_maxlv").." .")
                		say("")
                		return
                	end
                	say_title("Event PvP:")
                	say("")
                	say("Poti intra.")
                	say("")
                	say("")
                	wait()
                	pc.warp(946300, 25400)
                end
                when 20011.chat."GM: Event PvP" with pc.is_gm() begin
                	say_title("Event PvP")
                	say("")
	               	if game.get_event_flag("TSeventScoici") > 0 then
                		msg = "Eventul este pornit."
                		statuschange = "Inchis"
                		new = 0
                	else
                		msg = "Eventul este oprit."
                		statuschange = "Deschis"
                		new = 1
                	end
                	say(msg.." Setari curente:")
                	say("Minimum level: "..game.get_event_flag("TSeventScoici_minlv").." Maximum level: "..game.get_event_flag("TSeventScoici_maxlv").." ")
                	say("")
                	say("")
                	local s=select("Seteaza Level ", "Seteaza regate", statuschange.." Event PvP", "Exit", "Inchidere portiile")
                	if s == 1 then
                		say("Scrie nivelul minim:")
                		say("")
                		local min = input()
            			say("Scrie nivelul maxim")
            			say("")
            			local max = input()
            			if min > max then
            				say("Nivelul maxim trebuie sa fie mai mare decat cel minim!")
            				say("")
            				return
            			end
				game.set_event_flag("TSeventScoici_minlv",min)
				game.set_event_flag("TSeventScoici_maxlv",max)
				say("Nivelul a fost setat.")
			elseif s == 2 then
				if game.get_event_flag("TSeventScoici_open1") > 0 then
					statuschange1 = "Inchis"
					new1 = 0
				else
					statuschange1 = "Deschis"
					new1 = 1
				end
				
				if game.get_event_flag("TSeventScoici_open2") > 0 then
					statuschange2 = "Inchis"
					new2 = 0
				else
					statuschange2 = "Deschis"
					new2 = 1
				end
				
				if game.get_event_flag("TSeventScoici_open3") > 0 then
					statuschange3 = "Inchis"
					new3 = 0
				else
					statuschange3 = "Deschis"
					new3 = 1
				end
				s=select(statuschange1.." Regat 1", statuschange2.." Regat 2", statuschange3.." Regat 3", "Cancel")
				if s == 1 then
					game.set_event_flag("TSeventScoici_open1",new1)
					say("Regat 1 "..statuschange1.."")
					say("")
				elseif s ==2 then
					game.set_event_flag("TSeventScoici_open2",new2)
					say("Regat 2 "..statuschange2.."")
					say("")
				elseif s== 3 then
					game.set_event_flag("TSeventScoici_open3",new3)
					say("ERegat 3 "..statuschange3.."")
					say("")
				end
                	elseif s == 3 then
                		if new == 0 then
                			notice_all("Event inchis.")
                			warp_all_to_village(103, 10)
                		else
                		        notice_all("Event deschis! Eventul PvP")
                		end
                		game.set_event_flag("TSeventScoici",new)
                		say("Eventul este acum "..statuschange..".")
                		say("")
                	end
                end
     end
end
Daca dau cand eventul este pornit "statuschange.." Event PvP" , si vreau sa inchid nu teleporteaza playerii map 1....
Si cu inchidere porti sa inchida portiile....
Multumesc
Avatar utilizator
ZuLu
Nivel 2

Nivel 2
Mesaje: 221
Membru din: 18 Ian 2014, 14:12
Regat: Jinno
Aprecieri: 2  
Mulţumiri: 1  
Medalii

Tears^ posteaza questu si vedem dar explicam ce vrei sa modific la el

zdabest10 uh vrei ca sa iti aranjez acest quest ca nu prea am inteles .... ai pornit batalia sa terminat si vrei ca" playeri sa fie teleportati map1 " asa-i daca nu explicam bine
Imagine
Imagine
Afișează semnătura
Avatar utilizator
zdabest10
Nou Venit

Nou Venit
Mesaje: 37
Membru din: 27 Aug 2014, 13:35
Aprecieri: 0
Mulţumiri: 2  
Medalii

-Deci sa dau "Start PVP" si teleporteaza toti playerii in mapa respectiva... Si eu sa aleg cine cu cine fac duel.. nu sa se aleaga automat ...
-Dau "Inchide portiile" sa nu se mai poata teleporta playerii in acea mapa
-Si "Stop PVP" Sa inchida eventul pvp si sa teleporteze toti playerii map 1
Avatar utilizator
ZuLu
Nivel 2

Nivel 2
Mesaje: 221
Membru din: 18 Ian 2014, 14:12
Regat: Jinno
Aprecieri: 2  
Mulţumiri: 1  
Medalii

zdabest10 scrie:-Deci sa dau "Start PVP" si teleporteaza toti playerii in mapa respectiva... Si eu sa aleg cine cu cine fac duel.. nu sa se aleaga automat ...
-Dau "Inchide portiile" sa nu se mai poata teleporta playerii in acea mapa
-Si "Stop PVP" Sa inchida eventul pvp si sa teleporteze toti playerii map 1
su

Ce vrei uh nu e lupta regatelor e event pvp pentru acest lucru iti trebuie cu totul un alt quest pentru a face un quest ca asta nu prea am timp daca o sa am timp o sa incerc sa iti fac dar acuma nu am timp .
Imagine
Imagine
Afișează semnătura
Închis

Înapoi la “Probleme rezolvate”

  • Informaţie