Honorable Member Mali 41912 Posted November 30, 2020 Honorable Member Share Posted November 30, 2020 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) 238 2 1 5 1 1 5 2 3 1 64 16 145 Link to comment Share on other sites More sharing options...
Management AZICKO 7351 Posted November 30, 2020 Management Share Posted November 30, 2020 You are creating the 25000th topic! 1 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
LykosRuleZ 3 Posted November 30, 2020 Share Posted November 30, 2020 As always, good job! Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19685 Posted November 30, 2020 Honorable Member Share Posted November 30, 2020 (edited) Try to avoid python memory leaks with lambdas in setevent. Button.SetToggleDownEvent(ui.__mem_func__(self.__OnClickPickUpFilterButton), Index) Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Mali 41912 Posted November 30, 2020 Author Honorable Member Share Posted November 30, 2020 (edited) 8 minutes ago, xP3NG3Rx said: Try to avoid python memory leaks with lambdas in setevent. Button.SetToggleDownEvent(ui.__mem_func__(self.__OnClickPickUpFilterButton), Index) i will use my vegas wildcard. @VegaS™ Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 2 3 Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19685 Posted November 30, 2020 Honorable Member Share Posted November 30, 2020 Ahh okay, I see. Old shit class from 2004: Spoiler class ToggleButton(Button): def __init__(self): Button.__init__(self) self.eventUp = None self.eventDown = None def __del__(self): Button.__del__(self) self.eventUp = None self.eventDown = None def SetToggleUpEvent(self, event): self.eventUp = event def SetToggleDownEvent(self, event): self.eventDown = event def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterToggleButton(self, layer) def OnToggleUp(self): if self.eventUp: self.eventUp() def OnToggleDown(self): if self.eventDown: self.eventDown() From 2018: Spoiler class ToggleButton(Button): def __init__(self): Button.__init__(self) self.eventUp = None self.eventDown = None self.eventUpArgs = None self.eventDownArgs = None def __del__(self): Button.__del__(self) self.eventUp = None self.eventDown = None def SetToggleUpEvent(self, event, *args): self.eventUp = event self.eventUpArgs = args def SetToggleDownEvent(self, event, *args): self.eventDown = event self.eventDownArgs = args def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterToggleButton(self, layer) def OnToggleUp(self): if self.eventUp: if self.eventUpArgs: apply(self.eventUp, self.eventUpArgs) else: self.eventUp() def OnToggleDown(self): if self.eventDown: if self.eventDownArgs: apply(self.eventDown, self.eventDownArgs) else: self.eventDown() 1 1 4 Link to comment Share on other sites More sharing options...
Johnny69 366 Posted December 1, 2020 Share Posted December 1, 2020 (edited) Good job. One sugestion: Use a BYTE for all filters or a 16 bits type (if it's not enough). You can easly set on every bit of the variable a flag value (0 = not set, 1 = set) and it's more optimized and easier to store in config. Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41912 Posted December 1, 2020 Author Honorable Member Share Posted December 1, 2020 (edited) 1 hour ago, Johnny69 said: Good job. One sugestion: Use a BYTE for all filters or a 16 bits type (if it's not enough). You can easly set on every bit of the variable a flag value (0 = not set, 1 = set) and it's more optimized and easier to store in config. Bitset is more useful for this system, I used it in the update. Thanks anyway. Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
DrTurk 133 Posted December 1, 2020 Share Posted December 1, 2020 Thanks for the release. There is also a pickupfilter system via serverside from Sanii, its free and i'm using it for about 4 months now, no problem at all works like a charm. Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19685 Posted December 1, 2020 Honorable Member Share Posted December 1, 2020 This pickupfilter thing is like switchbot, doesn't matter how many versions are public. Always wanted. Propose me if I'm wrong 5 Link to comment Share on other sites More sharing options...
Metin2Cosmos 0 Posted December 11, 2020 Share Posted December 11, 2020 In my case are picking up the objects but not filtering them Can anyone help me please? 1 Link to comment Share on other sites More sharing options...
Active Member Klaus 158 Posted August 25, 2021 Active Member Share Posted August 25, 2021 (edited) It works perfectly! Is it possible to change it to when the item is locked and click on it to pick up? In other words, leave the filter only on the 'Z' key? Edit: I would like to make more precise checks, looking at the item's subtype, how can I use type and subtype at the same time? IsWearableFlag(CItemData::WEARABLE_SHIELD): return 9; Edited August 26, 2021 by Klaus Link to comment Share on other sites More sharing options...
Fluff99s 0 Posted September 16, 2021 Share Posted September 16, 2021 it is working good, but how can i add after i choose to/or not to pick an object to print a message in console to inform me? Link to comment Share on other sites More sharing options...
Serotonin 0 Posted September 26, 2021 Share Posted September 26, 2021 On 8/25/2021 at 4:33 PM, Klaus said: It works perfectly! Is it possible to change it to when the item is locked and click on it to pick up? In other words, leave the filter only on the 'Z' key? Edit: I would like to make more precise checks, looking at the item's subtype, how can I use type and subtype at the same time? IsWearableFlag(CItemData::WEARABLE_SHIELD): return 9; I'm following the same questions. Thanks! Link to comment Share on other sites More sharing options...
Honorable Member Mali 41912 Posted November 18, 2021 Author Honorable Member Share Posted November 18, 2021 (edited) #Update: Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 2 5 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41912 Posted November 19, 2021 Author Honorable Member Share Posted November 19, 2021 (edited) Spoiler -) Costume Category(BODY, HAIR) -) Skillforget +) Chest(GIFTBOX) +) Potion(USE_POTION, USE_ABILITY_UP, USE_POTION_NODELAY, USE_POTION_CONTINUE) +) Material +) Picking Method Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 1 2 Link to comment Share on other sites More sharing options...
rares2017 31 Posted November 20, 2021 Share Posted November 20, 2021 (edited) It works perfectly https://metin2.download/picture/T7fxsBLs5oSl9uZ3SIte3kWFwG951l30/.png Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 500 Posted November 20, 2021 Active+ Member Share Posted November 20, 2021 (edited) 33 minutes ago, rares2017 said: It works perfectly https://metin2.download/picture/T7fxsBLs5oSl9uZ3SIte3kWFwG951l30/.png I have this error, do you know how to solve it? https://metin2.download/picture/PzF9oR0lJ8vytSpwvBrzW2M15l2na3H8/.png Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
rares2017 31 Posted November 20, 2021 Share Posted November 20, 2021 (edited) 16 minutes ago, SCOOB said: I have this error, do you know how to solve it? https://metin2.download/picture/PzF9oR0lJ8vytSpwvBrzW2M15l2na3H8/.png #include "../gamelib/ItemData.h" in PythonSystem.h Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Mali 41912 Posted November 20, 2021 Author Honorable Member Share Posted November 20, 2021 (edited) 21 minutes ago, SCOOB said: I have this error, do you know how to solve it? https://metin2.download/picture/PzF9oR0lJ8vytSpwvBrzW2M15l2na3H8/.png https://en.cppreference.com/w/cpp/language/constexpr Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 500 Posted November 20, 2021 Active+ Member Share Posted November 20, 2021 (edited) 3 minutes ago, Mali said: https://en.cppreference.com/w/cpp/language/constexpr oh okay, so I need to update my binary source. got it. Any work-around it until then? Thanks. What about const auto? Edited November 20, 2021 by SCOOB Link to comment Share on other sites More sharing options...
rares2017 31 Posted November 20, 2021 Share Posted November 20, 2021 1 minute ago, SCOOB said: oh okay, so I need to update my binary source. got it. Any work-around it until then? Thanks. I had this problem too and it was solved with #include "../gamelib/ItemData.h" in PythonSystem.h Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 500 Posted November 20, 2021 Active+ Member Share Posted November 20, 2021 (edited) 2 minutes ago, rares2017 said: I had this problem too and it was solved with #include "../gamelib/ItemData.h" in PythonSystem.h I tried but it shows the same error can you please share with me your pythonsystem.h? also, do you have VS22 ? Edited November 20, 2021 by SCOOB Link to comment Share on other sites More sharing options...
rares2017 31 Posted November 20, 2021 Share Posted November 20, 2021 (edited) 2 minutes ago, SCOOB said: I tried but it shows the same error https://metin2.download/picture/m8H83at85155R2AM7T7V0WJu0u0y8gx0/.png Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 500 Posted November 20, 2021 Active+ Member Share Posted November 20, 2021 (edited) Yeah.. I still have VS2013 so if someone can find a fix for the errors on this vs version, that would be awesome. If not, no problem. Solved Thanks @ Malifor the tips! If anyone has this problem: Comment the static constexpr line from the header file and then go to the cpp file: Search for: inputFile.open and outputFile.open and then change them like this: inputFile.open("pickupfile.dat", std::ios::binary); outputFile.open("pickupfile.dat", std::ios::binary); Edited November 20, 2021 by SCOOB 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts