Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

Seon double stats BUG


TonisBoss

Question

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

  • Answers 15
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

15 answers to this question

Recommended Posts

  • 0
  • 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

  • 0
7 hours ago, xTryhard said:

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

Yes I see, but this could only "block" him from lvl but not from the quest. If someone pass 92 level, he could do reset again. Right?

Link to comment
Share on other sites

  • 0
  • Premium
Just now, TonisBoss said:

Yes I see, but this could only "block" him from lvl but not from the quest. If someone pass 92 level, he could do reset again. Right?

if you want to do it once use a questflag

Link to comment
Share on other sites

  • 0
  • 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

  • 0
  • Premium
Just now, TonisBoss said:

And how could I do that. I 'm a bit newbie, if you would like to help a bit.

i can see in your quest you start the quest and you can talk to the npc but where is the part to complete the task ?

Link to comment
Share on other sites

  • 0
  • 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

  • 0
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

  • 0
  • 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

  • 0
  • 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

  • 0
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

  • 0
  • 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

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


  • Activity

    1. 0

      Where are those maps/dungeons coming from?

    2. 4

      Visual studio 2022 compiling issue

    3. 1

      Count players function

    4. 64
    5. 1

      Costume shining/costume effect system

    6. 992

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    7. 3

      Biologist Manager (C++ & LUA)

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