최근들어서 골머리를 썩게 하는 이넘의 벽핵(WallHack).
사실 벽핵이라면 여러가지 핵을 통틀어서 말하는데
1. 화면상의 유닛의 이동범위를 제한(벽을 만듬)함으로써 유닛을 한쪽으로 쏠리거나 모으는 경우
2. 게임화면상의 벽을 통과시키거나 건너편을 볼수 있는 경우
3. 그다음은 생각나지 않음. -_-;;
이중에 Wallhack 의 2번째에 대해서 자료를 찾아보았다. ( 이제부터 열심히 공부를.. )
순전히 다른 사이트의 내용을 뱃겨옴. ㅡㅡ;
[간단한 WallHack제작]
예의상 참고링크 : http://www.fkn0wned.com/forum/index.php?showtopic=4055
BASIC wall Hack
1)first u need to download a compliler
removed
2) Download the newest directx sdk from microsoft
3)setup your compiler link all the apropriate stuff
4)Dl AZorbix's d3d starter kit
http://files.filefront.com//;7469039;;/ <== 귀찮아서 올림
5)start a new project , win32 dll,select empty dll
4)open up your work spce click on file view and open up the tree
5)add all the source files and header files from azorbix base
6)open up d3d9dev.cpp
7) declare int m_stride= # //#=u need to find the stride number
8 )scroll to setstreamsource put this
CODE
if (StreamNumber==0)
{
m_Stride = Stride;
}
return m_pD3Ddev->SetStreamSource(StreamNumber, pStreamData,OffsetInBytes, Stride);
}
{
m_Stride = Stride;
}
return m_pD3Ddev->SetStreamSource(StreamNumber, pStreamData,OffsetInBytes, Stride);
}
9) scoll to drawindexprimitive and put
CODE
if(m_Stride == #) //#=u need to find the stride number
{
DWORD dwOldZEnable = D3DZB_TRUE;
m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable); //get zbuffer state
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); //setting it false
m_pD3Ddev->DrawIndexedPrimitive(PrimitiveType, minIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);//setting it back true
{
DWORD dwOldZEnable = D3DZB_TRUE;
m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable); //get zbuffer state
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); //setting it false
m_pD3Ddev->DrawIndexedPrimitive(PrimitiveType, minIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);//setting it back true
10)compile your project it will be in the specified folder you declared
11) you created your first d3d wall hack its a simple as that
hope this helps some beginners
********************************************************************************
ASUS:D3D
CODE
if (wall)//find model rec for wall
{
m_pD3Ddev->SetRenderState(D3DRS_SRCBLEND, 0x5);
m_pD3Ddev->SetRenderState(D3DRS_DESTBLEND, 0x2);//changeable values^^ w/e works
m_pD3Ddev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
}
{
m_pD3Ddev->SetRenderState(D3DRS_SRCBLEND, 0x5);
m_pD3Ddev->SetRenderState(D3DRS_DESTBLEND, 0x2);//changeable values^^ w/e works
m_pD3Ddev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
}
or u could do a.....
CODE
if (wall)
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
m_pD3Ddev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
m_pD3Ddev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
****************************************************************************
FoG:
CODE
{
m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE,false);
}
m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE,false);
}
******************************************************************************
Transparent:
i use this to get rid of sniper overlays or such...smoke etc
CODE
{
if(model rec)
return 0;
return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinIndex, NumVertices, startIndex, PrimitiveCount);
}
if(model rec)
return 0;
return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinIndex, NumVertices, startIndex, PrimitiveCount);
}
********************************************************************************
wireframe:
CODE
{
m_pD3Ddev->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
}
m_pD3Ddev->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
}
****************************************************************************
Full Bright
CODE
m_pD3Ddev->SetRenderState(D3DRS_LIGHTING, false);
m_pD3Ddev->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255,255,255))
m_pD3Ddev->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255,255,255))
creds:Azorbix and g-d
[WallHack에 대한 링크1]
http://forum.gamedeception.net/showthread.php?t=8084