HisaoShou 3 Posted July 28, 2017 Share Posted July 28, 2017 I'd like to know how I could stack affect.add ? At the moment , the function work only once, it does not stack if another affect.add is added over . How can I make it work? OR, is there any other way to give a permanent bonus to the player which stacks? Link to comment Share on other sites More sharing options...
ElBrujoo 4 Posted July 30, 2017 Share Posted July 30, 2017 If you want a bonus that is stacked like chaegirab you can use affect.add_collect(), i think it s the simplest way Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted July 30, 2017 Author Share Posted July 30, 2017 Acum 6 ore, ElBrujoo a spus: If you want a bonus that is stacked like chaegirab you can use affect.add_collect(), i think it s the simplest way It doesn't stack. affect.add_collect() + affect.add_collect() = don't stack affect.add_collect() + affect.add() = stack ONCE I need them to be stacking more, like affect.add_collect() + affect.add_collect() + affect.add_collect() + affect.add_collect() and so on Link to comment Share on other sites More sharing options...
ElBrujoo 4 Posted July 31, 2017 Share Posted July 31, 2017 19 hours ago, HisaoShou said: It doesn't stack. affect.add_collect() + affect.add_collect() = don't stack affect.add_collect() + affect.add() = stack ONCE I need them to be stacking more, like affect.add_collect() + affect.add_collect() + affect.add_collect() + affect.add_collect() and so on That's EXACTLY what the affect.add_collect() is supposed to do. However to be 100% sure I tested and it worked stacking a bonus. If you still can't make it work I could help you on skype-> xelbrujoox Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted July 31, 2017 Author Share Posted July 31, 2017 Acum 2 ore, ElBrujoo a spus: That's EXACTLY what the affect.add_collect() is supposed to do. However to be 100% sure I tested and it worked stacking a bonus. If you still can't make it work I could help you on skype-> xelbrujoox Ok , then try to stack exactly the same values. Try this: affect.add_collect(apply.INT,10,60*60*24*300*59) + affect.add_collect(apply.INT,10,60*60*24*300*59) + affect.add_collect(apply.INT,10,60*60*24*300*59) It won't stack more than two times. Link to comment Share on other sites More sharing options...
ElBrujoo 4 Posted July 31, 2017 Share Posted July 31, 2017 (edited) Maybe your affect collect function is not the same as mine but i don t think that s the case. I ve tested however and all works: Before all: Spoiler Then the npc: Spoiler I pressed "Stack mob": Spoiler and then the stack mob 2: Spoiler what they do is this: when 20094.chat."stack mob" begin say("Ok") affect.add_collect(apply.INT,10,60*60*24*300*59) end when 20094.chat."stack mob 2" begin say("Ok") affect.add_collect(apply.INT,10,60*60*24*300*59) affect.add_collect(apply.INT,10,60*60*24*300*59) affect.add_collect(apply.INT,10,60*60*24*300*59) end If u need help i'll wait you on skype PS: by the way I pressed the mob stack two times more, the stack 2 added only 30 int. Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Distraught 5903 Posted August 1, 2017 Honorable Member Share Posted August 1, 2017 questlua_affect.cpp search for: int affect_add(lua_State * L) delete this part: if (ch->FindAffect(AFFECT_QUEST_START_IDX, applyOn)) // 퀘스트로 인해 같은 곳에 효과가 걸려있으면 스킵 return 0; 2 Link to comment Share on other sites More sharing options...
Mefarious 2 Posted May 23, 2022 Share Posted May 23, 2022 Can i refresh this topic? Im trying to stack by affect_collect, i even deleted part above and bonuses dont stack. It wont stack if i get same bonus value, for example: 10 movement speed, i can take 2x 10 movement and get 20, but if i relog, teleport to other map bonuses are reset to 10 i can stack different values, 1 2 3 4 5 etc but if i add 1 2 3 5 5 6 7 6 then i will get only 24 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