Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

How To Create New Trainer Using C++


Recommended Posts

In this tutorial you will learn how to create a DLL library using c++ to inject it into cabalmain.

 

A sample cheat was added and a multi-level indicator was used.

  • Change Nation
  • Movement Speed
  • No Cooldown BM2
  • Perfect Combo
  • No Skill Delay

 

Requirements:

  • Visual Studio 2005/2008/2010/2012
  • This is the hidden content, please

 

Injector can be use:

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

 

1. Open Visual Studio and Click New Project

spacer.png

 

2. Click Win32, Select Win32 Project then Enter the Name of your DLL and click OK Button

spacer.png

 

3. After clicking OK Button, the next window pop-up with “Previous”,”Next”, “Finish”,”Cancel”. Click Next Button

4. Choose DLL then tick Empty Project then press Finish Button

spacer.png

 

5, After selecting finish you will see something like this:

spacer.png

 

6. In Solution Explorer you will add 2 C++ File and 2 Header File.

  • Right Click on Header Files > Add > New Item > Select Header File (.h) then name it AllDefines
  • Right Click on Header Files > Add > New Item > Select Header File (.h) then name it MyCheat
  • Right Click on Source Files > Add > New Item > Select C++ File (.cpp) then name it MainDLL
  • Right Click on Source Files > Add > New Item > Select C++ File (.cpp) then name it MyCheat

 

This is the result after adding files:

spacer.png

 

Now we must add some sample code:

AllDefines.h

//BASE ADDRESS
#define ADDR_BASE    0x00A9B820

//MOVEMENT SPEED
#define MOVEMENT_OFFSET 0x204

//NATION (0x0370)
#define NATION_OFFSET 0x0370

//POINTER BELOW IS ONLY WORK IN WIN 7 32BIT AND 64BIT

//BM2 POINTERS 
#define BM2_PTR1 0x3a0
#define BM2_PTR2 0x270
#define BM2_PTR3 0x34c
#define BM2_PTR4 0x124
#define BM2_PTR5 0x20

//PERFECT COMBO
#define CBO_MAIN1 0x3c8
#define CBO_MAIN2 0x2b0
#define CBO_PTR1 0x7d4
#define CBO_PTR2 0x7f1

//NO SKILL DELAY/SP REGEN
#define NSD_PTR1 0x3c8
#define NSD_PTR2 0x2a0
#define NSD_PTR3 0x738

 

MyCheat.h

#include "AllDefines.h"
//====================== CHANGE NATION ================================
void CHANGE_NATION()
{
	if(*(DWORD*)(*(DWORD*)ADDR_BASE+NATION_OFFSET) == 3)
		*(DWORD*)(*(DWORD*)ADDR_BASE+NATION_OFFSET) = 0;
	else
		*(DWORD*)(*(DWORD*)ADDR_BASE+NATION_OFFSET) += 1;

	Sleep(500);
}
//====================================================================

//====================== MOVEMENT SPEED ==============================
void MOVE_SPEED(float Speed)
{
	*(float*)(*(DWORD*)ADDR_BASE+MOVEMENT_OFFSET) = Speed;
}
//====================================================================

//THIS MULTI LEVEL OFFSET FOR BM2, COMBO AND NSD IS ONLY WORK IN WIN 7 32BIT AND 64BIT
//====================== BM2 =========================================
void NOCD_BM2()
{
	DWORD *BM2_1 = (DWORD*)(*(DWORD*)ADDR_BASE + BM2_PTR1);
	DWORD *BM2_2 = (DWORD*)(*(DWORD*)BM2_1 + BM2_PTR2);
	DWORD *BM2_3 = (DWORD*)(*(DWORD*)BM2_2 + BM2_PTR3);
	DWORD *BM2_4 = (DWORD*)(*(DWORD*)BM2_3 + BM2_PTR4);
	*(DWORD*)(*(DWORD*)BM2_4 + BM2_PTR5) = 0x0;
}
//====================================================================

