Jump to content

SEON BLACKSMITH MISSION BONUS DON'T APPLY


Go to solution Solved by Syreldar,

Recommended Posts

Hello, so I have this quest for Seon. You have to collect the item, same as biologist. After I finish delivering everything, I only get the apply.MAX_HP bonus  , the rest like apply.RESIST are not applying to my character.

quest collect_quest_lv96 begin
	state start begin
	end
	state run begin
		when login or levelup with pc.level >= 99 begin
			set_state(information)
		end	
	end

	state information begin
		when letter begin
			local v = find_npc_by_vnum(20091)
			if v != 0 then
				target.vid("__TARGET__", v, ""..mob_name(20091).."")
			end
				   send_letter("Cercetarile lui Seon")
		end

		when button or info begin
				say_title("Cercetarile lui Seon")
				say_verde("")
				say_verde(""..mob_name(20091).." vrea sa vorbeasca cu tine.")
				say_verde("Gaseste-l si ajuta-l cu cercetarile lui!")
		end
		
		when __TARGET__.target.click or
			20091.chat."Te rog, asculta-ma" begin
			target.delete("__TARGET__")
			---												   l
			say_title(""..mob_name(20091)..":")
			say_verde("")
			say_verde("Am nevoie de cineva ca si tine sa ma ajute")
			say_verde("cu cercetarile, in schimb pentru ajutorul oferit")
			say_verde("vei primii o recompensa pe cinste!")
			wait()
			say_title(""..mob_name(20091)..":")
			say_verde("")																						   
			say_verde("Acum studiez "..item_name(30253).."")
			say_verde("si am nevoie de 30 de bucati, ai putea sa ma ajuti?") 
			set_state(go_to_disciple)
			pc.setqf("duration",0)  -- Time limit
			pc.setqf("collect_count",0)--Items collected
			pc.setqf("drink_drug",0) --quest potion 1
		end
	end

	state go_to_disciple begin
		when letter begin
			  send_letter("Cercetarile lui Seon")
			
		end
		when button or info begin
			say_title("Cercetarile lui Seon")
			---												   l
			say_verde("")
			say_verde(""..mob_name(20091).." are nevoie de 30 bucati de "..item_name(30253).."")
			say_verde("")
			say_item_vnum(30253) 
			say_reward("Pana acum ai colectat "..pc.getqf("collect_count").." bucati.")
			say_verde("")
			if get_time() < pc.getqf("duration") then
				say_reward("Status:")
				say_reward(string.format("Trebuie sa mai astepti: %s ", get_time_remaining(pc.getqf("duration") - get_time())))
			else
				say_albastru2("Status:")
				say_albastru2("Cooldown is over, you can now deliver!")
			end
			wait()
			say_title("Cercetarile lui Seon")
			say_verde("")
			say_verde("You can obtain "..item_name(30253).." by hunting:")
			say_gm(""..mob_name(2412).."")
			say_gm(""..mob_name(2413).."")
		end
		
		when 71035.use begin 
			syschat("Scuze, acest item nu poate fi folosit pentru Cercetarile lui Seon!")
		end

		when 70030.use begin
			if get_time() > pc.getqf("redm_duration") then
				pc.setqf("monocles_used", 0)
			end
			if get_time() > pc.getqf("duration") then
				syschat("Nu este nici-un cooldown, poti livra.")
				return
			end
			if pc.getqf("monocles_used") > 9999 then
				syschat("Pentru aceasta cercetare, poti folosii acest item de 9999 ori!")
				return
			end
			if pc.getqf("monocles_used") == 0 then
				pc.setqf("redm_duration", get_time()+24*60*60)
			end
			if pc.count_item(70030)==0 then
				syschat("Nu ai acest item, nu incerca sa ne fraieresti, avem log-uri.")
				return
			end
			pc.remove_item(70030,1)
			pc.setqf("duration", get_time()-1)
			local use = pc.getqf("monocles_used")+1
			pc.setqf("monocles_used",use)
			syschat("Ai folosit cu succes monoclul, acum poti livra.")
		end

		when 2412.kill or
			 2413.kill  begin
			local s = number(1, 200)
			if s <= 15  then
				pc.give_item2(30253, 1)
			end	
		end

		
		when 20091.chat."Ai gasit ceva?" with pc.count_item(30253) >0   begin
			if get_time() > pc.getqf("duration") then
				if  pc.count_item(30253) >0 then
				say_title(""..mob_name(20091).."")
				say_verde("")
				say_verde("Ce ai acolo? Lasa-ma sa arunc o privire...")
				pc.remove_item(30253, 1)
				wait()
				
				local pass_percent
				if pc.getqf("drink_drug")==0 then
					pass_percent = 40
				else		
					pass_percent = 40
				end
				
				local s= number(1,100)
				if s<= pass_percent  then
				   if pc.getqf("collect_count")< 29 then	 --Less than 20 
						local index =pc.getqf("collect_count")+1 
						pc.setqf("collect_count",index)	 
						say_title(""..mob_name(20091)..":")
					   	say_verde("")
						say_verde("Aceasta bucata este excelenta, multumesc.")
						say_verde("")
						say_reward("Am nevoie inca de "..30-pc.getqf("collect_count").. " bucati.")
						say_verde("")
						say_albastru2("Adu-mi alta bucata de studiat in 3 ore.")
						if pc.get_gm_level() == 5 then
							pc.setqf("duration",get_time()+1) -- 1 secunda - STAFF ONLY
						else
							pc.setqf("duration",get_time()+60*60*3) -- 3 ore
						end
						pc.setqf("drink_drug",0)	 --Potion reset
						else
					pc.setqf("duration", 0) 
					say_title(""..mob_name(20091)..":")
					say_verde("")
					say_verde("Acum cercetarea mea legata de "..item_name(30251).." este gata")
					say_verde("multumesc, uite aici o recompensa pe masura!")
					say("")
					say_reward("Recompensa:")
					say_reward("Permanent bonus: +2000 Puncte Vitale(Max.HP)")
					say_reward("Permanent bonus: +8% rezistenta rase")
					pc.setqf("collect_count",30)
					affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
					affect.add_collect(apply.RESIST_WARRIOR, 8, 60*60*24*365*60)
					affect.add_collect(apply.RESIST_ASSASSIN, 8, 60*60*24*365*60)
					affect.add_collect(apply.RESIST_SURA, 8, 60*60*24*365*60)
					affect.add_collect(apply.RESIST_SHAMAN, 8, 60*60*24*365*60)
					pc.setqf("collect_count",0)
					pc.setqf("drink_drug",0)	
					pc.setqf("duration",0) 
					clear_letter()
					set_quest_state("collect_quest_lv99", "run")
					set_state(__complete2__)
					end
					return
				else								
				say_title(""..mob_name(20091)..":")
				say_verde("")
				say_reward("Aceasta bucata este stricata, nu am nici-o folosinta la ea..")
				pc.setqf("drink_drug",0)	 --Potion reset
				return
				end
				else
					say_title(""..mob_name(20091)..":")
					say_verde("")
					say_reward("Revin-o cand ai "..item_name(30253).."")
					return
				end
		  else
		  say_title(""..mob_name(20091)..":")
		  say_verde("")
		  say_reward(string.format("Trebuie sa mai astepti: %s ", get_time_remaining(pc.getqf("duration") - get_time())))
		  return
		end

	end
	end
	state __complete begin
	end
	state __complete2__ begin
	end
