Jump to content
×
×
  • Create New...

Anti Wallhack System


Recommended Posts

M2 Download Center

Download Here ( Internal )

Spoiler

144939ss-2015-10-28-at-05.07.54-.jpg

 

*UserInterface/InstanceBase.h

Search:

	protected:
		UINT					__LessRenderOrder_GetLODLevel();

Add it upper:

	public:
		bool __CanSkipCollision();

 

*UserInterface/InstanceBase.cpp

Search:

void CInstanceBase::__DisableSkipCollision()
{
	m_GraphicThingInstance.DisableSkipCollision();
}

Add it under:

bool CInstanceBase::__CanSkipCollision()
{
	return m_GraphicThingInstance.CanSkipCollision();
}

 

*UserInterface/PythonNetworkStreamPhaseGame.cpp

 

Search:

	if (fDstRot < 0.0f)
		fDstRot = 360 + fDstRot;
	else if (fDstRot > 360.0f)
		fDstRot = fmodf(fDstRot, 360.0f);

 

Add it upper any of:

Only warning:

	CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance();
	CInstanceBase* pkInstMain = rkChrMgr.GetMainInstancePtr();
	if (pkInstMain){
		if (!pkInstMain->IsGoing() && pkInstMain->__CanSkipCollision()){
			CPythonChat::Instance().AppendChat(CHAT_TYPE_NOTICE, "Wall hack !");
			return false;
		}
	}

 

Close game client:

    CPythonCharacterManager& rkChrMgr =CPythonCharacterManager::Instance();
    CInstanceBase* pkInstMain = rkChrMgr.GetMainInstancePtr();
    if(pkInstMain){
        if(!pkInstMain->IsGoing()&& pkInstMain->__CanSkipCollision()){
             PostQuitMessage(0);
        }
    }

 

Send log and close connection:

	CPythonCharacterManager& rkChrMgr =CPythonCharacterManager::Instance();
    CInstanceBase* pkInstMain = rkChrMgr.GetMainInstancePtr();
    if(pkInstMain){
        if(!pkInstMain->IsGoing()&& pkInstMain->__CanSkipCollision()){
             __SendHack("WallHack detected");  
        }
    }

 

  • Metin2 Dev 1
  • Love 10
  • Good 4
Link to comment
Share on other sites

  • Former Staff

Can you make this function say the player name?

CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance();
    CInstanceBase* pkInstMain = rkChrMgr.GetMainInstancePtr();
    if (pkInstMain){
        if (!pkInstMain->IsGoing() && pkInstMain->__CanSkipCollision()){
            CPythonChat::Instance().AppendChat(CHAT_TYPE_NOTICE, "Wall hack !");
            return false;
        }
    }
  • Love 1
Link to comment
Share on other sites

This function for only for him no one else. if you want notice for all players you can use and modify sendhack function

 

In input_main.cpp

void CInputMain::Hack(LPCHARACTER ch, const char * c_pData)

 

You can use notice all like this

	char nbuf[200];
	sprintf(nbuf, "%s in %s named player", buf, ch->GetName());
	SendNotice(nbuf);

 

  • Love 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.