Jump to content
  • 0

Quêtes chasse FR


Eristoff

Question

Version des Files / Type d’Émulateur : Files 2016

Domaine ( Base de Données, Client, Core, Sources... ) : Base de données

Niveau : Débutant, Intermédiaire ou Avancé ? Débutant

Bonjour à tous,

 

Jusqu'à aujourd'hui je n'ai jamais vu en partage et encore moins dans les serverfiles les quêtes de chasse où l'on demande de tués 5 sangliers sauvage ou 10 sanglier affamés (etc.) avec le dessin de ces animaux. 

 

Quelqu'un saurait comment faire ?

 

Merci d'avance à tous

 

J'affirme avoir lu et accepté le règlement de Funky Émulation

En vous remerciant,

Cordialement, Eristoff

Link to post

6 answers to this question

Recommended Posts

  • 0

Hello Eristoff !

 

Stefano (metin2dev) les avait refaite. Il y a juste deux trois phrases à traduire en français 😀

 

hunting.quest :

--###################################
--#      Created By Stefano9876     #
--# Please don't remove the credits #
--###################################
quest hunting_quest_en begin
	state start begin
		when login or levelup with pc.get_level() >= 2 begin
			pc.setqf("lv_next",2)
			pc.setqf("current_mission",1)
			pc.setqf("LV_MAX",90)
			set_state("information")
		end
	end
	state check_level begin
		when login or levelup with pc.get_level() >= pc.getqf("lv_next") begin
			set_state("information")
		end
	end
	state information begin
		when letter begin
			send_letter("Hunting Quest "..pc.getqf("current_mission"))
		end
		when button or info begin
			say_title("Hunting Quest "..pc.getqf("current_mission"))
			say("Choose a monster:")
			local s = select(hunting_quest.monsters_num0[pc.getqf("current_mission")].." "..mob_name(hunting_quest.monsters_value0[pc.getqf("current_mission")]),hunting_quest.monsters_num1[pc.getqf("current_mission")].." "..mob_name(hunting_quest.monsters_value1[pc.getqf("current_mission")]),"Annulla")
			if s == 1 then
				pc.setqf("_s",1)
				set_state("running")
			elseif s == 2 then
				pc.setqf("_s",2)
				set_state("running")
			end
		end
	end
	state running begin
		when enter begin
			pc.setqf("_kill",0)
		end
		when letter begin
			send_letter("Hunting Quest "..pc.getqf("current_mission"))
		end
		when button or info begin
			say_title("Hunting Quest "..pc.getqf("current_mission"))
			say("Objective:")
			if pc.getqf("_s") == 1 then
				say_reward("Kill " ..hunting_quest.monsters_num0[pc.getqf("current_mission")]-pc.getqf("_kill").. " " ..mob_name(hunting_quest.monsters_value0[pc.getqf("current_mission")]))
			else
				say_reward("Kill " ..hunting_quest.monsters_num1[pc.getqf("current_mission")]-pc.getqf("_kill").. " " ..mob_name(hunting_quest.monsters_value1[pc.getqf("current_mission")]))
			end
		end
		when kill with not npc.is_pc() begin
			if pc.getqf("_s") == 1 then
				if npc.get_race() == hunting_quest.monsters_value0[pc.getqf("current_mission")] then
					pc.setqf("_kill",pc.getqf("_kill")+1)
				end
				if pc.getqf("_kill") >= hunting_quest.monsters_num0[pc.getqf("current_mission")] then
					set_state("reward")
				end
			elseif pc.getqf("_s") == 2 then
				if npc.get_race() == hunting_quest.monsters_value1[pc.getqf("current_mission")] then
					pc.setqf("_kill",pc.getqf("_kill")+1)
				end
				if pc.getqf("_kill") >= hunting_quest.monsters_num1[pc.getqf("current_mission")] then
					set_state("reward")
				end
			end
		end
	end
	state reward begin
		when letter begin
			send_letter("Hunting Quest Reward "..pc.getqf("current_mission"))
		end
		when button or info begin
			say_title("Hunting Quest Reward "..pc.getqf("current_mission"))
			say("Good done "..pc.get_name().."!")
			say("You have completed the mission number " ..pc.getqf("current_mission")..",")
			say("so, that's your reward!")
			say_reward("You've got:")
			say_reward("Experience and Yang.")
			pc.give_exp2(hunting_quest_en.GetExpReward(pc.getqf("current_mission"),pc.getqf("lv_next")))
			pc.changegold(hunting_quest_en.GetYangReward(pc.getqf("lv_next")))
			if pc.getqf("current_mission") == pc.getqf("LV_MAX") then
				set_state("__COMPLETE__")
				return
			end
			pc.setqf("lv_next",pc.getqf("lv_next")+1)
			pc.setqf("current_mission",pc.getqf("current_mission")+1)
			set_state("check_level")
		end
	end
	state __COMPLETE__ begin
		when enter begin
			pc.delqf("current_mission")
			pc.delqf("lv_next")
			pc.delqf("_kill")
		end
		
		--**
		--** FUNCTIONS
		--**
		
		function GetYangReward(lv_next)
			local goldRange1, goldrange2
			goldRange1 = hunting_quest.yang_reward[lv_next][1]
			goldRange2 = hunting_quest.yang_reward[lv_next][2]
			return number(goldRange1,goldrange2)
		end
		
		function GetExpReward(current_mission, lv_next)
			local _FirstPerc, _SecondPerc
			local exp_for_this_level = hunting_quest.exp_table[lv_next]
			if current_mission <= 20 then
				_FirstPerc = exp_for_this_level*(1-0.90) -- 10%
				_SecondPerc = _FirstPerc
			elseif current_mission <= 30 then
				_FirstPerc = exp_for_this_level*(1-0.98) -- 2%
				_SecondPerc = exp_for_this_level*(1-0.90) -- 10%
			elseif current_mission <= 50 then
				_FirstPerc = exp_for_this_level*(1-0.98) -- 2%
				_SecondPerc = exp_for_this_level*(1-0.95) -- 5%
			elseif current_mission <= 60 then
				_FirstPerc = exp_for_this_level*(1-0.99) -- 1%
				_SecondPerc = exp_for_this_level*(1-0.96) -- 4%
			elseif current_mission <= 83 then
				_FirstPerc = exp_for_this_level*(1-0.98) -- 2%
				_SecondPerc = exp_for_this_level*(1-0.96) -- 4%
			elseif current_mission <=90 then
				_FirstPerc = exp_for_this_level*(1-0.95) -- 5%
				_SecondPerc = exp_for_this_level*(1-0.90) -- 10%
			end
			return number(_FirstPerc,_SecondPerc)
		end -- GetRewardExp
	end
