zeimpekis9 68 Posted June 18, 2017 Share Posted June 18, 2017 Hello community. Does anyone knows how to fix anti kick hack? There are 2 methods of this hack. 1) That a player can right click on a player, and if he click on the programm to kick him, he can kick him. 2) The other method, is he send him pm, and the client closes automatically. Does anyone knows what do do? Thanks for your time. Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 18, 2017 Share Posted June 18, 2017 2) Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted June 18, 2017 Author Share Posted June 18, 2017 30 minutes ago, MORTE said: 2) Yes i know. At the tutorial it say this: Add these functions as public to char.h: void ClearPMCounter(void) { m_iPMCounter = 0; } void IncreasePMCounter(void) { m_iPMCounter++; } void SetLastPMPulse(void); int GetPMCounter(void) const { return m_iPMCounter; } int GetLastPMPulse(void) const { return m_iLastPMPulse; } Add these to char.h too, but as protected: int m_iLastPMPulse; int m_iPMCounter; But, where i put them on char.h? what i need to search? Link to comment Share on other sites More sharing options...
Premium Galet 509 Posted June 18, 2017 Premium Share Posted June 18, 2017 No matter where as long as the first one are public and the last one are protected Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 18, 2017 Share Posted June 18, 2017 (edited) 5 minutes ago, zeimpekis9 said: Yes i know. At the tutorial it say this: Add these functions as public to char.h: void ClearPMCounter(void) { m_iPMCounter = 0; } void IncreasePMCounter(void) { m_iPMCounter++; } void SetLastPMPulse(void); int GetPMCounter(void) const { return m_iPMCounter; } int GetLastPMPulse(void) const { return m_iLastPMPulse; } Add these to char.h too, but as protected: int m_iLastPMPulse; int m_iPMCounter; But, where i put them on char.h? what i need to search? You can do so I at least did not follow this part of the tutorial, I did this one here Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted June 18, 2017 Author Share Posted June 18, 2017 (edited) Just now, MORTE said: You can do so I at least did not follow this part of the tutorial, I did this one here I did both of them. Is not right? i should delete one? Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 18, 2017 Share Posted June 18, 2017 The first is a protection, the second is correction of the problem, so only the second has already corrected the problem, not having the need for the first one, but it remains to his credit. *I just did the second. Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted June 19, 2017 Author Share Posted June 19, 2017 13 hours ago, MORTE said: The first is a protection, the second is correction of the problem, so only the second has already corrected the problem, not having the need for the first one, but it remains to his credit. *I just did the second. For the first method, is there any fix? Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 19, 2017 Share Posted June 19, 2017 11 hours ago, zeimpekis9 said: For the first method, is there any fix? in char.cpp "bool CHARACTER::Sync(long x, long y)" LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(GetMapIndex(), x, y); if (!new_tree) { if (GetDesc()) { sys_err("cannot find tree at %d %d (name: %s)", x, y, GetName()); GetDesc()->SetPhase(PHASE_CLOSE); } else { sys_err("no tree: %s %d %d %d", GetName(), x, y, GetMapIndex()); Dead(); } return false; } to LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(GetMapIndex(), x, y); if (!new_tree) { if (!GetDesc()) { sys_err("No tree %s %ld %ld %ld", GetName(), x, y, GetMapIndex()); Dead(); return false; } x = GetX(); y = GetY(); new_tree = GetSectree(); return false; } Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted June 19, 2017 Author Share Posted June 19, 2017 13 minutes ago, MORTE said: in char.cpp "bool CHARACTER::Sync(long x, long y)" LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(GetMapIndex(), x, y); if (!new_tree) { if (GetDesc()) { sys_err("cannot find tree at %d %d (name: %s)", x, y, GetName()); GetDesc()->SetPhase(PHASE_CLOSE); } else { sys_err("no tree: %s %d %d %d", GetName(), x, y, GetMapIndex()); Dead(); } return false; } to LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(GetMapIndex(), x, y); if (!new_tree) { if (!GetDesc()) { sys_err("No tree %s %ld %ld %ld", GetName(), x, y, GetMapIndex()); Dead(); return false; } x = GetX(); y = GetY(); new_tree = GetSectree(); return false; } So this, will prevent from get kicked? Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 19, 2017 Share Posted June 19, 2017 2 minutes ago, zeimpekis9 said: So this, will prevent from get kicked? If you fix the previous crashes and change that, yes Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted June 19, 2017 Author Share Posted June 19, 2017 I did exactly what you said. For the second method, i did both of 2 parts that has the tutorial as you said me there is no problem. Link to comment Share on other sites More sharing options...
MORTE 78 Posted June 19, 2017 Share Posted June 19, 2017 Perfect! Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted June 19, 2017 Author Share Posted June 19, 2017 Thanks a lot for your time man! God bless you. #closed 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