Lightbulblok for d3d

Posts 1–11 of 11 · Page 1 of 1
lok for d3d
lok for d3d
no see ONN/OFF

add ONN/OFF is wrak
lok



hwo see ONN/OFF plz


me code "Functions.h"
Code:
#include "Functions.h"

typedef struct{
	int index;
	char * title;
	int *hack;
	int hackmaxval;
	int hacktype;
	DWORD HCOLOR;
}ITEM;

class DemonMenu {
	public:
	LPDIRECT3DDEVICE9 pDevice;
	LPD3DXFONT pFont;

	int hackcount;
	int selector;
	int x,y,w,h;
	DWORD COLOR;

	ITEM HACKITEM[99];
	char hackrval[256]; //something I was also messing around with.

	void CreateItem(int index, char * title, int *hack,int hackmaxval=1,int hacktype=0);
	void BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice);
	void RenderMenu();
};

//Colors are A,R,G,B meaning alpha(opacity), red, green, blue
#define RED D3DCOLOR_ARGB(255, 255, 0, 0)
#define GREEN D3DCOLOR_ARGB(255, 0, 255, 0)
#define BLUE D3DCOLOR_ARGB(255, 0, 0, 255)
#define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
#define BLACK D3DCOLOR_ARGB(255, 0, 0, 0)
#define YELLOW D3DCOLOR_ARGB(255, 255, 255, 0)
#define TEAL D3DCOLOR_ARGB(255, 0, 255, 255)
#define PINK D3DCOLOR_ARGB(255, 255, 240, 0)
#define ORANGE D3DCOLOR_ARGB(255, 255, 132, 0)
#define LIME D3DCOLOR_ARGB(255, 198, 255, 0)
#define SKYBLUE D3DCOLOR_ARGB(255, 0, 180, 255)
#define MAROON D3DCOLOR_ARGB(255, 142, 30, 0)
#define LGRAY D3DCOLOR_ARGB(255, 174, 174, 174) //Light Gray
#define DGRAY D3DCOLOR_ARGB(255, 71, 65, 64) //Dark Gray
#define BROWN D3DCOLOR_ARGB(255, 77, 46, 38)
#define SHIT D3DCOLOR_ARGB(255, 74, 38, 38) //Shit and brown aint much different

//==============================================================================
VOID *DetourCreate( BYTE *src, CONST BYTE *dst, CONST INT len )
{
    BYTE *jmp =( BYTE * ) malloc( len + 5 );
    DWORD dwBack;

    VirtualProtect( src, len, PAGE_READWRITE, &dwBack );
    memcpy( jmp, src, len );    
    jmp += len;
    jmp[0] = 0xE9;
    *( DWORD * )( jmp + 1 ) = ( DWORD )( src + len - jmp ) - 5;

    src[0] = 0xE9;
    *( DWORD * )( src + 1 ) = ( DWORD )( dst - src ) - 5;
    for( INT i = 5; i < len; i++ )
        src[i] = 0x90;
    VirtualProtect( src, len, dwBack, &dwBack );

    return( jmp - len );

}
bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
	for(;*szMask;++szMask,++pData,++bMask)
		if(*szMask=='x' && *pData!=*bMask)  
			return 0;
	return (*szMask) == NULL;
}

DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
	for(DWORD i=0; i<dwLen; i++)
		if (bCompare((BYTE*)(dwAddress+i),bMask,szMask))  
			return (DWORD)(dwAddress+i);
	return 0;
}
//==============================================================================
add
Code:
#include <Windows.h>
#include <stdio.h>
#include <d3d9.h>
#include <d3dx9.h>

#pragma comment(lib,"d3dx9.lib")
add
Code:
#include "QmoMenuClass.h"
//Present Engine
#define PresentEngine 0x004C41AF
DWORD retPresentEngine = ( PresentEngine + 0x5 );

//DIP Engine
#define DIPEngine 0x004B490D
DWORD retDIPEngine = ( DIPEngine + 0x8 );

