Results 1 to 7 of 7
  1. #1
    Nightmare's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    North of Hell
    Posts
    2,399
    Reputation
    149
    Thanks
    6,560
    My Mood
    Worried

    Nightmare HotKey 2.0

    Nightmare HotKey 2.0

    • Code does not crash and lag;
    • Tested in windows 7 - 64 bits;
    • To use it in CAEU, CABR or CAKO, you only need change the adresses;
    • The Code is without errors and bugs.

    Features:

    NUMPAD0 - Rapid Fire
    NUMPAD1 - NoFog
    NUMPAD2 - NX Chams
    NUMPAD3 - Pickup
    NUMPAD4 - NoSpread
    NUMPAD5 - Fps
    NUMPAD6 - NameTags
    NUMPAD7 - NoRecoil
    NUMPAD8 - WeaponRange
    NUMPAD9 - SuperBullets/ShootThroughWalls


    Scan 1
    Scan 2


    Code:
    /***********Nightmare HotKey 2.0************************************************/
    
    
    /***********Créditos************************************************************/
    /******Nightmare, luizimloko, TokolocoSK, Gordon', Entourage, Gellin************/
    /*******************************************************************************/
    
    #include <windows.h>
    #include <stdio.h>
    #include <d3dx9.h>
    #pragma comment( lib, "nod3dx9.lib" )
    
    //Addresses CANA
    #define DeviceGame      0x009118A0
    #define GlassWalls      0x0057301A
    #define DIPEngine       0x006A3E1A
    #define DrawPrimitive   0x00805974
    #define LTClientEXE     0x00486030
    #define LTClientDLL     0x37814EB8
    #define GameStatus      0x3782A118
    #define EspName1        0x37306A79
    #define EspName2        0x37306AFF
    #define NoRecoil        0x373B619C
    #define NoReload        0x37433034
    #define SuperBullets    0x3742DB7D
    #define WeaponRange1    0x374332B9
    #define WeaponRange2    0x37433639
    #define PlayerRandom    0x37860678
    #define RapidFire       0x37433D35
    #define WeaponManager   0x3785C8FC
    #define PlayerByIndex   0x371561F0
    
    
    
    typedef HRESULT ( __stdcall* oPresent ) ( LPDIRECT3DDEVICE9 pDevice, const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion);
    oPresent pPresent;
    
    BOOL IsGameReadyForHook(void)
    {
    	if(GetModuleHandle("d3d9.dll") != NULL 
    	&& GetModuleHandle("ClientFX.fxd") != NULL 
    	&& GetModuleHandle("CShell.dll") != NULL)
    		return true;
    
    	return false;
    }
    
    void Memoria( void* pvAddress, void* pvBuffer, size_t len )
    {
    	if( *(BYTE*)pvAddress == *(BYTE*)pvBuffer )
    		return;
    
    	memcpy( ( void* )pvAddress, ( void* )pvBuffer, len );
    }
    
    bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask) 
    { 
        for(;*szMask;++szMask,++pData,++bMask) 
        if(*szMask=='x' && *pData!=*bMask )  
        return false; 
        return (*szMask) == NULL; 
    } 
    
    DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask) 
    { 
        for(DWORD i=0; i < dwLen; i++) 
    		if(bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask) ) 
                return (DWORD)(dwAddress+i); 
         
        return 0; 
    }
    
    DWORD Ngm_GetPointer(int Begin)
    {
    	DWORD *Device = ***(DWORD ****)DeviceGame;
    
    	if(Device == NULL)
    		return 0;
    
    	return Device[Begin];
    }
    
    void __stdcall Ngm_ConsolePush( const char* Ngm_Command)
    {
    	DWORD* Ngm_Addr = ( DWORD* ) LTClientEXE;
    	if(*(BYTE*)GameStatus == 1) 
    	{
    	__asm
    	{
    		Pushad;
    		Push Ngm_Command
    		call Ngm_Addr
    		add esp, 0x4
    		Popad;
    		}
    	}
    }
    
    //Variables
    int cchams, cfog, cpick, cpickx1, cnames, crecoil, cspread,cspreadx1, cfps, cweaponrange, csuperbullets, crapidfire;
    bool bfog, bchams, bpick, bspread, bfps, bnames, brecoil, bweaponrange, bsuperbullets, brapidfire;
    
    void Ngm_Main(void) 
    {
    	if (GetAsyncKeyState(VK_NUMPAD1)&1) cfog = !cfog;
    	if(cfog)
    		{
    			if(!bfog)
    			{
    				Ngm_ConsolePush("FogEnable    0.0");
    				bfog = true;
    			}
    		}
    		else
    		{
    			if(bfog)
    			{
    				Ngm_ConsolePush("FogEnable    1.0");
    				bfog = false;
    			}
    		}
    
    	
    	if (GetAsyncKeyState(VK_NUMPAD2)&1) cchams = !cchams;
    	if(cchams)
    		{
    			if(!bchams)
    			{
    				Ngm_ConsolePush("SkelModelStencil     1.0");
    				bchams = true;
    			}
    		}
    		else
    		{
    			if(bchams)
    			{
    				Ngm_ConsolePush("SkelModelStencil     0.0");
    				bchams = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD3)&1) cpick = !cpick;
    	if(cpick)
    		{
    			if(!bpick)
    			{
    				Ngm_ConsolePush("ActivationDistance   99999.0");
    				bpick = true;
    			}
    		}
    		else
    		{
    			if(bpick)
    			{
    				Ngm_ConsolePush("ActivationDistance   100.0");
    				bpick = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD4)&1) cspread = !cspread;
    	if(cspread)
    		{
    			if(!bspread)
    			{
    				Ngm_ConsolePush("PerturbRotationEffect   0.000000" );
    				Ngm_ConsolePush("PerturbIncreaseSpeed   0.000000" );
    				Ngm_ConsolePush("PerturbWalkPercent   0.000000" );
    				Ngm_ConsolePush("PerturbFiringIncreaseSpeed   0.000000" );
    				Ngm_ConsolePush("PerturbRecoil   0.000000" );
    				Ngm_ConsolePush("FireMovePerturb   0.000000" );
    				Ngm_ConsolePush("ZoomedFireMoveDuckPerturb   0.000000" );
    				Ngm_ConsolePush("ZoomedFireMovePerturb   0.000000" );
    				Ngm_ConsolePush("ZoomedFireDuckPerturb   0.000000" );
    				bspread = true;
    			}
    		}
    		else
    		{
    			if(bspread)
    			{
    				Ngm_ConsolePush("PerturbRotationEffect   3.000000" );
    				Ngm_ConsolePush("PerturbIncreaseSpeed   3.000000" );
    				Ngm_ConsolePush("PerturbWalkPercent   9.000000" );
    				Ngm_ConsolePush("PerturbFiringIncreaseSpeed   0.500000" );
    				Ngm_ConsolePush("PerturbRecoil   9.000000" );
    				Ngm_ConsolePush("FireMovePerturb   9.000000" );
    				Ngm_ConsolePush("ZoomedFireMoveDuckPerturb   9.000000" );
    				Ngm_ConsolePush("ZoomedFireMovePerturb   9.000000" );
    				Ngm_ConsolePush("ZoomedFireDuckPerturb   9.000000" );
    				bspread = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD5)&1) cfps = !cfps;
    	if(cfps)
    		{
    			if(!bfps)
    			{
    				Ngm_ConsolePush("ShowFps   1.0");
    				bfps = true;
    			}
    		}
    		else
    		{
    			if(bfps)
    			{
    				Ngm_ConsolePush("ShowFps   0.0");
    				bfps = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD6)&1) cnames = !cnames;
    	if ((*(BYTE *)GameStatus == 1) && cnames) {
    			if(!bnames)
    			{
    				memcpy((void *)EspName1, (void *)(PBYTE)"\x90\x90", 2);
    				memcpy((void *)EspName2, (void *)(PBYTE)"\x90\x90", 2);
    				bnames = true;
    			}
    		}
    		else
    		{
    			if(bnames)
    			{
    				memcpy((void *)EspName1, (void *)(PBYTE)"\x75\x05", 2);
    				memcpy((void *)EspName2, (void *)(PBYTE)"\x75\x05", 2);
    				bnames = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD7)&1) crecoil = !crecoil;
    	if ((*(BYTE *)GameStatus == 1) && crecoil) {
    			if(!brecoil)
    			{
    				memcpy((void *)NoRecoil, (void *)(PBYTE)"\x90\x90\x90\x90", 4);
    				brecoil = true;
    			}
    		}
    		else
    		{
    			if(brecoil)
    			{
    				memcpy((void *)NoRecoil, (void *)(PBYTE)"\xD9\x44\x24\x14", 4);
    				brecoil = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD8)&1) cweaponrange = !cweaponrange;
    	if ((*(BYTE *)GameStatus == 1) && cweaponrange) {
    			if(!bweaponrange)
    			{
    				memcpy((void *)WeaponRange1, (void *)(PBYTE *)"\xB8\x00\x00\x00\x10\x90", 6);
    				memcpy((void *)WeaponRange2, (void *)(PBYTE *)"\xB8\x00\x00\x00\x10\x90", 6);
    				bweaponrange = true;
    			}
    		}
    		else
    		{
    			if(bweaponrange)
    			{
    				memcpy((void *)WeaponRange1, (void *)(PBYTE *)"\x8B\x80\xD4\x02\x00\x00", 6);
    				memcpy((void *)WeaponRange2, (void *)(PBYTE *)"\x8B\x80\xD4\x02\x00\x00", 6);
    				bweaponrange = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD9)&1) csuperbullets = !csuperbullets;
    	if ((*(BYTE *)GameStatus == 1) && csuperbullets) {
    			if(!bsuperbullets)
    			{
    				memcpy((void *)SuperBullets, (void *)(PBYTE)"\x90\x90\x90", 3);
    				bsuperbullets = true;
    			}
    		}
    		else
    		{
    			if(bsuperbullets)
    			{
    				memcpy((void *)SuperBullets, (void *)(PBYTE)"\x0F\x94\xC0", 3);
    				bsuperbullets = false;
    			}
    		}
    
    	if (GetAsyncKeyState(VK_NUMPAD0)&1) crapidfire = !crapidfire;
    	if ((*(BYTE *)GameStatus == 1) && crapidfire) {
    			if(!brapidfire)
    			{
    				memcpy((void *)RapidFire, (void *)(PBYTE) "\x90\x90", 2);
    				brapidfire = true;
    			}
    		}
    		else
    		{
    			if(brapidfire)
    			{
    				memcpy((void *)RapidFire, (void *)(PBYTE) "\x74\x3E", 2);
    				brapidfire = false;
    				}
    		}
    }
    
    HRESULT __stdcall gellPresent(LPDIRECT3DDEVICE9 pDevice, const RECT *pSourceRect,
    const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion)
    {
    	_asm pushad;
    	Ngm_Main();
    	_asm popad;
    	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    
    void *Ngm_DetourCreate( BYTE *src, const BYTE *dst, const int len )
    {
    	unsigned int Ngm_Pointers[] = { 0xE9 };
    	DWORD dwBack;
    	BYTE *jmp = (BYTE*)malloc( len + 5 );
    	VirtualProtect( src, len, PAGE_EXECUTE_READWRITE, &dwBack );
    	memcpy( jmp, src, len );	
    	jmp += len;
    	jmp[0] = Ngm_Pointers[0];
    	*(DWORD*)( jmp+1 ) = (DWORD)( src+len - jmp ) - 5;
    	src[0] = Ngm_Pointers[0];
    	*(DWORD*)( src+1 ) = (DWORD)( dst - src ) - 5;
    	VirtualProtect( src, len, dwBack, &dwBack );
    	return( jmp-len );
    }
    
    void Ngm_Hook(void)
    {
         DWORD dwPresent  = Ngm_GetPointer (17);
         pPresent  = (oPresent)Ngm_DetourCreate(( PBYTE)dwPresent, ( PBYTE )gellPresent, 5);
    }
    
    DWORD __stdcall dwD3D9Thread(LPVOID)
    {
    	while( !IsGameReadyForHook() )
    		Sleep(100);
    	Ngm_Hook();
    	return 0;
    }
    
    bool __stdcall DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    	if(dwReason == DLL_PROCESS_ATTACH) {
    		//MessageBox(0, "Your Text", "Title", MB_OK);
    		CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)dwD3D9Thread, NULL, NULL, NULL);
    	}
    	return true;
    }
    @Eminem
    @flameswor10
    @aeronyx
    @BACKD00R
    @Polo

    Approve?
    <b>Downloadable Files</b> Downloadable Files

  2. The Following 19 Users Say Thank You to Nightmare For This Useful Post:

    -MAJ (07-07-2012),aceronepowa (07-31-2012),AOD_55UFFER (09-16-2012),Awcomenoutjr (01-10-2013),ay58526 (10-27-2012),Drake (06-28-2012),DylanZorn (06-29-2012),Hatono (07-03-2012),jjtop (07-27-2012),Kewlkat122 (07-20-2012),kikoako (08-17-2012),madeven (12-03-2012),mauyed (08-10-2012),nivnivniv1 (07-04-2012),OLGARUS (09-09-2012),Ralph1 (07-04-2012),SAMCRO (07-23-2012),WhiteFox9 (07-07-2012),WizdomNKush (02-21-2013)

  3. #2
    aeronyx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    /210/
    Posts
    11,238
    Reputation
    1211
    Thanks
    4,972
    /Approved .

  4. #3
    luizimloko's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    fs:[0]
    Posts
    1,799
    Reputation
    136
    Thanks
    9,834
    My Mood
    Yeehaw
    Version v3

    Code:
    #include <windows.h>
    #include <d3dx9.h>
    
    INT Addresses[] = { 0x00486030/*LTClientEXE*/, 0x3782A118/*GameStatus*/, 0x009118A0/*DeviceGame*/ }
    
    typedef HRESULT (WINAPI *oPresent) (LPDIRECT3DDEVICE9 pDevice, const RECT *a, const RECT *b, HWND c, const RGNDATA *d);
    oPresent pPresent;
    
    BOOL IsGameReadyForHook(void)
    {
    	if(GetModuleHandle("d3d9.dll") != NULL 
    	&& GetModuleHandle("ClientFX.fxd") != NULL 
    	&& GetModuleHandle("CShell.dll") != NULL)
    		return true;
    
    	return false;
    }
    
    DWORD Ngm_GetPointer(int Start)
    {
    	DWORD *Device = ***(DWORD ****)Addresses[2];
    
    	if(Device == NULL)
    		return 0;
    
    	return Device[Start];
    }
    
    void PushToConsole( const char* Command)
    {
    	DWORD *Adress = ( DWORD* ) Addresses[0];
    
    	if(*(BYTE *)Addresses[1]) 
    	{
    		__asm
    		{
    			PUSHAD;
    			PUSH Command
    			CALL Address
    			ADD ESP, 0x4
    			POPAD;
    		}
    	}
    }
    
    //Variables
    INT Hacker[100];
    
    void myHacks(void) 
    {
    	if(GetAsyncKeyState(VK_NUMPAD1)&1) Hacker[0] =! Hacker[0];
    	if(GetAsyncKeyState(VK_NUMPAD1)&1) Hacker[1] =! Hacker[1];
    	if(GetAsyncKeyState(VK_NUMPAD1)&1) Hacker[2] =! Hacker[2];
    
    	if(Hacker[0]) {
    		PushToConsole("FogEnable 0.0");
    	} else {
    		PushToConsole("FogEnable 1.0");
    	}
    
    	if(Hacker[1]) {
    		PushToConsole("SkelModelStencil 1.0");
    	} else {
    		PushToConsole("SkelModelStencil 0.0");
    	}
    
    	if(Hacker[2]) {
    		PushToConsole("ActivationDistance 100000");
    	} else {
    		PushToConsole("ActivationDistance 100");
    	}
    }
    
    HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, const RECT *a, const RECT *b, HWND c, const RGNDATA *d)
    {
    	__asm PUSHAD;
    	myHacks();
    	__asm POPAD;
    	return pPresent(pDevice, a, b, c, d);
    }
    
    void *DetourCreate( BYTE *src, const BYTE *dst, const int len )
    {
    	UINT Pointer[] = { 0xE9 }; /* if not work try INT */
    
    	DWORD dwBack;
    	BYTE *jmp = (BYTE*)malloc( len + 5 );
    	VirtualProtect( src, len, PAGE_EXECUTE_READWRITE, &dwBack );
    	memcpy( jmp, src, len );	
    	jmp += len;
    	jmp[0] = Pointer[0];
    	*(DWORD*)( jmp+1 ) = (DWORD)( src+len - jmp ) - 5;
    	src[0] = Pointer[0];
    	*(DWORD*)( src+1 ) = (DWORD)( dst - src ) - 5;
    	VirtualProtect( src, len, dwBack, &dwBack );
    	return( jmp-len );
    }
    
    void Hook(void)
    {
         DWORD dwPresent  = GetPointer (17);
         pPresent  = (oPresent)DetourCreate(( PBYTE)dwPresent, (PBYTE)gellPresent, 5);
    }
    
    DWORD WINAPI dwD3D9Thread(LPVOID)
    {
    	while( !IsGameReadyForHook() )
    		Sleep(100);
    	Hook();
    	return NULL;
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    	if(dwReason == DLL_PROCESS_ATTACH) {
    		//MessageBox(0, "Your Text", "Title", MB_OK);
    		CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)dwD3D9Thread, NULL, NULL, NULL);
    	}
    	return true;
    }
    Contributor Since: 02-18-2012

    WarFace Brazil:


    Crossfire Brazil ( X-Trap ):


    WarRock Brazil ( HackShield ):



  5. The Following User Says Thank You to luizimloko For This Useful Post:

    Jason` (07-09-2012)

  6. #4
    Dead3nd's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    4
    My Mood
    Bitchy
    Nice release.
    Last edited by Dead3nd; 06-29-2012 at 11:03 AM.

  7. #5
    Lucas`'s Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    23
    Reputation
    -9
    Thanks
    2
    My Mood
    Aggressive
    Quote Originally Posted by Dead3nd View Post
    Help! I get an error saying fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory Can you help me pleas??
    Project->Project Settings->VC Directories->Include Path-> "Include SDK"
    Project->Project Settings->VC Directories->Library PAth -> "Library SDK"



    Great Work Nightmare!!! Loving The 2.0
    Last edited by Lucas`; 06-29-2012 at 12:10 AM.

  8. #6
    DubleJayJ's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    In your closet.
    Posts
    34
    Reputation
    10
    Thanks
    0
    My Mood
    In Love
    Nice update bro.

    ---------- Post added at 01:32 AM ---------- Previous post was at 12:34 AM ----------

    Weird, whenever I compile and inject, it doesn't work. Solutions?

    Lol your having a boner malfunction!

  9. #7
    jose91598's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    435
    My Mood
    Sleepy

    Cool

    I get this error:

    1>LINK : fatal error LNK1104: cannot open file 'nod3dx9.lib'

    any help?

    Edit: never mind i fixed it here is the link if you have the same problem: http://www.mpgh.net/forum/207-combat...9-library.html
    Last edited by jose91598; 07-03-2012 at 07:19 PM.

Similar Threads

  1. [Source Code] Nightmare HotKey - Updated - No Crash
    By Nightmare in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 31
    Last Post: 06-28-2012, 10:06 PM
  2. vb hotkeys
    By cjg333 in forum General Game Hacking
    Replies: 7
    Last Post: 07-23-2008, 02:08 PM
  3. Hotkeys in C++
    By Dave84311 in forum C++/C Programming
    Replies: 7
    Last Post: 09-07-2007, 08:13 AM
  4. Hotkeys for a VB trainer
    By scooby107 in forum Visual Basic Programming
    Replies: 10
    Last Post: 07-03-2007, 01:43 PM
  5. [Tutorial] How To Mack HotKeys On VB
    By TheRedEye in forum WarRock - International Hacks
    Replies: 32
    Last Post: 06-23-2007, 11:24 PM