Jump to content

Anti Wallhack System


Recommended Posts

  • Active Member

M2 Download Center

This is the hidden content, please
( 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 14
  • Not Good 1
  • Good 6
  • Love 16
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

  • Active Member

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 5
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

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.