//Menu
DemonMenu dMenu;
LPDIRECT3DDEVICE9 g_pDevice = 0;

int xFontOffSet = 15;
int hackopt1;
int MenuHeight = 10;
int show = 0;

//Chams
LPDIRECT3DTEXTURE9 White,Red,Green,Blue,Black,Purple,Grey,Yellow,Orange;
LPDIRECT3DVERTEXBUFFER9 StreamData;
UINT OffsetInBytes;
UINT m_Stride;

//==================================================================
//Hack Vars
int hack1, hack2, hack3, hack4, hack5, hack6;
//==================================================================

void DemonMenu::CreateItem(int index, char * title, int *hack, int hackmaxval,int hacktype)
{
	hackcount++;
	HACKITEM[hackcount].index = index;
	HACKITEM[hackcount].hack = hack;
	HACKITEM[hackcount].hackmaxval = hackmaxval;
	HACKITEM[hackcount].hacktype = hacktype;
	PrintText(title, xFontOffSet, index*15,HACKITEM[hackcount].HCOLOR,pFont); //If you want to move the menu opts down do something like this (index*15)+20 and to move it left or right just add/subtract from font offset.
}

void DemonMenu::BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice)
{
	if(GetAsyncKeyState(VK_INSERT)&1) show=(!show);
	
	if(!show) 
	{
		DrawBox(0,0, w, 20, BACKCOLOR, BORDERCOLOR, pDevice);
		PrintText(menuname, 5, 2, TITLECOL, pFont);
		return;
	}

	DrawBox(x,y, w, h, BACKCOLOR, BORDERCOLOR, pDevice);
	PrintText(menuname, x+10, y+2, TITLECOL, pFont);
	
	CreateItem(1,"Wallhack", &hack1);
	CreateItem(2,"Chams", &hack2); 
	CreateItem(3,"Fullbright", &hack3);
	CreateItem(4,"Memory Hack 1", &hack4);
	CreateItem(5,"Memory Hack 2", &hack5);
	CreateItem(6,"Memory Hack 3", &hack6);

	RenderMenu();
}

void DemonMenu::RenderMenu()
{
	if(GetAsyncKeyState(VK_DOWN)&1) 
			selector++;

	if(GetAsyncKeyState(VK_UP)&1)
		if(selector > 1)
			selector--;

	if (GetAsyncKeyState(VK_RIGHT)<0)
	{
		for(int i=0;i < (hackcount+1);i++)
		{
           if(selector == HACKITEM[i].index)
		   {
			   if(*HACKITEM[i].hack < HACKITEM[i].hackmaxval)
					*HACKITEM[i].hack += 1;
		   }
		}
	}

	if (GetAsyncKeyState(VK_LEFT)<0)
	{
		for(int i=0;i < (hackcount+1);i++)
		{
           if(selector == HACKITEM[i].index)
		   {
			   *HACKITEM[i].hack = 0;
		   }
		}
	}
	
	for(int i=0;i < (hackcount+1);i++)
	{
		if(selector == HACKITEM[i].index)
			HACKITEM[i].HCOLOR = GREEN;
		else
			HACKITEM[i].HCOLOR = RED;
	}

	for(int i=1; i<(hackcount+1); i++)
	{
		if(HACKITEM[i].hacktype == 0)
		{
			if(*HACKITEM[i].hack == 1)  //to move the opts down do something like this (HACKITEM[i].index*15)+20 
				PrintText("On", xFontOffSet+100, HACKITEM[i].index*15,YELLOW,pFont);
			else 
				PrintText("Off", xFontOffSet+100, HACKITEM[i].index*15,RED,pFont);
		}
	}

	for(int i=1; i<(hackcount+1); i++)
	{
		if(HACKITEM[i].hackmaxval >1 && HACKITEM[i].hacktype == 1)
		{
			sprintf_s(hackrval, "%i", *HACKITEM[i].hack);
			PrintText(hackrval, xFontOffSet+100, HACKITEM[i].index*15,RED,pFont);
		}
	}

	if(selector < 1) selector = 1;
	if(selector > hackcount) selector = 1;

	hackcount = 0;
}

