Jump to content

Seon double stats BUG


Recommended Posts

I have problem with Seon. I've made a quest for resetting the bonus, but you could reset before even you get the quest and at the 94 lvl you could get double bonus. Also how could I reset them from Navicat -> Quest table.
Reset quest :
 

quest collect_quest_reset begin
	state start begin
		when login with pc.level >= 92 begin
			if tostring(get_quest_state("collect_quest_lv92")) == "557528158" or
				tostring(get_quest_state("collect_quest_lv94")) == "557528158" then 
				set_state( check_reset_able )
			end
		end
	end
	
	state check_reset_able begin
			when 20091.chat."92LVL RESET" with pc.count_item(30318) > 0  begin
			if pc.count_item(30318) > 0 then 
				affect.remove_collect(1, 1000)
				affect.remove_collect(apply.DEF_GRADE_BONUS, 120)
				affect.remove_collect(apply.ATT_GRADE_BONUS, 51)
					local s = select(gameforge.collect_quest_lv92._220_1_select, gameforge.collect_quest_lv92._220_2_select, gameforge.collect_quest_lv92._220_3_select)
					if 1 == s then
						affect.add_collect(1,1000,60*60*24*365*60) -- hp index == 1, hp +1000
						pc.setqf("reward", 1)
					elseif 2 == s then
						affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
						pc.setqf("reward", 2)
					elseif 3 == s then 
						affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60*60*24*365*60)
						pc.setqf("reward", 3)
					pc.remove_item(30318, 1)
					set_state( check_reset_able )
				return
				else
				return
				end
			end
		end
		when 20091.chat."94LVL RESET" with pc.count_item(30318) > 0  begin
			if pc.count_item(30318) > 0 then 
				affect.remove_collect(1, 1100)
				affect.remove_collect(apply.DEF_GRADE_BONUS, 140)
				affect.remove_collect(apply.ATT_GRADE_BONUS, 60)
				local s = select(gameforge.collect_quest_lv94._230_1_select, gameforge.collect_quest_lv94._230_2_select, gameforge.collect_quest_lv94._230_3_select)
				if 1 == s then
					affect.add_collect(1, 1100, 60*60*24*365*60) -- hp apply index == 1
					pc.setqf("reward", 1)
				elseif 2 == s then
					affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60*60*24*365*60) 
					pc.setqf("reward", 2)
				elseif 3 == s then 
					affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60*60*24*365*60) 
					pc.setqf("reward", 3)
					pc.remove_item(30318, 1)
					set_state( check_reset_able )
				return
				else
				return
				end
			end
		end
	end
end

Thanks in advance.

Link to comment
Share on other sites

  • Replies 15
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Premium
8 hours ago, TonisBoss said:

I have problem with Seon. I've made a quest for resetting the bonus, but you could reset before even you get the quest and at the 94 lvl you could get double bonus. Also how could I reset them from Navicat -> Quest table.
Reset quest :
 

quest collect_quest_reset begin
	state start begin
		when login with pc.level >= 92 begin
			if tostring(get_quest_state("collect_quest_lv92")) == "557528158" or
				tostring(get_quest_state("collect_quest_lv94")) == "557528158" then 
				set_state( check_reset_able )
			end
		end
	end
	
	state check_reset_able begin
			when 20091.chat."92LVL RESET" with pc.count_item(30318) > 0  begin
			if pc.count_item(30318) > 0 then 
				affect.remove_collect(1, 1000)
				affect.remove_collect(apply.DEF_GRADE_BONUS, 120)
				affect.remove_collect(apply.ATT_GRADE_BONUS, 51)
					local s = select(gameforge.collect_quest_lv92._220_1_select, gameforge.collect_quest_lv92._220_2_select, gameforge.collect_quest_lv92._220_3_select)
					if 1 == s then
						affect.add_collect(1,1000,60*60*24*365*60) -- hp index == 1, hp +1000
						pc.setqf("reward", 1)
					elseif 2 == s then
						affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60*60*24*365*60)
						pc.setqf("reward", 2)
					elseif 3 == s then 
						affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60*60*24*365*60)
						pc.setqf("reward", 3)
					pc.remove_item(30318, 1)
					set_state( check_reset_able )
				return
				else
				return
				end
			end
		end
		when 20091.chat."94LVL RESET" with pc.count_item(30318) > 0  begin
			if pc.count_item(30318) > 0 then 
				affect.remove_collect(1, 1100)
				affect.remove_collect(apply.DEF_GRADE_BONUS, 140)
				affect.remove_collect(apply.ATT_GRADE_BONUS, 60)
				local s = select(gameforge.collect_quest_lv94._230_1_select, gameforge.collect_quest_lv94._230_2_select, gameforge.collect_quest_lv94._230_3_select)
				if 1 == s then
					affect.add_collect(1, 1100, 60*60*24*365*60) -- hp apply index == 1
					pc.setqf("reward", 1)
				elseif 2 == s then
					affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60*60*24*365*60) 
					pc.setqf("reward", 2)
				elseif 3 == s then 
					affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60*60*24*365*60) 
					pc.setqf("reward", 3)
					pc.remove_item(30318, 1)
					set_state( check_reset_able )
				return
				else
				return
				end
			end
		end
	end