end

 

questlib.lua :

--###################################
--#      Created By Stefano9876     #
--# Please don't remove the credits #
--###################################
hunting_quest = {}
hunting_quest.monsters_value0 = {
--	 1    2    3    4    5    6    7    8    9   10
	171, 171, 172, 173, 174, 178, 178, 175, 175, -- 2 to 10
	179, 180, 176, 181, 181, 177, 177, 184, 181, 182, -- 11 to 21
	352, 185, 354, 431, 551, 552, 456, 651, 651, 652, -- 21 to 30
	652, 652, 653, 751, 751, 752, 754, 773, 774, 756, -- 31 to 40
	931, 932, 932, 933, 771, 772, 933, 934, 773, 774, -- 41 to 50
	775, 934, 934, 776, 777, 935, 935, 936, 936, 937, -- 51 to 60
	2061, 1305, 1305, 2062, 2062, 2301, 2301, 1106, 1031, 2201, -- 61 to 70
	2303, 2303, 1063, 2305, 2204, 2205, 2311, 1070, 1069, 2312, -- 71 to 80
	1071, 2313, 2314, 2315, 1071, 1172, 1172, 1173, 1173, 1172, -- 81 to 90
}
hunting_quest.monsters_value1 = {
--	1	2	3	4	5	6	7	8	9	10
	172, 172, 173, 174, 178, 175, 175, 179, 179, -- 2 to 10
	179, 176, 181, 177, 177, 184, 184, 182, 183, 352, -- 11 to 20
	185, 354, 431, 402, 434, 456, 554, 554, 652, 2102, -- 21 to 30
	2102, 2051, 2103, 2103, 2052, 2106, 2003, 2004, 2005, 2158, -- 31 to 40
	5132, 5123, 2031, 2031, 2032, 5124, 7005, 7005, 2063, 5126, -- 41 to 50
	5126, 2034, 2034, 1001, 1301, 1002, 1002, 1303, 1303, 1003, -- 51 to 60
	1004, 2131, 1101, 1102, 1104, 1105, 1105, 1031, 1107, 2302, -- 61 to 70
	2202, 2202, 2304, 1063, 1064, 1035, 1068, 1066, 1070, 1071, -- 71 to 80
	2312, 2314, 2313, 1171, 2315, 1175, 1175, 1176, 1177, 1177, -- 81 to 90
}
hunting_quest.monsters_num0 = {
--	 1   2   3   4   5   6   7   8   9   10
	10, 20, 15, 10, 20, 10, 20, 15, 20, -- 2 to 10
	10, 15, 20, 15, 20, 15, 20, 10, 20, 20, -- 11 to 21
	20, 25, 20, 60, 80, 80, 30, 35, 40, 40, -- 21 to 30
	50, 45, 35, 40, 40, 20, 30, 40, 40, 40, -- 31 to 40
	40, 30, 40, 40, 50, 30, 35, 40, 40, 40, -- 41 to 50
	50, 45, 50, 40, 40, 50, 60, 45, 50, 45, -- 51 to 60
	60, 45, 50, 50, 40, 50, 55, 50, 50, 70, -- 61 to 70
	55, 60, 55, 50, 50, 45, 50, 50, 50, 55, -- 71 to 80
	55, 55, 45, 45, 60, 60, 60, 60, 60, 60, -- 81 to 90
}
hunting_quest.monsters_num1 = {
--	1	2	3	4	5	6	7	8	9	10
	5, 10, 5, 10, 10, 5, 10, 5, 10, -- 2 to 10
	5, 10, 5, 5, 10, 5, 10, 10, 10, 15, -- 11 to 20
	10, 10, 40, 80, 20, 20, 20, 30, 30, 30, -- 21 to 30
	45, 40, 30, 40, 30, 20, 20, 20, 30, 20, -- 31 to 40
	25, 30, 35, 40, 45, 30, 30, 35, 45, 20, -- 41 to 50
	30, 45, 50, 30, 35, 30, 40, 40, 45, 40, -- 51 to 60
	50, 55, 45, 45, 40, 45, 50, 50, 45, 55, -- 61 to 70
	55, 60, 55, 55, 50, 50, 50, 50, 45, 50, -- 71 to 80
	55, 45, 55, 60, 45, 50, 50, 50, 50, 40, -- 81 to 90
	
}
hunting_quest.yang_reward = {
	[1] = {1000,5000},
	[2] = {1000,5000},
	[3] = {1000,5000},
	[4] = {1000,5000},
	[5] = {1000,5000},
	[6] = {3000,7000},
	[7] = {3000,7000},
	[8] = {3000,7000},
	[9] = {3000,7000},
	[10] = {10000,20000},
	[11] = {10000,20000},
	[12] = {10000,20000},
	[13] = {10000,20000},
	[14] = {10000,20000},
	[15] = {10000,20000},
	[16] = {15000,25000},
	[17] = {15000,25000},
	[18] = {15000,25000},
	[19] = {15000,25000},
	[20] = {20000,40000},
	[21] = {20000,40000},
	[22] = {20000,40000},
	[23] = {20000,40000},
	[24] = {20000,40000},
	[25] = {20000,40000},
	[26] = {35000,70000},
	[27] = {35000,70000},
	[28] = {35000,70000},
	[29] = {35000,70000},
	[30] = {50000,90000},
	[31] = {50000,90000},
	[32] = {50000,90000},
	[33] = {50000,90000},
	[34] = {50000,90000},
	[35] = {50000,90000},
	[36] = {50000,90000},
	[37] = {50000,90000},
	[38] = {50000,90000},
	[39] = {50000,90000},
	[40] = {50000,90000},
	[41] = {50000,90000},
	[42] = {50000,90000},
	[43] = {50000,90000},
	[44] = {50000,90000},
	[45] = {50000,90000},
	[46] = {50000,90000},
	[47] = {50000,90000},
	[48] = {50000,90000},
	[49] = {50000,90000},
	[50] = {50000,90000},
	[51] = {50000,90000},
	[52] = {50000,90000},
	[53] = {50000,90000},
	[54] = {50000,90000},
	[55] = {50000,90000},
	[56] = {50000,90000},
	[57] = {50000,90000},
	[58] = {50000,90000},
	[59] = {50000,90000},
	[60] = {50000,90000},
	[61] = {50000,90000},
	[62] = {50000,90000},
	[63] = {50000,90000},
	[64] = {50000,90000},
	[65] = {50000,90000},
	[66] = {50000,90000},
	[67] = {50000,90000},
	[68] = {50000,90000},
	[69] = {50000,90000},
	[70] = {50000,90000},
	[71] = {50000,90000},
	[72] = {50000,90000},
	[73] = {50000,90000},
	[74] = {50000,90000},
	[75] = {50000,90000},
	[76] = {50000,90000},
	[77] = {50000,90000},
	[78] = {50000,90000},
	[79] = {50000,90000},
	[80] = {50000,90000},
	[81] = {50000,90000},
	[82] = {50000,90000},
	[83] = {50000,90000},
	[84] = {50000,90000},
	[85] = {50000,90000},
	[86] = {50000,90000},
	[87] = {50000,90000},
	[88] = {50000,90000},
	[89] = {50000,90000},
	[90] = {50000,90000},	
}
hunting_quest.exp_table = {
	[1] = 300,
	[2] = 800,
	[3] = 1500,
	[4] = 2500,
	[5] = 4300,
	[6] = 7200,
	[7] = 11000,
	[8] = 17000,
	[9] = 24000,
	[10] = 33000,
	[11] = 43000,
	[12] = 58000,
	[13] = 76000,
	[14] = 100000,
	[15] = 130000,
	[16] = 169000,
	[17] = 219000,
	[18] = 283000,
	[19] = 365000,
	[20] = 472000,
	[21] = 610000,
	[22] = 705000,
	[23] = 813000,
	[24] = 937000,
	[25] = 1077000,
	[26] = 1237000,
	[27] = 1418000,
	[28] = 1624000,
	[29] = 1857000,
	[30] = 2122000,
	[31] = 2421000,
	[32] = 2761000,
	[33] = 3145000,
	[34] = 3580000,
	[35] = 4073000,
	[36] = 4632000,
	[37] = 5194000,
	[38] = 5717000,
	[39] = 6264000,
	[40] = 6837000,
	[41] = 7600000,
	[42] = 8274000,
	[43] = 8990000,
	[44] = 9753000,
	[45] = 10560000,
	[46] = 11410000,
	[47] = 12320000,
	[48] = 13270000,
	[49] = 14280000,
	[50] = 15340000,
	[51] = 16870000,
	[52] = 18960000,
	[53] = 19980000,
	[54] = 21420000,
	[55] = 22930000,
	[56] = 24530000,
	[57] = 26200000,
	[58] = 27960000,
	[59] = 29800000,
	[60] = 32780000,
	[61] = 36060000,
	[62] = 39670000,
	[63] = 43640000,
	[64] = 48000000,
	[65] = 52800000,
	[66] = 58080000,
	[67] = 63890000,
	[68] = 70280000,
	[69] = 77310000,
	[70] = 85040000,
	[71] = 93540000,
	[72] = 102900000,
	[73] = 113500000,
	[74] = 121000000,
	[75] = 137000000,
	[76] = 150700000,
	[77] = 165700000,
	[78] = 236990000,
	[79] = 260650000,
	[80] = 286780000,
	[81] = 315000000,
	[82] = 346970000,
	[83] = 381680000,
	[84] = 419770000,
	[85] = 461760000,
	[86] = 508040000,
	[87] = 558740000,
	[88] = 614640000,
	[89] = 676130000,
	[90] = 743730000,
}

 

