Intrebare - Cat. Quest 2

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

*Intrebare: Stiti cumva de ce urmatorul quest nu functioneaza corect?
Tipologie server: -
*Resursă folosită: -
*ServerFiles utilizat: -
*Syserr: -
Poză: -
*Detalii suplimentare: Questul este adresat "obiectelor pentru chemat calul", insa daca eu am calul de o anumita categorie si folosesc "obiectul de chemat calul, pentru categoria mea", nu imi apare nimic, iar daca le folosesc pe celelalte, imi apare ceea ce ar trebui sa apara.
Asta se intampla pentru fiecare nivel al calului.
Solutii?

Download quest.lua: https://mega.nz/#!AO4lzAhT!tzLSe33Ulsws ... DZXzbGAUj8
Quest code:

Cod: Selectaţi tot

--Quest:	Cheama calul -> Horse summon
--Obiect:	Imagine de cal / Pergamentul cailor armati / Cartea cailor militari
--Autor 1:	[DEV]TWIX - SoLuS 
--Autor 2:	T4zu (Metin2-Test-Quest)
--Tester:	T4zu (Metin2-Test-Quest)

--Adauga urmatoarele functii in (quest_function):	get_horse_summon_prob_pct	si	horse_summon.get_horse_summon_prob_pct	


quest favorite_cheama_calul begin
	state start begin
		function get_horse_summon_prob_pct()  local skill_level=pc.get_skill_level(131)  if skill_level==1 then   return 15  elseif skill_level==2 then   return 20  elseif skill_level==3 then   return 30  elseif skill_level==4 then   return 40  elseif skill_level==5 then   return 50  elseif skill_level==6 then   return 60  elseif skill_level==7 then   return 70  elseif skill_level==8 then   return 80  elseif skill_level==9 then   return 90  elseif skill_level>=10 then   return 100  end  return 10 end
		
		
		--=====================================================================
		--IMAGINE_DE_CAL
		--=====================================================================
		when 50051.use with horse.get_grade() == 0 begin
			say_title( "Imagine de cal   (Horse image)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "In prezent, nu detii nici un cal!" )
			say_rosu( "Pentru a obtine un cal vorbeste cu (NPC) Grajdar." )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "At the moment, you don't have a horse!" )
			say_alb( "If you want to get a horse, talks with (NPC) Grajdar." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "INFO: (NPC) Grajdar" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:")
			chat( "(Ro) Daca doresti sa chemi un cal, asigura-te ca ai unul!" )
			chat( "(En) If you want to call a horse, make sure you have one!" )
		end
		
		when 50051.use with horse.get_grade() == 1 begin
			if pc.getsp() >= 200 then
				if number( 1 , 100 ) <= horse_summon.get_horse_summon_prob_pct() then
				say_title( "Imagine de cal   (Horse image)" )
				say_alb( "" )
				say_galben( "(Ro)" )
				say_verde2( "Calul tau a fost chemat cu succes!" )
				say_alb( "" )
				say_galben( "(En)" )
				say_verde2( "Your horse has been successfully called!" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_verde2( "Metin2-Test-Quest" )
				horse.summon()
				--wait()
				chat( "_________________________________________________" )
				chat( "Metin2-Test-Quest system:" )
				chat( "(Ro) Cal chemat cu succes!" )
				chat( "(En) Your horse has been successfully called!" )
				pc.change_sp(-200)
				else
				chat( "_________________________________________________" )
				chat( "Metin2-Test-Quest system:" )
				chat( "(Ro) Nu ai reusit sa chemi calul!" )
				chat( "(En) Your horse could not be called!" )
				pc.change_sp(-200)
				end
			else
			say_title( "Imagine de cal   (Horse image)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu ai suficiente puncte de Mana (PM), pentru a chema calul!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You don't have enough Mana points (PM), to call your horse!" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "OBTINE: 200 PM" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de 200 PM, pentru a putea chema calul!" )
			chat( "(En) You need 200 PM, to call the horse!" )
			end
		end
		
		when 50051.use with horse.get_grade() == 2 begin
			say_title( "Imagine de cal   (Horse image)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu poti folosi acest obiect!" )
			say_rosu( "Foloseste Pergamentul cailor armati!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You can not use this object!" )
			say_rosu( "Please use Combat horse parchment." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "Pergamentul cailor armati" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de (Pergamentul cailor armati), pentru a-ti chema calul!" )
			chat( "(En) You need the (Pergamentul cailor armati) to call your horse!" )
		end
		
		when 50051.use with horse.get_grade() == 3 begin
			say_title( "Imagine de cal   (Horse image)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu poti folosi acest obiect!" )
			say_rosu( "Foloseste Cartea cailor militari!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You can not use this object!" )
			say_rosu( "Please use Military Horse Book." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "Cartea cailor militari" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de (Cartea cailor militari), pentru a-ti chema calul!" )
			chat( "(En) You need the (Cartea cailor militari) to call your horse!" )
		end
		
		
		--=====================================================================
		--PERGAMENTUL_CAILOR_ARMATI
		--=====================================================================
		when 50052.use with horse.get_grade() == 0 begin
			say_title( "Pergamentul cailor armati   (Combat horse parchment)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "In prezent, nu detii nici un cal!" )
			say_rosu( "Pentru a obtine un cal vorbeste cu (NPC) Grajdar." )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "At the moment, you don't have a horse!" )
			say_alb( "If you want to get a horse, talks with (NPC) Grajdar." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "INFO: (NPC) Grajdar" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Daca doresti sa chemi un cal, asigura-te ca ai unul!" )
			chat( "(En) If you want to call a horse, make sure you have one!" )
		end
		
		when 50052.use with horse.get_grade() == 1 begin
			say_title( "Pergamentul cailor armati   (Combat horse parchment)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu poti folosi acest obiect!" )
			say_rosu( "Foloseste Imaginea de cal." )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You can not use this object!" )
			say_rosu( "Please use Horse image." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "Imagine de cal" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de (Imagine de cal), pentru a-ti chema calul!" )
			chat( "(En) You need the (Imagine de cal) to call your horse!" )
		end
		
		when 50052.use with horse.get_grade() == 2 begin
			if pc.getsp() >= 400 then
				if number( 1 , 100 ) <= horse_summon.get_horse_summon_prob_pct() then
				say_title( "Pergamentul cailor armati   (Combat horse parchment)" )
				say_alb( "" )
				say_galben( "(Ro)" )
				say_verde2( "Calul tau a fost chemat cu succes!" )
				say_alb( "" )
				say_galben( "(En)" )
				say_verde2( "Your horse has been successfully called!" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_verde2( "Metin2-Test-Quest" )
				horse.summon()
				--wait()
				chat( "_________________________________________________" )
				chat( "Metin2-Test-Quest system:" )
				chat( "(Ro) Cal chemat cu succes!" )
				chat( "(En) Your horse has been successfully called!" )
				pc.change_sp(-400)
				else
				chat( "_________________________________________________" )
				chat( "Metin2-Test-Quest system:" )
				chat( "(Ro) Nu ai reusit sa chemi calul!" )
				chat( "(En) Your horse could not be called!" )
				pc.change_sp(-400)
				end
			else
			say_title( "Pergamentul cailor armati   (Combat horse parchment)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu ai suficiente puncte de Mana (PM), pentru a chema calul!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You don't have enough Mana points (PM), to call your horse!")
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "OBTINE: 400 PM" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de 400 PM, pentru a putea chema calul!" )
			chat( "(En) You need 400 PM, to call the horse!" )
			end
		end
		
		when 50052.use with horse.get_grade() == 3 begin
			say_title( "Pergamentul cailor armati   (Combat horse parchment)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu poti folosi acest obiect!" )
			say_rosu( "Foloseste Cartea cailor militari!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You can not use this object!" )
			say_rosu( "Please use Military Horse Book." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "Cartea cailor militari" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de (Cartea cailor militari), pentru a-ti chema calul!" )
			chat( "(En) You need the (Cartea cailor militari) to call your horse!" )
		end
		
		
		
		--=====================================================================
		--PERGAMENTUL_CAILOR_MILITARI
		--=====================================================================
		when 50053.use with horse.get_grade() == 0 begin
			say_title( "Cartea cailor militari   (Military Horse Book)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "In prezent, nu detii nici un cal!" )
			say_rosu( "Pentru a obtine un cal vorbeste cu (NPC) Grajdar." )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "At the moment, you don't have a horse!" )
			say_alb( "If you want to get a horse, talks with (NPC) Grajdar." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "INFO: (NPC) Grajdar" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:")
			chat( "(Ro) Daca doresti sa chemi un cal, asigura-te ca ai unul!" )
			chat( "(En) If you want to call a horse, make sure you have one!" )
		end
		
		when 50053.use with horse.get_grade() == 1 begin
			say_title( "Cartea cailor militari   (Military Horse Book)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu poti folosi acest obiect!" )
			say_rosu( "Foloseste Imaginea de cal!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You can not use this object!" )
			say_rosu( "Please use Horse Image." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "Imagine de cal" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de (Imaginea de cal), pentru a-ti chema calul!" )
			chat( "(En) You need the (Imaginea de cal) to call your horse!" )
		end
		
		when 50053.use with horse.get_grade() == 2 begin
			say_title( "Cartea cailor militari   (Military Horse Book)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu poti folosi acest obiect!" )
			say_rosu( "Foloseste Pergamentul cailor armati!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You can not use this object!" )
			say_rosu( "Please use Combat horse parchment." )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "Pergamentul cailor armati" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de (Pergamentul cailor armati), pentru a-ti chema calul!" )
			chat( "(En) You need the (Pergamentul cailor armati) to call your horse!" )
		end
		
		when 50053.use with horse.get_grade() == 3 begin
			if pc.getsp() >= 800 then
				if number( 1 , 100 ) <= horse_summon.get_horse_summon_prob_pct() then
				say_title( "Cartea cailor militari   (Military Horse Book)" )
				say_alb( "" )
				say_galben( "(Ro)" )
				say_verde2( "Calul tau a fost chemat cu succes!" )
				say_alb( "" )
				say_galben( "(En)" )
				say_verde2( "Your horse has been successfully called!" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_verde2( "Metin2-Test-Quest" )
				horse.summon()
				--wait()
				chat( "_________________________________________________" )
				chat( "Metin2-Test-Quest system:" )
				chat( "(Ro) Cal chemat cu succes!" )
				chat( "(En) Your horse has been successfully called!" )
				pc.change_sp(-800)
				else
				chat( "_________________________________________________" )
				chat( "Metin2-Test-Quest system:" )
				chat( "(Ro) Nu ai reusit sa chemi calul!" )
				chat( "(En) Your horse could not be called!" )
				pc.change_sp(-800)
				end
			else
			say_title( "Cartea cailor militari   (Military Horse Book)" )
			say_alb( "" )
			say_galben( "(Ro)" )
			say_rosu( "Nu ai suficiente puncte de Mana (PM), pentru a chema calul!" )
			say_alb( "" )
			say_galben( "(En)" )
			say_rosu( "You don't have enough Mana points (PM), to call your horse!")
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_reward( "OBTINE: 800 PM" )
			say_verde2( "Metin2-Test-Quest" )
			--wait()
			chat( "_________________________________________________" )
			chat( "Metin2-Test-Quest system:" )
			chat( "(Ro) Ai nevoie de 800 PM, pentru a putea chema calul!" )
			chat( "(En) You need 800 PM, to call the horse!" )
			end
		end
	
	end
	state __COMPLETE__ begin
		when enter begin
			q.done()
		end
	end
end
:|
Avatar utilizator
AreeS
Nou Venit

Nou Venit
Mesaje: 9
Membru din: 16 Sep 2018, 07:06
Server: J4M
Regat: Shinsoo
Aprecieri: 0
Mulţumiri: 2  
 Contact:
Medalii

Verifica atent daca mai exista un quest cu care sa faca conflict cel actual pe care il doresti tu. Dupa aceea incearca codurile respective pentru "Imagine de cal - respectiv nivel 1 , Carte Armat si Carte Militar" Sa fie corect introduse. Sa nu ai o problema la codurile acelea.
Spre exemplu " 50051 - Imagine de cal , sa fie defapt Cartea pentru Armat si invers.
Revino cu un edit dupa verificare si vedem ce putem sa facem.
PS: Am patit si eu odata asta si erau inversate codurile + Aveam un quest bine ascuns intr-un fisier cu care avea conflict cel dorit de mine.
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

AreeS scrie:Verifica atent daca mai exista un quest cu care sa faca conflict cel actual pe care il doresti tu. Dupa aceea incearca codurile respective pentru "Imagine de cal - respectiv nivel 1 , Carte Armat si Carte Militar" Sa fie corect introduse. Sa nu ai o problema la codurile acelea.
Spre exemplu " 50051 - Imagine de cal , sa fie defapt Cartea pentru Armat si invers.
Revino cu un edit dupa verificare si vedem ce putem sa facem.
PS: Am patit si eu odata asta si erau inversate codurile + Aveam un quest bine ascuns intr-un fisier cu care avea conflict cel dorit de mine.
Salut, am verificat. Din pacat nu exista nici o contradictie, deoarece am eliminat corect questul anterior, iar "itemele" au "Vnum-ul" bun.
Ma gandesc ca s-ar putea sa fie de la numele questului, ca am mai intalnit questuri pretentioase, dar daca ai si tu o alta idee, esti liber sa o spui :)

EDIT: Problema rezolvata, este nevoie sa fie numele fisierului si al questului "horse_summon" :))
Avatar utilizator
AreeS
Nou Venit

Nou Venit
Mesaje: 9
Membru din: 16 Sep 2018, 07:06
Server: J4M
Regat: Shinsoo
Aprecieri: 0
Mulţumiri: 2  
 Contact:
Medalii

t4zu scrie:
AreeS scrie:Verifica atent daca mai exista un quest cu care sa faca conflict cel actual pe care il doresti tu. Dupa aceea incearca codurile respective pentru "Imagine de cal - respectiv nivel 1 , Carte Armat si Carte Militar" Sa fie corect introduse. Sa nu ai o problema la codurile acelea.
Spre exemplu " 50051 - Imagine de cal , sa fie defapt Cartea pentru Armat si invers.
Revino cu un edit dupa verificare si vedem ce putem sa facem.
PS: Am patit si eu odata asta si erau inversate codurile + Aveam un quest bine ascuns intr-un fisier cu care avea conflict cel dorit de mine.
Salut, am verificat. Din pacat nu exista nici o contradictie, deoarece am eliminat corect questul anterior, iar "itemele" au "Vnum-ul" bun.
Ma gandesc ca s-ar putea sa fie de la numele questului, ca am mai intalnit questuri pretentioase, dar daca ai si tu o alta idee, esti liber sa o spui :)

EDIT: Problema rezolvata, este nevoie sa fie numele fisierului si al questului "horse_summon" :))
O chestie banala de care ne lovim cu toti la un momentdat :)) Succes !
Avatar utilizator
Titan
Metin Master

Metin Master
Mesaje: 2783
Membru din: 01 Iun 2015, 15:09
Server: In curand.
Regat: Chunjo
Aprecieri: 42  
Mulţumiri: 377  
  Rezolvări prob.: 3
Discord: Copiază ID
 Contact:
Medalii

Problemă rezolvată, topic mutat în probleme rezolvate.
Imagine
Afișează semnătura
Închis
Răspunsuri
3
Vizualizări
239
Răspunsuri
7
Vizualizări
905
Răspunsuri
8
Vizualizări
710
Răspunsuri
2
Vizualizări
116

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 3 vizitatori