end

Thanks in advance.

when 20091.chat."92LVL RESET" with pc.count_item(30318) > 0 and pc.get_level() >= 92 begin

Link to comment
Share on other sites

  • Premium
6 minutes ago, TonisBoss said:

No, I want it for multiple times,but i want it to do,when the 92 or 94 quest ends. 

so use a questflag and ask if the quest is done if it is you can reset if not you cant

why do you convert the questflag to a string? questflags are Integer you dont have to convert it

Edited by xTryhard
Link to comment
Share on other sites

  • Premium
Just now, TonisBoss said:

Isn't this set the state to complete the task? 

					set_state( check_reset_able )

 

quest collect_quest_reset begin
	state start begin
		when login with pc.level >= 92 begin
		if get_quest_state("collect_quest_lv92") == 557528158 or
			get_quest_state("collect_quest_lv94") == 557528158 then
			set_state(check_reset_able)
		end
	end
	state check_reset_able begin
		when 20091.chat."92LVL RESET" with pc.count_item(30318) > 0 and get_quest_state("task_done") == 1 begin
			if pc.count_item(30318) > 0 then
				affect.remove_collect(1, 1000)
				affect.remove_collect(apply.DEF_GRADE_BONUS, 120)
				affect.remove_collect(apply.ATT_GRADE_BONUS, 51)
				local s = select(gameforge.collect_quest_lv92._220_1_select, gameforge.collect_quest_lv92._220_2_select, gameforge.collect_quest_lv92._220_3_select)
				if 1 == s then
					affect.add_collect(1, 1000, 60 * 60 * 24 * 365 * 60) --hp index == 1, hp + 1000
					pc.setqf("reward", 1)
				elseif 2 == s then
					affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60 * 60 * 24 * 365 * 60)
					pc.setqf("reward", 2)
				elseif 3 == s then
					affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60 * 60 * 24 * 365 * 60)
					pc.setqf("reward", 3)
					pc.remove_item(30318, 1)
					set_state(check_reset_able)
					return
					else
					return
				end
			end
		end
	end
end
when 20091.chat."94LVL RESET" with pc.count_item(30318) > 0 and get_quest_state("task_done") == 1 begin
	if pc.count_item(30318) > 0 then
		affect.remove_collect(1, 1100)
		affect.remove_collect(apply.DEF_GRADE_BONUS, 140)
		affect.remove_collect(apply.ATT_GRADE_BONUS, 60)
		local s = select(gameforge.collect_quest_lv94._230_1_select, gameforge.collect_quest_lv94._230_2_select,  gameforge.collect_quest_lv94._230_3_select)
		if 1 == s then
			affect.add_collect(1, 1100, 60 * 60 * 24 * 365 * 60) --hp apply index == 1
			pc.setqf("reward", 1)
		elseif 2 == s then
			affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60 * 60 * 24 * 365 * 60)
			pc.setqf("reward", 2)
		elseif 3 == s then
			affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60 * 60 * 24 * 365 * 60)
			pc.setqf("reward", 3)
			pc.remove_item(30318, 1)
			set_state(check_reset_able)
			return
			else
			return
		end
	end
end

try this after the task is done you have to set the questflag "task_done" to 1

Link to comment
Share on other sites

