Register for your free account! | Forgot your password?

You last visited: Today at 17:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE] Pet System Advanced quest

Discussion on [RELEASE] Pet System Advanced quest within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
[RELEASE] Pet System Advanced quest

hi all,

I anticipate that the quest is not quite complete as it is a job that I left a few weeks and I do not think that will complete only for lack of desire.

What is missing: to complete the quest really miss a few functions including management and summon pet horse in the application of the bonus for the fighting style I think there is nothing more to add (if I remember correctly).

the quest is very flexible, you can add different fighting styles you find already made ​​2 as an example .. I had an idea that jumped to mind lately and that are managed differently from now you may get different bonuses fixed for every style and not like now that everyone can choose the bonus from a list .. but this is just an idea for those who will want to develop


questlib.lua:

Code:

PetExpTable = { 
	[1] = 300, [2] = 600, [3] = 900, 
	[4] = 1200, [5] = 1500, [6] = 1800, 
	[7] = 2100, [8] = 2400, [9] = 2700, 
	[10] = 3000, [11] = 3300, [12] = 3600, 
	[13] = 3900, [14] = 4200, [15] = 4500, 
	[16] = 4800, [17] = 5100, [18] = 5400, 
	[19] = 5700, [20] = 6000, [21] = 6300, 
	[22] = 6600, [23] = 6900, [24] = 7200, 
	[25] = 7500, [26] = 7800, [27] = 8100, 
	[28] = 8400, [29] = 8700, [30] = 9000,
	[31] = 9300, [32] = 9600, [33] = 9900, 
	[34] = 10200, [35] = 10500, [36] = 10800, 
	[37] = 11100, [38] = 11400, [39] = 11700, 
	[40] = 12000, [41] = 12300, [42] = 12600, 
	[43] = 12900, [44] = 13200, [45] = 13500, 
	[46] = 13800, [47] = 14100, [48] = 14400, 
	[49] = 14700, [50] = 15000,	[51] = 15300, 
	[52] = 15600, [53] = 15900, [54] = 16200, 
	[55] = 16500, [56] = 16800, [57] = 17100, 
	[58] = 17400, [59] = 17700, [60] = 18000,
	[61] = 18300, [62] = 18600, [63] = 18900, 
	[64] = 19200, [65] = 19500, [66] = 19800, 
	[67] = 20100, [68] = 20400, [69] = 20700, 
	[70] = 21000, [71] = 21300, [72] = 21600, 
	[73] = 21900, [74] = 22200, [75] = 22500, 
	[76] = 22800, [77] = 23100, [78] = 23400, 
	[79] = 23700, [80] = 24000,	[81] = 24300, 
	[82] = 24600, [83] = 24900, [84] = 25200, 
	[85] = 25500, [86] = 25800, [87] = 26100, 
	[88] = 26400, [89] = 26700, [90] = 27000,
	[91] = 27300, [92] = 27600, [93] = 27900, 
	[94] = 28200, [95] = 28500, [96] = 28800, 
	[97] = 29100, [98] = 29400, [99] = 29700, 
	[100] = 30000, [101] = 30300, [102] = 30600, 
	[103] = 30900, [104] = 31200, [105] = 31500, 
	[106] = 31800, [107] = 32100, [108] = 32400, 
	[109] = 32700, [110] = 33000, [111] = 33300, 
	[112] = 33600, [113] = 33900, [114] = 34200, 
	[115] = 34500, [116] = 34800, [117] = 35100, 
	[118] = 35400, [119] = 35700, [120] = 36000,
	[121] = 36300, [122] = 36600, [123] = 36900, 
	[124] = 37200, [125] = 37500, [126] = 37800, 
	[127] = 38100, [128] = 38400, [129] = 38700, 
	[130] = 39000, [131] = 39300, [132] = 39600, 
	[133] = 39900, [134] = 40200, [135] = 40500, 
	[136] = 40800, [137] = 41100, [138] = 41400, 
	[139] = 41700, [140] = 42000, [141] = 42300, 
	[142] = 42600, [143] = 42900, [144] = 43200, 
	[145] = 43500, [146] = 43800, [147] = 44100, 
	[148] = 44400, [149] = 44700, [150] = 45000,
}