void ReFont(LPDIRECT3DDEVICE9 pDevice)
{
    if (g_pDevice != pDevice)
    {
        g_pDevice = pDevice;
        try
        {
            if (dMenu.pFont != 0)
                dMenu.pFont->Release();
        } catch (...) {}
        dMenu.pFont = 0;
        D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
    }
}

int HackThread(void)
{
	//Load modules & continue with hacks

	if(hack4)
	{

	}

	/* Do not put Sleep() */

	return 0;
}

__declspec( naked ) HRESULT WINAPI PresentMidfunction( )
{
    static LPDIRECT3DDEVICE9 pDevice;

    __asm
    {
        MOV ECX, DWORD PTR DS:[EAX]
        MOV EDX, DWORD PTR DS:[ECX + 0x44]
        MOV DWORD PTR DS:[pDevice], EAX
        PUSH 0
        PUSHAD
    }

    ReFont(pDevice);
	dMenu.BuildMenu("Avene D3D Menu 6/9/2012",0,0,180,200,RED,BLACK,GREEN,pDevice);
	HackThread();

    __asm
    {
        POPAD
        JMP retPresentEngine
    }
}

__declspec( naked ) HRESULT WINAPI DIPMidfunction( )
{
    static LPDIRECT3DDEVICE9 pDevice;

    __asm
    {
        MOV EDX, DWORD PTR DS:[EAX]
        MOV EDX, DWORD PTR DS:[EDX + 0x148]
        MOV DWORD PTR DS:[pDevice], EAX
        PUSHAD
    }

	//wallhack
    if( hack1 )
    {
        pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    }

	if( hack2 )
    {
        pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
	    pDevice->SetRenderState( D3DRS_AMBIENT, GREEN );
    }

	//fullbright
	if( hack3 )
	{
		pDevice->SetRenderState(D3DRS_LIGHTING, FALSE);
		pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255));
	}

    __asm
    {
        POPAD
        JMP retDIPEngine
    }
}

DWORD WINAPI StartRoutine( LPVOID )
{
    while( TRUE )
    {
        if( memcmp( ( VOID * )PresentEngine, ( VOID * )( PBYTE )"\x8B\x51", 2 ) == 0 )
        {
            Sleep( 50 );
            DetourCreate( ( PBYTE )PresentEngine, ( PBYTE )PresentMidfunction, 5 );
        }

		if( memcmp( ( VOID * )DIPEngine, ( VOID * )( PBYTE )"\x8B\x10", 2 ) == 0 )
        {
            Sleep( 50 );
			DetourCreate( ( PBYTE )DIPEngine, ( PBYTE )DIPMidfunction, 8 );
        }

        Sleep( 25 );
    }
 
    return 0;
}

BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{ 
    if( dwReason == DLL_PROCESS_ATTACH )
    {
        DisableThreadLibraryCalls( hDll );
        CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)StartRoutine, 0, 0, 0 );
    }
 
    return TRUE;
}
add me code
http://www.mpgh.net/forum/242-crossf...-9-2012-a.html

@[mi5 the features are auto on and there is no ON/OFF ?
yes
man no erorr 100%
@[mi5
try this
Code:
D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
Quote Originally Posted by DOOP View Post
@[mi5
try this
Code:
D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
this wont help
Quote Originally Posted by asianism View Post
this wont help
because you are not [mi5
hellow from pilippines san ko po ilalagay ang code nyan at ano po ang visual nyan para makagawa ako ng d3d menu please
sagot lang po
Thanks DOOP

---------- Post added at 03:04 AM ---------- Previous post was at 02:44 AM ----------

Quote Originally Posted by DOOP View Post
@[mi5
try this
Code:
D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
man no see not work

thx
Change the Background or the font color easy
Help help include file: 'hackertesaaa.h': No such file or directory
help
skype joao_vitor52
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us