end

 

Link to comment
https://metin2.dev/topic/33028-seon-blacksmith-mission-bonus-dont-apply/
Share on other sites

  • Honorable Member
  • Solution

Make sure you don't have a mission, or something else like a lua-based pet-system, that gives the exact same amount of those specific bonuses. Or they will override eachother.

Ever wondered why one bio mission (lv30) gives 10% movement speed and another one (lv70) gives 11%? Well, there you go.

Edited by Syreldar

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

  • Premium
On 9/27/2024 at 4:56 AM, Syreldar said:

Make sure you don't have a mission, or something else like a lua-based pet-system, that gives the exact same amount of those specific bonuses. Or they will override eachother.

Ever wondered why one bio mission (lv30) gives 10% movement speed and another one (lv70) gives 11%? Well, there you go.

or just fix it:

	int affect_add_collect(lua_State * L)
	{
		if(!lua_isnumber(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3))
		{
			sys_err("add_collect wrong argument: int applyOn, int value, int duration");
			return 0;
		}

		CQuestManager & q = CQuestManager::instance();

		int applyOn = lua_tonumber(L, 1);

		LPCHARACTER ch = q.GetCurrentCharacterPtr();

		if(applyOn >= MAX_APPLY_NUM || applyOn < 1)
		{
			sys_err("apply is out of range : %d", applyOn);
			return 0;
		}

		int value = lua_tonumber(L, 2);
		int duration = lua_tonumber(L, 3);

		auto affect = ch->FindAffect(AFFECT_COLLECT, aApplyInfo[applyOn].bPointType);
		if(affect != nullptr)
		{
			value += affect->lApplyValue;
			ch->RemoveAffect(affect);
		}
		ch->AddAffect(AFFECT_COLLECT, aApplyInfo[applyOn].bPointType, value, 0, duration, 0, false);

		return 0;
	}

 

Edited by Intel
  • Love 2

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.