PetBonus = {
	{ "offensivo", { "Valore Attacco Fisico","Valore Attacco Magico", }, { "Forte Vs War","Forte Vs Ninja","Forte Vs Sura","Forte Vs Shamy","Forte Vs Mostri", }, { "Danni Critici","Danni Trafiggenti", }, { "Stordimento","Avvelenamento","Rallentamento", }, },
	{ "difensivo", { "Difesa Attacco Fisico","Difesa Attacco Magico", }, { "Res. Spada","Res. Spadone","Res. Pugnali","Res. Campana","Res. Ventaglio","Res. Freccia","Res. Magia", }, { "Max HP","Max MP", }, { "Rigenerazione HP","Rigenerazione MP", }, },
	{ 1, { 53,55, }, { 59,60,61,62,63, }, { 15,16, }, { 13,12,14, }, },
	{ 2, { 54,56, }, { 29,30,31,32,33,34,37, }, { 1,2, }, { 10,11, }, },
}

PetArray = {
	{53001, "fenice_rossa", "Fenice Rossa", 30068, PetExpTable, { 3,1,3,1, }, },
	{53002, "fenice_blu", "Fenice Blu", 30068, PetExpTable, { 3,3,1,1, }, },
	{53003, "renna", "Renna", 30068, PetExpTable, { 3,1,1,3, }, },
	{53005, "azarel", "Azarel", 30068, PetExpTable, { 2,1,3,2, }, },
	{53006, "cane", "Cane", 30068, PetExpTable, { 1,3,1,3, }, },
	{53007, "leone", "Leone", 30068, PetExpTable, { 1,1,3,3, }, },
	{53008, "cinghiale", "Cinghiale", 30068, PetExpTable, { 1,3,3,1, }, },
	{53009, "tigre", "Tigre", 30068, PetExpTable, { 2,3,2,1, }, },
}

PET_NAME 				= 1
PET_LEVEL				= 2
PET_EXP					= 3

PET_TYPE				= 1
PET_BON1				= 2
PET_BON2				= 3
PET_BON3				= 4
PET_BON4				= 5

PET_SUMMON				= 0
PET_UNSUMMON			= 1

PET_READ				= 0
PET_WRITE				= 1

PET_DATA				= 0
PET_BONUS				= 1

function inizializza(i)
	say_title("Pet System:")
	say("")
	say("Ciao, hai adottato un nuovo cucciolo")
	say("per poterlo evocare, come prima cosa")
	say("dovrai dargli un nome.")
	local scelta = select("Voglio dargli un nome","Non ora")
	if scelta == 2 then
		return -1
	end
	say_title("Pet System:")
	say("")
	say("Assegna un nome al tuo cucciolo")
	say("")
	say_reward("Nome:")
	local PetName = tostring(input())
	if PetName == "" then
		say_title("Pet System:")
		say("")
		say_reward("Non puoi lasciare l'input vuoto!")
		return -1
	end
	local DATA_PATH = "locale/italy/quest/object/pet/"
	local LOCAL_PATH = pc.get_name().."/"
	local PET_FILE = PetArray[i][2]..".txt"
	local PET_BONUS_FILE = PetArray[i][2].."_bonus.txt"
	if pc.getqf("local_path") != 1 then
		os.execute("cd "..DATA_PATH.." && mkdir "..LOCAL_PATH.." && chmod 777 "..LOCAL_PATH)
		pc.setqf("local_path", 1)
	end
	local file = io.open(DATA_PATH..LOCAL_PATH..PET_FILE , "w")
	file:write(PetName.."\n1\n0\n") --nome livello exp
	io.close(file)
	local bonus = io.open(DATA_PATH..LOCAL_PATH..PET_BONUS_FILE , "w")
	bonus:write("0\n0\n0\n0\n0\n")	
	io.close(bonus)
	os.execute("cd "..DATA_PATH..LOCAL_PATH.." && chmod 777 *.txt") 
	return 0
end

function GetGrade(i)
	local PetLevel = tonumber(data_tool(i, PET_LEVEL, PET_DATA, PET_READ))
	local x = 0
	local y = 0
	local Grade = 1
	while true do
		x = x + 1
		y = y + 1
		if y == 10 then
			Grade = Grade + 1
			y = 0
		end
		if x == PetLevel then 
			return Grade
		end
	end
end
	
function evoca(i, stato)
	local bonus = { 3,4,5,6, }
	local status = PetArray[i][6]
	local PetGrade = tonumber(GetGrade(i))
	local PetName = data_tool(i, PET_NAME, PET_DATA, PET_READ)
	local PetLevel = tonumber(data_tool(i, PET_LEVEL, PET_DATA, PET_READ))
	local horse_level = horse.get_level()
	local apply = 0
	local level = 21 + i
	if stato == PET_SUMMON then
		local z = 1
		while true do
			if bonus[z] == nil then break end
			apply = PetGrade*status[z]
			affect.add_collect(bonus[z], apply, 60*60*8)
			z = z + 1
		end
		horse.set_level(level)
		horse.set_name(PetName)
		horse.summon()
		chat("Il pet e' stato evocato")
		horse.set_level(horse_level)
	else
		local z = 1
		while true do
			if bonus[z] == nil then break end
			apply = PetGrade*status[z]
			affect.remove_collect(bonus[z], apply, 60*60*8)
			z = z + 1
		end
		horse.set_level(level)
		horse.unsummon()
		chat("Il tuo pet e' andato a riposare")
		horse.set_level(horse_level)
	end
