Jump to content

Hunting Quests - Level 2 to 90


Recommended Posts

M2 Download Center

Download Here ( Internal )

Good Day!
Composed by 2 files, hunting_quest_en.quest and questlib.lua

Hunting_quest_en.quest

 

Spoiler
--###################################
--#      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

 

Spoiler
--###################################
--#      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,
}

 

 

Download LINK: https://mega.co.nz/#!FhcnlYjA!oce78L5cAgyqDpFJ950bhYXTiXS24Dv8dBoBqpQuPLE

The password is my nickname.

  • Love 8
Link to comment
  • 1 month later...

Download dont work ;/

 

 

And i have problem when mission is complete and open reward quest i dont get yang exp (reward)

 

Whay?

 

 

I get next mision but any reward again and again...

 

console

mPAyLHk.pngmPAyLHk.png

 

 

and how add how many left to quest list on "v"

 

 

Link to comment
  • 1 year later...
  • 5 months later...
  • 1 year later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.