Problma quest craciun

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
Dănuţ M.
Mister Just4Metin

Mister Just4Metin
Mesaje: 263
Membru din: 25 Iul 2013, 18:27
Aprecieri: 8  
Mulţumiri: 788  
Medalii

Acesta este quest si vreau sa stiu cum il pot activa?..

Cod: Selectaţi tot

quest event_christmas begin
	state start begin
        when kill with game.get_event_flag("event_christmas") == 1 and pc.getqf("event_christmas_drop") == 1 begin
		    if npc.is_pc() then
				-- FIX DROP BUG WHEN KILL PLAYER
			else
				s = math.random(1,200)
				if s == 1 then
					game.drop_item_with_ownership(50010, 1)
				end
			end
		end
		when 20126.chat."Craciun Fericit!" with game.get_event_flag("event_christmas") == 1 begin
			if 43200 > get_global_time() - pc.getqf("event_christmas_time") then
				say_title("Mos Craciun:")
				say("Ho Ho Ho")
				say("Cred ca vrei sa stii de ce sunt aici")
				say("Stai linistit micutule,am sa-ti explic:")
				say("")
				say("Te duci intr-o mapa cu moobi")
				say("apropiati de nivelul tau.")
				say("Omori cat de multi poti,")
				say("strangi sosete si le atarni in Pom.")
				say("Eu drept rasplata te voi recompensa")
				say("cu premii pe masura")
				say("cadouri,..iteme in general.")
				say("")
				say("Sper ca am fost destul de clar.")
				say_title("Echipa Metin2Constanta iti ureaza Craciun Fericit!")
			else
				say_title("Mos Craciun:")
				say("Ho Ho Ho")
				say("Cred ca vrei sa stii de ce sunt aici")
				say("Stai linistit micutule,am sa-ti explic:")
				say("")
				say("Te duci intr-o mapa cu moobi")
				say("apropiati de nivelul tau.")
				say("Omori cat de multi poti,")
				say("strangi sosete si le atarni in Pom.")
				say("Eu drept rasplata te voi recompensa")
				say("cu premii pe masura")
				say("cadouri,..iteme in general.")
				say("")
				say("Sper ca am fost destul de clar.")
				say_title("Echipa Metin2Constanta iti ureaza Craciun Fericit!")
				local s = select("Vreau sa iau parte!", "Poate alta data...")
				if s == 1 then
					say_title("Mos Craciun:")
					say("Ma bucur ca ai fost de acord!")
					say_reward(string.format("Ai primit %s.", item.get_name(53031)))
					say_reward(string.format("Ai primit %d unitati de %s.", 5, item.get_name(50216)))
					pc.give_item2(53031)
					pc.give_item2(50216,5)
					pc.setqf("event_christmas_time", get_global_time()) 
				end
			end
		end
		when 20384.take with item.get_vnum() == 50010 begin 
			pc.remove_item(50010)
			s = math.random(1,5)
			if s == 1 then
				say_title("Mos Craciun:")
				say("Din pacate, soseta este prea uzata.[ENTER]Adica, pute ca dracu.")
			else
				say_title("Mos Craciun:")
				say("Multumesc pentru soseta.[ENTER]Uite cum o pun in brad!")
				local count = pc.getqf("event_christmas_socks_succes") + 1
				pc.setqf("event_christmas_socks_succes", count)
			end
		end
		when 20384.chat."Craciun Fericit!" with game.get_event_flag("event_christmas") == 1 begin
			say_title("Mos Craciun:")
			if pc.getqf("event_christmas_socks_succes") > 0 then
				say(""..pc.get_name()..", hmm...[ENTER]Vrei sa-ti alegi un cadou?")
				local s1 = select ("Da" , "O sa mai adun sosete")   
				if s1 == 1 then
					say_title("Mos Craciun:")
					say("Alege rasplata:")
					local awards_code = {
					--code,count,price
					{71135,1,30},
					{71136,1,50},
					{71143,1,40},
					{71144,1,200},
					{71145,1,200},
					{71131,1,150},
					{71132,1,150},
					{71133,1,1600},
					{71134,1,160},
					{30179,1,50},
					{71123,1,150},
					{71129,1,200},
					{50134,1,150}

					}
					local awards_list = select("Inel Semiluna","Acadea","Inelul Bucuriei","Cadou Craciun","Amuleta Dragostei Eterne","Sigiliu Predator Polar","Sigiliu Panda Blindat","Sigiliu Unicorn Rosu","Sigiliu Unicorn Albastru","Cheie Rasucita","Balanta Dragonului","Gheara Dragonului","Cufar Special Costume","Inchide")
					if awards_list != 13 then
						if pc.getqf("event_christmas_socks_succes") < awards_code[awards_list][3] then
							say_title("Mos Craciun:")
							say("Nu ai adus destule sosete pentru a[ENTER]putea primi acest cadou.[ENTER]Mai ai nevoie de "..awards_code[awards_list][3]-pc.getqf("event_christmas_socks_succes").." Sosete.")
							say("")
							return
						end
						pc.give_item2(awards_code[awards_list][1],awards_code[awards_list][2])
						local count = pc.getqf("event_christmas_socks_succes") - awards_code[awards_list][3]
						pc.setqf("event_christmas_socks_succes", count)
					end
				end
			else
				say(""..pc.get_name()..", pentru a capata puncte[ENTER]pune o soseta pe brad. Dupa ce ai[ENTER]atarnat destule sosete in brad[ENTER]poti sa-ti alegi un cadou de[ENTER]Craciun.")
			end	
		end
		when 53031.use begin
			if 21600 > get_global_time() - pc.getqf("event_christmas_time") then
				pc.setqf("event_christmas_drop", 1)
			else
				chat("[Event]Nu vei mai primi drop la sosete.")
				pc.setqf("event_christmas_drop", 0)
			end
		end
	end