end

function PetInfo(x)
	while true do
		say_title("Pet System:")
		say("Informazioni abilita':")
		say("")
		say("Lo stile "..PetBonus[x][1].." si divide in 4")
		say("categorie principali.")
		say("potrai sviluppare una sola tecnica per categoria")
		local y = 0
		if x == 1 then
			y = select( "Valore Attacco","Attacco Vs. Razza","Aumento del danno","Tecniche Speciali","Indietro")
		else
			y = select( "Valore Difesa","Difesa Vs. Arma","Aumento dei valori vitali","Tecniche Rigenerative","Indietro")
		end
		if y == 5 then
			break
		end
		while true do
			say_title("Pet System:")
			say("Informazioni abilita':")
			say("")
			say("Con l'apprendimento di questa tecnica potrai")
			say("incrementare il valore "..PetBonus[x][1])
			say("Tecniche disponibili:")
			say("")
			local z = 1
			while true do
				if PetBonus[x][y+1][z] == nil then break end
				say_reward(PetBonus[x][y+1][z])
				z = z + 1
			end
			local b = select("Indietro")
			if b == 1 then
				break
			end
		end
	end
end

function PetSet(i, t)
	say_title("Pet System:")
	say("Gestione abilita':")
	say("")
	say("Hai scelto uno stile di combattimento")
	say("del tipo "..PetBonus[t][1].." per il tuo pet")
	say_reward("confermi?")
	local conferma = select("Si","No")
	if conferma == 2 then
		return
	end
	say_title("Pet System:")
	say("Gestione abilita':")
	say("")
	say("Una volta scelto lo stile di combattimento")
	say("hai la possibilita' di allenare nuove abilita'")
	say("scegli con cura le abilita' da sviluppare")
	say("")
	local k = select("Scelgo ora","Scelgo dopo")
	if k == 2 then
		return
	end
	local w = 2
	local bonus = {}
	local bon = {}
	while true do
		if PetBonus[t][w] == nil then break end
		say_title("Pet System:")
		say("Gestione abilita': ")
		say("")
		say_reward("Puoi allenare solo una delle seguenti abilita'")
		say_reward("sceglila con cura...")
		say("")
		local x = select_table( PetBonus[t][w] )
		bonus[w-1] = x
		bon[w-1] = PetBonus[t][w][x]
		w = w + 1
	end
	say_title("Pet System:")
	say("Gestione abilita':")
	say("")
	say("Hai scelto:")
	say("")
	say("Bonus 1:  "..bon[1])
	say("Bonus 2:  "..bon[2])
	say("Bonus 3:  "..bon[3])
	say("Bonus 4:  "..bon[4])
	say("")
	say_reward("Confermi?")
	say("")
	local c = select("Si","No")
	if c == 2 then
		return
	end
	data_tool(i, t.."\n"..bonus[1].."\n"..bonus[2].."\n"..bonus[3].."\n"..bonus[4].."\n", PET_BONUS, PET_WRITE)
end

