TonisBoss 16 Posted February 6, 2022 Share Posted February 6, 2022 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 More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 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 More sharing options...
TonisBoss 16 Posted February 7, 2022 Author Share Posted February 7, 2022 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 More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 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 More sharing options...
TonisBoss 16 Posted February 7, 2022 Author Share Posted February 7, 2022 No, I want it for multiple times,but i want it to do,when the 92 or 94 quest ends. Link to comment Share on other sites More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 (edited) 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 February 7, 2022 by xTryhard Link to comment Share on other sites More sharing options...
TonisBoss 16 Posted February 7, 2022 Author Share Posted February 7, 2022 And how could I do that. I 'm a bit newbie, if you would like to help a bit. Link to comment Share on other sites More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 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 More sharing options...
TonisBoss 16 Posted February 7, 2022 Author Share Posted February 7, 2022 Isn't this set the state to complete the task? set_state( check_reset_able ) Link to comment Share on other sites More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 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 More sharing options...
TonisBoss 16 Posted February 7, 2022 Author Share Posted February 7, 2022 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 More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 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 More sharing options...
TonisBoss 16 Posted February 7, 2022 Author Share Posted February 7, 2022 (edited) https://metin2.download/picture/33eI1rIOJfFHwC0G4ZbI2j2FwI2VUU7K/.png I just set the _status to "0"? Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 (edited) 8 minutes ago, TonisBoss said: https://metin2.download/picture/572rgAJwPP20L285sObDTMSNmOih2cTK/.png I just set the _status to "0"? 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 September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
TonisBoss 16 Posted February 7, 2022 Author Share Posted February 7, 2022 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 More sharing options...
Premium xTryhard 12 Posted February 7, 2022 Premium Share Posted February 7, 2022 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now