Link to post
  • 0

Oooh merci Calypso !

C'est super ça ! :D

 

Par contre j'ai un petit soucis :

/hunting_quest_en.quest:1:must start with 'quest'
Abort trap (core dumped)

 

Et pourtant la quête commence bien par :"quest" !

quest hunting_quest_en begin

 

Merci d'avance

 

Edited by Eristoff (see edit history)

En vous remerciant,

Cordialement, Eristoff

Link to post
  • 0

Merci d'avoir répondu aussi vite,

 

voici le fichier :

http://www.sendbox.fr/101cc6402d5839ab/hunting_quest_en.rar

 

EDIT 1: J'ai résolu le soucis en créant le fichier directement dans le FTP, je sais pas pourquoi ça fonctionne pas quand je le créer sur mon bureau...

 

Je vous remercie encore pour tout

 

Par contre la quête fonctionne bien mais comment je fais pour afficher le dessin des animaux dans la quête sous forme de parchemin comme le FR ?

 

Merci d'avance

Edited by Eristoff (see edit history)

En vous remerciant,

Cordialement, Eristoff

Link to post
  • 0

Alors je vais introduire, déjà si tu as tes propres dessins il faudra les mettre dans ton client (/ETC/ui/game/questboard)

Ensuite il va falloir ajouter tes mobs que tu veux faire tuer à ces lignes

special.levelup_quest = {

 

Pour ajouter une image de mob (juste le mob pas le parchemin j'y viendrai ensuite), il va falloir ajouter l'id de ton mobs et le nom de ton fichier à ces lignes

special.levelup_img = 
{
    [101] = "dog.tga",

Et enfin pour le parchemin tu devrais ajouter une fonction comme ceci

				setbgimage('level_bg.tga')

Level_bg étant l'image du parchemin vierge (sans le mob)

Link to post
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.