function PetMenuAbi(i)
	local check = tonumber(data_tool(i, PET_TYPE, PET_BONUS, PET_READ))
	local status = PetArray[i][6]
	local PetGrade = tonumber(GetGrade(i))
	local PetType = tonumber(data_tool(i, PET_TYPE, PET_BONUS, PET_READ))
	local bon1 = tonumber(data_tool(i, PET_BON1, PET_BONUS, PET_READ))
	local bon2 = tonumber(data_tool(i, PET_BON2, PET_BONUS, PET_READ))
	local bon3 = tonumber(data_tool(i, PET_BON3, PET_BONUS, PET_READ))
	local bon4 = tonumber(data_tool(i, PET_BON4, PET_BONUS, PET_READ))
	if check == 0 then
		while true do
			say_title("Pet System:")
			say("Benvenuto nel sistema di gestione abilita'")
			say("come prima cosa devi decidere che tipo")
			say("di istruzione vuoi dare al tuo pet")
			local z = select( "Offensiva","Difensiva","Informazioni","Chiudi")
			if z == 1 then
				PetSet(i, z)
				return
			elseif z == 2 then
				PetSet(i, z)
				return
			elseif z == 3 then
				while true do
					say_title("Pet System:")
					say("Informazioni abilita':")
					say("")
					say("Ogni pet può sviluppare 4 abilita'")
					say("a seconda dello stile di combattimento")
					say("")
					local x = select( "Stile Offensivo","Stile Difensivo","Indietro")
					if x == 1 then
						PetInfo(x)
					elseif x == 2 then
						PetInfo(x)
					elseif x == 3 then
						break
					end
				end
			elseif z == 4 then
				break
			end
		end
	else
		say_title("Pet System:")
		say("Gestione abilita':")
		say("")
		say_reward("Cosa desideri fare?")
		say("")
		local y = select("Stato abilita'","Reset Abilita'","Chiudi")
		if y == 1 then
			local point = {}
			local p = 1
			while true do
				if status[p] == nil then break end
				point[p] = status[p]*PetGrade
				p = p + 1
			end
			say_title("Pet System:")
			say("Stato abilita':")
			say("")
			say_reward("Status:")
			say("VIT:  +"..point[1])
			say("INT:  +"..point[2])
			say("STR:  +"..point[3])
			say("DEX:  +"..point[4])
			say_reward("Bonus:")
			say(PetBonus[PetType][2][bon1]..":  +"..PetGrade)
			say(PetBonus[PetType][3][bon2]..":  +"..PetGrade)
			say(PetBonus[PetType][4][bon3]..":  +"..PetGrade)
			say(PetBonus[PetType][5][bon4]..":  +"..PetGrade)
		elseif y == 2 then
			say_title("Pet System:")
			say("Reset abilita'")
			say("che tipo di istruzione vuoi dare al tuo pet?")
			say_reward("Ricorda il reset può essere usato ogni 3 giorni")
			local j = select("Stile Offensivo","Stile Difensivo","Chiudi")
			if j == 1 then
				PetSet(i, j)
			elseif j == 2 then
				PetSet(i, j)
			else
				return
			end
		elseif y == 3 then
			return
		end
	end
end

function show_pet_menu(i)
	local PetName = data_tool(i, PET_NAME, PET_DATA, PET_READ)
	local PetRace = PetArray[i][3]
	local PetFood = PetArray[i][4]
	local PetGrade = tonumber(GetGrade(i))
	local PetLevel = tonumber(data_tool(i, PET_LEVEL, PET_DATA, PET_READ))
	local PetExp = tonumber(data_tool(i, PET_EXP, PET_DATA, PET_READ))
	local PetNextExp = PetArray[i][5][PetLevel]
	while true do
		say_title("Pet System:")
		say("Benvenuto nel sistema di gestione del pet")
		say("")
		say_reward("cosa desideri fare?")
		local s = select("Stato Pet", "Ciba Pet", "Abilita' Pet", "Altro", "Chiudi" )
		if s == 4 then
			say_title("Pet System:")
			say("Benvenuto nel sistema di gestione del pet")
			say("")
			say_reward("cosa desideri fare?")
			local z = select( "Cambia Nome", "Manda via", "Indietro", "Chiudi" )
			if z == 1 then
				say_title("Pet System:")
				say("")
				say("Assegna un nuovo nome al tuo cucciolo")
				say("")
				say_reward("Nome:")
				local PetNewName = tostring(input())
				if PetNewName == "" then
					say_title("Pet System:")
					say("")
					say_reward("Non puoi lasciare l'input vuoto!")
					return
				end
				if PetNewName == nome then
					say_title("Pet System:")
					say("")
					say_reward("Non puoi usare lo stesso nome!")
					return
				end
				data_tool(i, PetNewName.."\n"..PetLevel.."\n"..PetExp.."\n", PET_DATA, PET_WRITE)
				evoca(i, PET_UNSUMMON)
				evoca(i, PET_SUMMON)
				return
			elseif z == 2 then
				evoca(i, PET_UNSUMMON)
				return
			elseif z == 3 then
			elseif z == 4 then
				break
			end
		elseif s == 1 then
			say_title("Pet System:")
			say("")
			say("Nome: "..PetName)
			say("Razza: "..PetRace)
			say("Livello: "..PetLevel)
			say("Grado Istruzione: "..PetGrade)
			say("Exp: "..PetExp.." / "..PetNextExp)
			say("Salute: "..horse.get_health_pct().."%")
			say("Resistenza: "..horse.get_stamina_pct().."%")
			say("Cibo: "..item_name(PetFood))
			return
		elseif s == 2 then
			if pc.countitem(PetFood) > 0 then
				say_title("Pet System:")
				say("")
				say("Il tuo cucciolo e' felice")
				say("per l'ottimo spuntino che ha fatto")
				pc.removeitem(PetFood, 1)
				horse.feed()
				return
			else
				say_title("Pet System:")
				say("")
				say("Per cibare il tuo cucciolo")
				say("hai bisogno di: "..item_name(PetFood))
				say("")
				return
			end
		elseif s == 3 then
			if PetLevel >= 10 then
				PetMenuAbi(i)
				return
			else
				say_title("Pet System:")
				say("")
				say_reward("Il Pet deve essere almeno Lv 10")
				return
			end
		elseif s == 5 then
			break
		end
	end