3 minutes ago, xTryhard said:
quest collect_quest_reset begin
	state start begin
		when login with pc.level >= 92 begin
		if get_quest_state("collect_quest_lv92") == 557528158 or
			get_quest_state("collect_quest_lv94") == 557528158 then
			set_state(check_reset_able)
		end
	end
	state check_reset_able begin
		when 20091.chat."92LVL RESET" with pc.count_item(30318) > 0 and get_quest_state("task_done") == 1 begin
			if pc.count_item(30318) > 0 then
				affect.remove_collect(1, 1000)
				affect.remove_collect(apply.DEF_GRADE_BONUS, 120)
				affect.remove_collect(apply.ATT_GRADE_BONUS, 51)
				local s = select(gameforge.collect_quest_lv92._220_1_select, gameforge.collect_quest_lv92._220_2_select, gameforge.collect_quest_lv92._220_3_select)
				if 1 == s then
					affect.add_collect(1, 1000, 60 * 60 * 24 * 365 * 60) --hp index == 1, hp + 1000
					pc.setqf("reward", 1)
				elseif 2 == s then
					affect.add_collect(apply.DEF_GRADE_BONUS, 120, 60 * 60 * 24 * 365 * 60)
					pc.setqf("reward", 2)
				elseif 3 == s then
					affect.add_collect(apply.ATT_GRADE_BONUS, 51, 60 * 60 * 24 * 365 * 60)
					pc.setqf("reward", 3)
					pc.remove_item(30318, 1)
					set_state(check_reset_able)
					return
					else
					return
				end
			end
		end
	end
end
when 20091.chat."94LVL RESET" with pc.count_item(30318) > 0 and get_quest_state("task_done") == 1 begin
	if pc.count_item(30318) > 0 then
		affect.remove_collect(1, 1100)
		affect.remove_collect(apply.DEF_GRADE_BONUS, 140)
		affect.remove_collect(apply.ATT_GRADE_BONUS, 60)
		local s = select(gameforge.collect_quest_lv94._230_1_select, gameforge.collect_quest_lv94._230_2_select,  gameforge.collect_quest_lv94._230_3_select)
		if 1 == s then
			affect.add_collect(1, 1100, 60 * 60 * 24 * 365 * 60) --hp apply index == 1
			pc.setqf("reward", 1)
		elseif 2 == s then
			affect.add_collect(apply.DEF_GRADE_BONUS, 140, 60 * 60 * 24 * 365 * 60)
			pc.setqf("reward", 2)
		elseif 3 == s then
			affect.add_collect(apply.ATT_GRADE_BONUS, 60, 60 * 60 * 24 * 365 * 60)
			pc.setqf("reward", 3)
			pc.remove_item(30318, 1)
			set_state(check_reset_able)
			return
			else
			return
		end
	end
end

try this after the task is done you have to set the questflag "task_done" to 1

Okay,i will test it.Thank you.
And how could I reset the seon quests from the players at navicat to start the quests again?

Link to comment
Share on other sites

  • Premium
1 minute ago, TonisBoss said:

Okay,i will test it.Thank you.
And how could I reset the seon quests from the players at navicat to start the quests again?

you can also use a questflag for this and reset it to 0 in the database 
if you want to reset it in the game you can just go back to state start

Link to comment
Share on other sites

  • Premium
8 minutes ago, TonisBoss said:

no you can do it like this

 

quest test begin
	state start begin
		when login with pc.get_quest_flag("Test") ==0 begin
		
		end
	end
end

when you complete the task you set the quest flag "Test" to 1 and you can reset it in the database

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

3 minutes ago, xTryhard said:

no you can do it like this

 

quest test begin
	state start begin
		when login with get_quest_flag("Test") ==0 begin
		
		end
	end
end

when you complete the task you set the quest flag "Test" to 1 and you can reset it in the database

Sorry for bothering, but could this reset the reward and give the quest again? I want to "delete" the collect_quest_lv92 & collect_quest_lv94 from all players because many of them did the bug. For a new start.

Link to comment
Share on other sites

  • Premium
1 minute ago, TonisBoss said:

Sorry for bothering, but could this reset the reward and give the quest again? I want to "delete" the collect_quest_lv92 & collect_quest_lv94 from all players because many of them did the bug. For a new start.

yes this will reset the quest again if you do it like this if you want to "delete" the quest after complete the task just use something like this
 

	set_state(end)

state end begin
end

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 8

      ZycloniusMT2 Server from Australia still around

    2. 60

      Inbuild GR2 Animation

    3. 2

      wait() function bug

    4. 0

      Remove Party Role Bonuses

    5. 1

      Fix CBar3D

    6. 2

      set_quest_state not working

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.