Contributor Rakancito 4816 Posted September 27, 2019 Contributor Share Posted September 27, 2019 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 ) Hi guys, I observed that a person asked for the car pick with filters but they didn't give him the correct answer, and that some cheats have it, here is an example, i tested it in my Test Server and it works correctly, i hope not forgot to add some part of the code since. I finished the system a while ago, if you have one error tell me and i will resolve . 82 1 1 2 2 1 1 2 1 1 27 6 53 Link to comment Share on other sites More sharing options...
Syriza 234 Posted September 27, 2019 Share Posted September 27, 2019 I already have my own. But still thank you Brother Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10266 Posted September 28, 2019 Forum Moderator Share Posted September 28, 2019 The idea isn't so bad, but the code has too many useless lines, here's what you can do to improve it. def RefreshPickupFilter(self): #Weapon if systemSetting.IsPickUpFilterWeapon(): self.PickUpFilterList[0].Down() else: self.PickUpFilterList[0].SetUp() #Armor if systemSetting.IsPickUpFilterArmor(): self.PickUpFilterList[1].Down() else: self.PickUpFilterList[1].SetUp() #Ear if systemSetting.IsPickUpFilterEar(): self.PickUpFilterList[2].Down() else: self.PickUpFilterList[2].SetUp() #Neck if systemSetting.IsPickUpFilterNeck(): self.PickUpFilterList[3].Down() else: self.PickUpFilterList[3].SetUp() #Foots if systemSetting.IsPickUpFilterFoots(): self.PickUpFilterList[4].Down() else: self.PickUpFilterList[4].SetUp() #Shield if systemSetting.IsPickUpFilterShield(): self.PickUpFilterList[5].Down() else: self.PickUpFilterList[5].SetUp() #Book if systemSetting.IsPickUpFilterBook(): self.PickUpFilterList[6].Down() else: self.PickUpFilterList[6].SetUp() #Stone if systemSetting.IsPickUpFilterStone(): self.PickUpFilterList[7].Down() else: self.PickUpFilterList[7].SetUp() #Etc if systemSetting.IsPickUpFilterEtc(): self.PickUpFilterList[8].Down() else: self.PickUpFilterList[8].SetUp() To: def RefreshPickupFilter(self): checkFilterList = ( systemSetting.IsPickUpFilterWeapon(), systemSetting.IsPickUpFilterArmor(), systemSetting.IsPickUpFilterEar(), systemSetting.IsPickUpFilterNeck(), systemSetting.IsPickUpFilterFoots(), systemSetting.IsPickUpFilterShield(), systemSetting.IsPickUpFilterBook(), systemSetting.IsPickUpFilterStone(), systemSetting.IsPickUpFilterEtc() ) for child, flag in zip(self.PickUpFilterList, checkFilterList): if flag: child.Down() else: child.SetUp() self.PickUpFilterList.append(GetObject("Pick_Up_FilterWeapon")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterArmor")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterEar")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterNeck")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterFoots")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterShield")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterBook")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterStone")) self.PickUpFilterList.append(GetObject("Pick_Up_FilterEtc")) To: for name in ('Weapon','Armor','Ear','Neck','Foots','Shield','Book','Stone','Etc'): self.PickUpFilterList.append(GetObject("Pick_Up_Filter{}".format(name))) self.PickUpFilterList[0].SetToggleUpEvent(self.__OnClickPickupFilterButtonWeapon) # Weapon self.PickUpFilterList[0].SetToggleDownEvent(self.__OnClickPickupFilterButtonWeapon) # Weapon self.PickUpFilterList[1].SetToggleUpEvent(self.__OnClickPickupFilterButtonArmor) # Armor self.PickUpFilterList[1].SetToggleDownEvent(self.__OnClickPickupFilterButtonArmor) # Armor self.PickUpFilterList[2].SetToggleUpEvent(self.__OnClickPickupFilterButtonEar) # Ear self.PickUpFilterList[2].SetToggleDownEvent(self.__OnClickPickupFilterButtonEar) # Ear self.PickUpFilterList[3].SetToggleUpEvent(self.__OnClickPickupFilterButtonNeck) # Neck self.PickUpFilterList[3].SetToggleDownEvent(self.__OnClickPickupFilterButtonNeck) # Neck self.PickUpFilterList[4].SetToggleUpEvent(self.__OnClickPickupFilterButtonFoots) # Foots self.PickUpFilterList[4].SetToggleDownEvent(self.__OnClickPickupFilterButtonFoots) # Foots self.PickUpFilterList[5].SetToggleUpEvent(self.__OnClickPickupFilterButtonShield) # Shield self.PickUpFilterList[5].SetToggleDownEvent(self.__OnClickPickupFilterButtonShield) # Shield self.PickUpFilterList[6].SetToggleUpEvent(self.__OnClickPickupFilterButtonBook) # Books self.PickUpFilterList[6].SetToggleDownEvent(self.__OnClickPickupFilterButtonBook) # Books self.PickUpFilterList[7].SetToggleUpEvent(self.__OnClickPickupFilterButtonStone) # Stone self.PickUpFilterList[7].SetToggleDownEvent(self.__OnClickPickupFilterButtonStone) # Stone self.PickUpFilterList[8].SetToggleUpEvent(self.__OnClickPickupFilterButtonEtc) # Etc self.PickUpFilterList[8].SetToggleDownEvent(self.__OnClickPickupFilterButtonEtc) # Etc To: eventFuncList = ( self.__OnClickPickupFilterButtonWeapon, self.__OnClickPickupFilterButtonArmor, self.__OnClickPickupFilterButtonEar, self.__OnClickPickupFilterButtonNeck, self.__OnClickPickupFilterButtonFoots, self.__OnClickPickupFilterButtonShield, self.__OnClickPickupFilterButtonBook, self.__OnClickPickupFilterButtonStone, self.__OnClickPickupFilterButtonEtc ) for child, event in zip(self.PickUpFilterList, eventFuncList): child.SetToggleUpEvent(event) child.SetToggleDownEvent(event) 25 2 1 1 8 4 42 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Premium mackabro2 216 Posted October 16, 2019 Premium Share Posted October 16, 2019 Thanks, but this function is missing. Link to comment Share on other sites More sharing options...
Tallywa 35 Posted November 1, 2019 Share Posted November 1, 2019 miss this fonction GetCloseItemVector in pythonitem.h Link to comment Share on other sites More sharing options...
Tallywa 35 Posted November 5, 2019 Share Posted November 5, 2019 bump Link to comment Share on other sites More sharing options...
Contributor Rakancito 4816 Posted November 6, 2019 Author Contributor Share Posted November 6, 2019 En 5/11/2019 a las 5:20, Tallywa dijo: bump In pythonItem.cpp add after this function bool CPythonItem::GetCloseItem(const TPixelPosition & c_rPixelPosition, DWORD * pdwItemID, DWORD dwDistance) bool CPythonItem::GetCloseItemVector(const std::string& myName, const TPixelPosition& c_rPixelPosition, std::vector<DWORD>& itemVidList) { DWORD dwCloseItemDistance = 1000 * 1000; TGroundItemInstanceMap::iterator i; for (i = m_GroundItemInstanceMap.begin(); i != m_GroundItemInstanceMap.end(); ++i) { TGroundItemInstance * pInstance = i->second; DWORD dwxDistance = DWORD(c_rPixelPosition.x - pInstance->v3EndPosition.x); DWORD dwyDistance = DWORD(c_rPixelPosition.y - (-pInstance->v3EndPosition.y)); DWORD dwDistance = DWORD(dwxDistance * dwxDistance + dwyDistance * dwyDistance); if (dwDistance < dwCloseItemDistance && (pInstance->stOwnership == "" || pInstance->stOwnership == myName)) { itemVidList.push_back(i->first); } } return true; } pythonItem.h after this bool GetCloseItem(const TPixelPosition & c_rPixelPosition, DWORD* pdwItemID, DWORD dwDistance=300); add bool GetCloseItemVector(const std::string& myName, const TPixelPosition& c_rPixelPosition, std::vector<DWORD>& itemVidList); 1 Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted November 18, 2019 Share Posted November 18, 2019 It doesnt work for me. No sysser error or something. I have autopick up on, and when i click on armors it pick the armor. When i dont click on armors,the system still pick the armors. I dont know Link to comment Share on other sites More sharing options...
str0nd3r 0 Posted December 8, 2019 Share Posted December 8, 2019 Its possible only filter? Link to comment Share on other sites More sharing options...
Active Member Dex 519 Posted December 28, 2019 Active Member Share Posted December 28, 2019 How can i set more than one filter on true, at the moment is so when i activate one of the filters it's works fine but when i activate the second one it picks up all the items. Example: 1.I activate only Weapon, the filter works fine it's not picking up any Weapon anymore 2. I activate Weapon and Armor, the filter isn't work anymore, so it's picking up all the items i drop Link to comment Share on other sites More sharing options...
Saitan 0 Posted July 24, 2020 Share Posted July 24, 2020 Hi, can I ask for help? I need to add another item to one lift, how to add it to make it work? Example: if (CPythonSystem :: Instance (). IsPickUpFilterStone ()) if (pItemData-> GetType () == CItemData :: ITEM_TYPE_METIN) rkNetStream.SendItemPickUpPacket (dwIID); And add to that, for example: ITEM_TYPE_USE Thanks for the help. Link to comment Share on other sites More sharing options...
RedoxZ 0 Posted April 28, 2022 Share Posted April 28, 2022 On 12/28/2019 at 6:45 PM, Dex said: Example: 1.I activate only Weapon, the filter works fine it's not picking up any Weapon anymore 2. I activate Weapon and Armor, the filter isn't work anymore, so it's picking up all the items i drop Has anyone found a solution for this? And where can i change the language in this? Link to comment Share on other sites More sharing options...
Recommended Posts