end

function PetGiveExp(i, Point)
	local PetName = data_tool(i, PET_NAME, PET_DATA, PET_READ)
	local PetLevel = tonumber(data_tool(i, PET_LEVEL, PET_DATA, PET_READ))
	local PetExp = tonumber(data_tool(i, PET_EXP, PET_DATA, PET_READ))
	local PetNextExp = PetArray[i][5][PetLevel]
	if PetLevel == 150 then
		return
	end
	local PetNewExp = PetExp + Point
	while true do
		if PetNewExp < PetNextExp then break end
		PetNewExp = PetNewExp - PetNextExp
		PetLevel = PetLevel + 1
	end
	data_tool(i, PetName.."\n"..PetLevel.."\n"..PetNewExp.."\n", PET_DATA, PET_WRITE)
end

function data_tool(i, linea, tipo, modo)
	local DATA_PATH = "locale/italy/quest/object/pet/"
	local LOCAL_PATH = pc.get_name().."/"
	local x = 1
	local file = ""
	local PET_FILE = ""
	local PET_BACKUP = ""
	if tipo == PET_DATA then
		PET_FILE = PetArray[i][2]..".txt"
		PET_BACKUP = PetArray[i][2]..".bak"
	elseif tipo == PET_BONUS then
		PET_FILE = PetArray[i][2].."_bonus.txt"
		PET_BACKUP = PetArray[i][2].."_bonus.bak"
	end
	if modo == PET_READ then
		file = io.open(DATA_PATH..LOCAL_PATH..PET_FILE, "r")
		while true do
			local line = file:read("*l")
			if line == nil then 
				break 
			end
			text = string.gsub(line, "\n", "")
			if x == linea then 
				io.close(file)
				return text
			end
			x = x + 1
		end
		io.close(file)
	elseif modo == PET_WRITE then
		os.execute("cd "..DATA_PATH..LOCAL_PATH.." && mv "..PET_FILE.." "..PET_BACKUP)
		file = io.open(DATA_PATH..LOCAL_PATH..PET_FILE, "w")
		file:write(linea)
		io.close(file)
		os.execute("cd "..DATA_PATH..LOCAL_PATH.." && chmod 777 "..PET_FILE)
	end
end
pet_system.quest:

Code:
quest pet_system begin
    state start begin
		when 53001.use or 53002.use or 53003.use or 53005.use or 53006.use or 53007.use or 53008.use or 53009.use begin
			local ItemValue = item.vnum
			for i = 1, table.getn(PetArray), 1 do
				if PetArray[i][1] == ItemValue then
					local PetState = PetArray[i][2]
					if pc.getqf("pet_index") == 0 then
						if pc.getqf(PetState) == 0 then
							local check = inizializza(i)
							if check != 0 then return end
							pc.setqf(PetState, 1)
						end
						pc.setqf("pet_index", i)
						evoca(i, PET_SUMMON)
					else
						evoca(i, PET_UNSUMMON)
						pc.setqf("pet_index", 0)
					end
				end
			end
        end
        when 20120.click with pc.getqf("pet_index") == 1 begin    show_pet_menu(1)    end
        when 20121.click with pc.getqf("pet_index") == 1 begin    show_pet_menu(1)    end
        when 20122.click with pc.getqf("pet_index") == 1 begin    show_pet_menu(1)    end
        when 20123.click with pc.getqf("pet_index") == 2 begin    show_pet_menu(2)    end
        when 20124.click with pc.getqf("pet_index") == 2 begin    show_pet_menu(2)    end
        when 20125.click with pc.getqf("pet_index") == 2 begin    show_pet_menu(2)    end
        when 20126.click with pc.getqf("pet_index") == 3 begin    show_pet_menu(3)    end
        when 20127.click with pc.getqf("pet_index") == 3 begin    show_pet_menu(3)    end
        when 20128.click with pc.getqf("pet_index") == 3 begin    show_pet_menu(3)    end
        when 20129.click with pc.getqf("pet_index") == 4 begin    show_pet_menu(4)    end
        when 20130.click with pc.getqf("pet_index") == 4 begin    show_pet_menu(4)    end
        when 20131.click with pc.getqf("pet_index") == 4 begin    show_pet_menu(4)    end
        when 20132.click with pc.getqf("pet_index") == 5 begin    show_pet_menu(5)    end
        when 20133.click with pc.getqf("pet_index") == 5 begin    show_pet_menu(5)    end
        when 20134.click with pc.getqf("pet_index") == 5 begin    show_pet_menu(5)    end
        when 20135.click with pc.getqf("pet_index") == 6 begin    show_pet_menu(6)    end
        when 20136.click with pc.getqf("pet_index") == 6 begin    show_pet_menu(6)    end
        when 20137.click with pc.getqf("pet_index") == 6 begin    show_pet_menu(6)    end
        when 20138.click with pc.getqf("pet_index") == 7 begin    show_pet_menu(7)    end
        when 20139.click with pc.getqf("pet_index") == 7 begin    show_pet_menu(7)    end
        when 20140.click with pc.getqf("pet_index") == 7 begin    show_pet_menu(7)    end
        when 20141.click with pc.getqf("pet_index") == 8 begin    show_pet_menu(8)    end
        when 20142.click with pc.getqf("pet_index") == 8 begin    show_pet_menu(8)    end
        when 20143.click with pc.getqf("pet_index") == 8 begin    show_pet_menu(8)    end

		when kill with pc.getqf("pet_index") != 0 begin
            local i = pc.getqf("pet_index")
			if pc.get_level() > (npc.get_level() + 15) then
				return
			end
			if pc.get_level() <= npc.get_level() then
				PetGiveExp(i, 5)
			elseif pc.get_level() <= (npc.get_level() + 5) then
				PetGiveExp(i, 4)
			elseif pc.get_level() <= (npc.get_level() + 10) then
				PetGiveExp(i, 3)
			elseif pc.get_level() <= (npc.get_level() + 15) then
				PetGiveExp(i, 1)
			end
		end
		
        when logout with pc.getqf("pet_index") != 0 begin
            local i = pc.getqf("pet_index")
            evoca(i, PET_UNSUMMON)
            pc.setqf("pet_index", 0)
        end
        when login with pc.getqf("pet_index") != 0 begin
            local i = pc.getqf("pet_index")
            evoca(i, PET_UNSUMMON)
            pc.setqf("pet_index", 0)
        end
    end
end

NOTE: for the proper functioning of the quest have to apply a dif for the function npc.get_level

Code:
This difference file is created by The Interactive Disassembler

game2089
0014E762: 89 90
0014E763: C3 90
0014E764: 74 75
0014E765: 07 61
0014E766: 8B 90
0014E767: 50 90
0014E768: 24 90
0014E769: 85 90
0014E76A: D2 90
0014E76B: 74 90
0014E76C: 33 90
0014E7C7: 24 0F
0014E7C8: 04 B6
0014E7C9: E8 80
0014E7CA: 82 0A
0014E7CB: F5 05
0014E7CC: 17 00
00312349: 72 6C
0031234B: 6D 76
0031234C: 61 65
0031234D: 69 6C
0031234E: 6E 00
credit to BlackYuko for the dif


enjoy

d3m0n3
d3m0n3 is offline  
Thanks
49 Users
Old 09/07/2012, 19:49   #2
 
elite*gold: 0
Join Date: Jan 2010
Posts: 219
Received Thanks: 127
Nice I'll try it on my server
nero1992 is offline  
Old 09/07/2012, 19:53   #3
 
elite*gold: 0
Join Date: Oct 2009
Posts: 382
Received Thanks: 161
Very nice thank you 4 share


the quest is that?

there is no client
vpser is offline  
Thanks
2 Users
Old 09/07/2012, 19:59   #4
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
NOTE: for the proper functioning of the quest have to apply a dif for the function npc.get_level

Code:
This difference file is created by The Interactive Disassembler