end
Avatar utilizator
Etherious
Mister Just4Metin

Mister Just4Metin
Mesaje: 733
Membru din: 20 Mar 2016, 22:41
Regat: Jinno
Aprecieri: 28  
Mulţumiri: 40  
 Contact:
Medalii

Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest
5. Intrii pe server şi scrii /reload q .

Si trebuie sa mearga.
Imagine
Imagine Imagine
Imagine
Imagine
Afișează semnătura
Avatar utilizator
[Misha]
Nivel 1

Nivel 1
Mesaje: 115
Membru din: 16 Dec 2016, 18:16
Server: Astept
Regat: Shinsoo
Aprecieri: 4  
Mulţumiri: 1  
Medalii

Dănuţ M. scrie:Acesta este quest si vreau sa stiu cum il pot activa?..

Cod: Selectaţi tot

quest event_christmas begin
	state start begin
        when kill with game.get_event_flag("event_christmas") == 1 and pc.getqf("event_christmas_drop") == 1 begin
		    if npc.is_pc() then
				-- FIX DROP BUG WHEN KILL PLAYER
			else
				s = math.random(1,200)
				if s == 1 then
					game.drop_item_with_ownership(50010, 1)
				end
			end
		end
		when 20126.chat."Craciun Fericit!" with game.get_event_flag("event_christmas") == 1 begin
			if 43200 > get_global_time() - pc.getqf("event_christmas_time") then
				say_title("Mos Craciun:")
				say("Ho Ho Ho")
				say("Cred ca vrei sa stii de ce sunt aici")
				say("Stai linistit micutule,am sa-ti explic:")
				say("")
				say("Te duci intr-o mapa cu moobi")
				say("apropiati de nivelul tau.")
				say("Omori cat de multi poti,")
				say("strangi sosete si le atarni in Pom.")
				say("Eu drept rasplata te voi recompensa")
				say("cu premii pe masura")
				say("cadouri,..iteme in general.")
				say("")
				say("Sper ca am fost destul de clar.")
				say_title("Echipa Metin2Constanta iti ureaza Craciun Fericit!")
			else
				say_title("Mos Craciun:")
				say("Ho Ho Ho")
				say("Cred ca vrei sa stii de ce sunt aici")
				say("Stai linistit micutule,am sa-ti explic:")
				say("")
				say("Te duci intr-o mapa cu moobi")
				say("apropiati de nivelul tau.")
				say("Omori cat de multi poti,")
				say("strangi sosete si le atarni in Pom.")
				say("Eu drept rasplata te voi recompensa")
				say("cu premii pe masura")
				say("cadouri,..iteme in general.")
				say("")
				say("Sper ca am fost destul de clar.")
				say_title("Echipa Metin2Constanta iti ureaza Craciun Fericit!")
				local s = select("Vreau sa iau parte!", "Poate alta data...")
				if s == 1 then
					say_title("Mos Craciun:")
					say("Ma bucur ca ai fost de acord!")
					say_reward(string.format("Ai primit %s.", item.get_name(53031)))
					say_reward(string.format("Ai primit %d unitati de %s.", 5, item.get_name(50216)))
					pc.give_item2(53031)
					pc.give_item2(50216,5)
					pc.setqf("event_christmas_time", get_global_time()) 
				end
			end
		end
		when 20384.take with item.get_vnum() == 50010 begin 
			pc.remove_item(50010)
			s = math.random(1,5)
			if s == 1 then
				say_title("Mos Craciun:")
				say("Din pacate, soseta este prea uzata.[ENTER]Adica, pute ca dracu.")
			else
				say_title("Mos Craciun:")
				say("Multumesc pentru soseta.[ENTER]Uite cum o pun in brad!")
				local count = pc.getqf("event_christmas_socks_succes") + 1
				pc.setqf("event_christmas_socks_succes", count)
			end
		end
		when 20384.chat."Craciun Fericit!" with game.get_event_flag("event_christmas") == 1 begin
			say_title("Mos Craciun:")
			if pc.getqf("event_christmas_socks_succes") > 0 then
				say(""..pc.get_name()..", hmm...[ENTER]Vrei sa-ti alegi un cadou?")
				local s1 = select ("Da" , "O sa mai adun sosete")   
				if s1 == 1 then
					say_title("Mos Craciun:")
					say("Alege rasplata:")
					local awards_code = {
					--code,count,price
					{71135,1,30},
					{71136,1,50},
					{71143,1,40},
					{71144,1,200},
					{71145,1,200},
					{71131,1,150},
					{71132,1,150},
					{71133,1,1600},
					{71134,1,160},
					{30179,1,50},
					{71123,1,150},
					{71129,1,200},
					{50134,1,150}

					}
					local awards_list = select("Inel Semiluna","Acadea","Inelul Bucuriei","Cadou Craciun","Amuleta Dragostei Eterne","Sigiliu Predator Polar","Sigiliu Panda Blindat","Sigiliu Unicorn Rosu","Sigiliu Unicorn Albastru","Cheie Rasucita","Balanta Dragonului","Gheara Dragonului","Cufar Special Costume","Inchide")
					if awards_list != 13 then
						if pc.getqf("event_christmas_socks_succes") < awards_code[awards_list][3] then
							say_title("Mos Craciun:")
							say("Nu ai adus destule sosete pentru a[ENTER]putea primi acest cadou.[ENTER]Mai ai nevoie de "..awards_code[awards_list][3]-pc.getqf("event_christmas_socks_succes").." Sosete.")
							say("")
							return
						end
						pc.give_item2(awards_code[awards_list][1],awards_code[awards_list][2])
						local count = pc.getqf("event_christmas_socks_succes") - awards_code[awards_list][3]
						pc.setqf("event_christmas_socks_succes", count)
					end
				end
			else
				say(""..pc.get_name()..", pentru a capata puncte[ENTER]pune o soseta pe brad. Dupa ce ai[ENTER]atarnat destule sosete in brad[ENTER]poti sa-ti alegi un cadou de[ENTER]Craciun.")
			end	
		end
		when 53031.use begin
			if 21600 > get_global_time() - pc.getqf("event_christmas_time") then
				pc.setqf("event_christmas_drop", 1)
			else
				chat("[Event]Nu vei mai primi drop la sosete.")
				pc.setqf("event_christmas_drop", 0)
			end
		end
	end
end
Dupa ce faci ce ti-a zis Gajeel bagi codu la mosu ala " 20126" si e imposibil sa nu-ti mearga :)
Imagine

:ymsmug:
Afișează semnătura
Avatar utilizator
acmilan2013
Nivel 1

Nivel 1
Mesaje: 88
Membru din: 20 Iul 2015, 21:49
Aprecieri: 31  
Mulţumiri: 3  
Medalii

Ca să funcționeze scrie in joc
"/e event_christmas 1"
"/e event_christmas_drop 1"
Ca să oprești evenimentul modifici valoarea "1" în "0".
Succes!

[ Postat de pe Android ] Imagine
Avatar utilizator
Dănuţ M.
Mister Just4Metin

Mister Just4Metin
Mesaje: 263
Membru din: 25 Iul 2013, 18:27
Aprecieri: 8  
Mulţumiri: 788  
Medalii

Rezolvat ! Cer T/C.
Închis
Răspunsuri
1
Vizualizări
227
Răspunsuri
3
Vizualizări
126
Răspunsuri
0
Vizualizări
137
Răspunsuri
1
Vizualizări
246

Înapoi la “Probleme rezolvate”

  • Informaţie