//====================== PERFECT COMBO ===============================
void NOCD_COMBO()
{
	//SIMILAR POINTER
	DWORD *MAIN_1 = (DWORD*)(*(DWORD*)ADDR_BASE + CBO_MAIN1);
	DWORD *MAIN_2 = (DWORD*)(*(DWORD*)MAIN_1 + CBO_MAIN2);
	//COMBO
	*(DWORD*)(*(DWORD*)MAIN_2 + CBO_PTR1) = 0x0;
	*(DWORD*)(*(DWORD*)MAIN_2 + CBO_PTR2) = 0x0;
}
//====================================================================

//====================== NO SKILL DELAY ==============================
void NSD()
{
	DWORD *NSD_1 = (DWORD*)(*(DWORD*)ADDR_BASE + NSD_PTR1);
	DWORD *NSD_2 = (DWORD*)(*(DWORD*)NSD_1 + NSD_PTR2);
	*(DWORD*)(*(DWORD*)NSD_2 + NSD_PTR3) = 1629697;
}
//====================================================================

 

MyCheat.cpp

#include <windows.h>
#include "MyCheat.h"

void Start()
{	
	bool OnSpeed,OnBM2,OnCombo,OnNSD;
	char * CAPTION = "My Sample DLL";

	while(true)
	{
		//================================ CHANGE NATION ===================================================
		if (GetKeyState(VK_F11) < 0) {CHANGE_NATION();}
		//==================================================================================================

		//================================ MOVEMENT SPEED ==================================================
		if (GetKeyState(VK_F12) < 0) 
		{
			if(!OnSpeed){
				OnSpeed = true;
				MessageBoxA (NULL,"Movement Speed ON",CAPTION,MB_OK);
			}else{
				OnSpeed = false;
				MOVE_SPEED(450.0);
				MessageBoxA (NULL,"Movement Speed OFF",CAPTION,MB_OK);
			}
		}
		//==================================================================================================

		//THIS BM2, COMBO AND NSD IS ONLY WORK IN WIN 7 32BIT AND 64BIT

		//================================ NO COOLDOWN BM2 =================================================
		if (GetKeyState(VK_F10) < 0) 
		{
			if(!OnBM2){
				OnBM2 = true;
				MessageBoxA (NULL,"No Cooldown BM2 ON",CAPTION,MB_OK);
			}else{
				OnBM2 = false;
				MessageBoxA (NULL,"No Cooldown BM2 OFF",CAPTION,MB_OK);
			}
		}
		//==================================================================================================
		
		//================================ PERFECT COMBO ===================================================
		if (GetKeyState(VK_F9) < 0) 
		{
			if(!OnCombo){
				OnCombo = true;
				MessageBoxA (NULL,"PERFECT COMBO ON",CAPTION,MB_OK);
			}else{
				OnCombo = false;
				MessageBoxA (NULL,"PERFECT COMBO OFF",CAPTION,MB_OK);
			}
		}
		//==================================================================================================

		//================================ NO SKILL DELAY ==================================================
		if (GetKeyState(VK_F8) < 0) 
		{
			if(!OnNSD){
				OnNSD = true;
				MessageBoxA (NULL,"No Skill Delay ON",CAPTION,MB_OK);
			}else{
				OnNSD = false;
				MessageBoxA (NULL,"No Skill Delay OFF",CAPTION,MB_OK);
			}
		}
		//==================================================================================================

		//================================ FREEZING VALUE ==================================================
		if(OnSpeed) MOVE_SPEED(600.0);
		if(OnBM2) NOCD_BM2();
		if(OnCombo) NOCD_COMBO();
		if(OnNSD) NSD();
		//==================================================================================================

		Sleep(1);
	}

 

7. Make it Release to prevent error “msvcp100d.dll”
If you don’t install C++ Redistribution. You will encounter DLL problem.
DEBUG = msvcp100d.dll
RELEASE = msvcp100.dll

spacer.png

 

8. Now Click Build on Menu then Build MySampleDLL

spacer.png

 

9. After build DLL you will be see “Build succesed” Final step is open the Compiled DLL.
Click Show All Files > Right Click Release > Click Open Folder in Windows Explorer.

spacer.png

 

And you be see the MySampleDLL.dll

spacer.png

 

All done.

 

 

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...