game2089
0014E762: 89 90
0014E763: C3 90
0014E764: 74 75
0014E765: 07 61
0014E766: 8B 90
0014E767: 50 90
0014E768: 24 90
0014E769: 85 90
0014E76A: D2 90
0014E76B: 74 90
0014E76C: 33 90
0014E7C7: 24 0F
0014E7C8: 04 B6
0014E7C9: E8 80
0014E7CA: 82 0A
0014E7CB: F5 05
0014E7CC: 17 00
00312349: 72 6C
0031234B: 6D 76
0031234C: 61 65
0031234D: 69 6C
0031234E: 6E 00
credit to BlackYuko for the dif
d3m0n3 is offline  
Thanks
2 Users
Old 09/07/2012, 20:08   #5
 
[The]Domco's Avatar
 
elite*gold: 45
Join Date: Mar 2011
Posts: 253
Received Thanks: 239
Quote:
Originally Posted by d3m0n3 View Post
NOTE: for the proper functioning of the quest have to apply a dif for the function npc.get_level

Code:
This difference file is created by The Interactive Disassembler

game2089
0014E762: 89 90
0014E763: C3 90
0014E764: 74 75
0014E765: 07 61
0014E766: 8B 90
0014E767: 50 90
0014E768: 24 90
0014E769: 85 90
0014E76A: D2 90
0014E76B: 74 90
0014E76C: 33 90
0014E7C7: 24 0F
0014E7C8: 04 B6
0014E7C9: E8 80
0014E7CA: 82 0A
0014E7CB: F5 05
0014E7CC: 17 00
00312349: 72 6C
0031234B: 6D 76
0031234C: 61 65
0031234D: 69 6C
0031234E: 6E 00
credit to BlackYuko for the dif
Okay thanks and for what we need npc.get_level ( if cant be without it )
[The]Domco is offline  
Old 09/07/2012, 20:11   #6
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
Quote:
Originally Posted by Creator7111 View Post
Okay thanks and for what we need npc.get_level ( if cant be without it )
need it for the management of the EXP of the pet as can be seen from quest

Quote:
Originally Posted by vpser View Post
Very nice thank you 4 share



the quest is that?

there is no client
the gui and gui managment is not pubblic
d3m0n3 is offline  
Thanks
1 User
Old 09/07/2012, 20:19   #7
 
[The]Domco's Avatar
 
elite*gold: 45
Join Date: Mar 2011
Posts: 253
Received Thanks: 239
So this pet system is for the more than 1 horse summon dif ? And sorry i didint read the full quest
[The]Domco is offline  
Old 09/07/2012, 20:28   #8
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
Quote:
Originally Posted by Creator7111 View Post
So this pet system is for the more than 1 horse summon dif ? And sorry i didint read the full quest
management features pet-horse is not complete as you said you have to complete them according to the changes made ​​to your game file, unlike if you have a management with mount or a pet horse management at the same time
d3m0n3 is offline  
Thanks
1 User
Old 09/07/2012, 21:05   #9
 
miszczuuuuu's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 55
Received Thanks: 25
Code:
SYSERR: Sep  7 21:01:51 :: RunState: LUA_ERROR: locale/germany/quest/questlib.lua:1676: attempt to index local `file' (a nil value)
SYSERR: Sep  7 21:01:51 :: WriteRunningStateToSyserr: LUA_ERROR: quest pet_system.start click
line 1676 from questlib
Code:
file:write(PetName.."\n1\n0\n")
How fix?

My quest_function:
Code:
PetGiveExp
evoca
inizializza
npc.get_level
show_pet_menu
file
miszczuuuuu is offline  
Old 09/07/2012, 21:19   #10
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
Quote:
Originally Posted by miszczuuuuu View Post
Code:
SYSERR: Sep  7 21:01:51 :: RunState: LUA_ERROR: locale/germany/quest/questlib.lua:1676: attempt to index local `file' (a nil value)
SYSERR: Sep  7 21:01:51 :: WriteRunningStateToSyserr: LUA_ERROR: quest pet_system.start click
line 1676 from questlib
Code:
file:write(PetName.."\n1\n0\n")
How fix?

My quest_function:
Code:
PetGiveExp
evoca
inizializza
npc.get_level
show_pet_menu
file
need to manualy make directory pet
d3m0n3 is offline  
Thanks
2 Users
Old 09/08/2012, 02:44   #11
 
Red Firestar's Avatar
 
elite*gold: 0
The Black Market: 185/0/0
Join Date: Jul 2012
Posts: 5,520
Received Thanks: 1,350
Very Nice Thanks *-*


nicht vergessen auf den Spoiler drücken schadet nicht
Red Firestar is offline  
Old 09/08/2012, 06:15   #12
 
.Rebel's Avatar
 
elite*gold: 60
Join Date: May 2010
Posts: 766
Received Thanks: 1,025
love the idea of the pet gui the quest is also ok dont like the part in make fother but i see why
.Rebel is offline  
Old 09/10/2012, 16:11   #13
 
elite*gold: 0
Join Date: Mar 2011
Posts: 83
Received Thanks: 30
perfectly work!!!.. UP!!!
cody95 is offline  
Old 09/10/2012, 16:42   #14
 
elite*gold: 0
Join Date: Oct 2009
Posts: 382
Received Thanks: 161
how pet will gain exp?
vpser is offline  
Old 09/10/2012, 16:46   #15
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
Quote:
Originally Posted by vpser View Post
how pet will gain exp?
when you exp, function are in quest file....

Code:
		when kill with pc.getqf("pet_index") != 0 begin
            local i = pc.getqf("pet_index")
			if pc.get_level() > (npc.get_level() + 15) then
				return
			end
			if pc.get_level() <= npc.get_level() then
				PetGiveExp(i, 5)
			elseif pc.get_level() <= (npc.get_level() + 5) then
				PetGiveExp(i, 4)
			elseif pc.get_level() <= (npc.get_level() + 10) then
				PetGiveExp(i, 3)
			elseif pc.get_level() <= (npc.get_level() + 15) then
				PetGiveExp(i, 1)
			end
		end
d3m0n3 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release]Metin2 Premium System Quest
10/01/2017 - Metin2 PServer Guides & Strategies - 11 Replies
Hier Release ich euch eine Quest die euch vielleicht nützlich sein kann. Funktion: 1. Bei jedem einloggen wird der Name des Premium Spielers im GM-Chat angezeigt. 2. Premium Spieler können Shops öffnen die kein normaler Spieler öffnen kann. 3. Alles Bug frei und verständlich zum bearbeiten. Diese Quest wurde von sLay. veröffentlich(http://www.elitepvpers.com/forum/met in2-pserver-guides-strategies/1589187-release-prem ium-system.html), ich habe das Online status eingefügt und noch so...
[Release] Quest Template {Advanced}
03/17/2013 - EO PServer Guides & Releases - 24 Replies
Hello, This is a Advanced Quest Template lol. I made a Normal one, Ask me if you want. This is Like, Get this item by killing a monster and get EP or whatever... This made from Token Template. http://i430.photobucket.com/albums/qq23/MikeMadMa n_album/6487375.jpg http://i430.photobucket.com/albums/qq23/MikeMadMa n_album/6601919.jpg http://i430.photobucket.com/albums/qq23/MikeMadMa n_album/6602702.jpg http://i430.photobucket.com/albums/qq23/MikeMadMa n_album/6720882.jpg...
[Release]Monarchen-System Quest by Sponge
02/12/2013 - Metin2 PServer Guides & Strategies - 16 Replies
Guten Abend liebe Com Heute abend, als der Gameserver meines Egoshooters down war, kam ich auf die Idee, eine Monarchen-System Quest zu schreiben, da ich hier im Forum noch nie ein 100% funktionierendes Monarchen-System gesehen hab. Außerdem laufen diese Monarchen-Systeme alle über die Gamefile. Heißt, je nach gamefile kann manch anderer das System garnicht nutzen, da die Difs ja von game zu game anders sind. Meine Quest jedoch kann mit jeden Serverfiles/gamefiles genutzt werden. Sie ist...
[Release]Metin2 Premium System Quest
07/29/2012 - Metin2 Private Server - 10 Replies
Hier Release ich euch eine Quest die euch vielleicht nützlich sein kann. Funktion: 1. Bei jedem einloggen wird der Name des Premium Spielers im GM-Chat angezeigt. 2. Premium Spieler können Shops öffnen die kein normaler Spieler öffnen kann. 3. Alles Bug frei und verständlich zum bearbeiten. Diese Quest wurde von sLay. veröffentlich(http://www.elitepvpers.com/forum/met in2-pserver-guides-strategies/1589187-release-prem ium-system.html), ich habe das Online status eingefügt und noch so...
[Release] Spiro's Fast Quest System (22/12/07)
12/23/2007 - GunZ - 0 Replies
Description: Okay, this is very simple. Now that NPCs can't suicide, I added with this hack pack, Darkx.dll. So the npc's Spawn at the same spot, you use godmode, lawnmower and/or insane massive. You will kill the NPCs relatively fast. So that's why it's called fast quester. Merry Christmas! Remember to press the thanks button. Instructions: 1- Replace all the files (system.mrs, GunzLauncher.exe, Maps) in the gunz folder (C:/ijji/english/gunz for the maps it goes in...



All times are GMT +2. The time now is 17:33.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.