FTBGUIDE

More Tutorials More Hacking
 
HomeHome  PortalPortal  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Astig FM
By: Jhun»

Share | 
 

 Talking [TUTORIAL] Making a Trainer Using C++ in easiest way

Go down 
AuthorMessage
cLue
Legendary
Legendary
avatar

Posts : 52
AP : 2147505567
Join date : 14/08/2012

PostSubject: Talking [TUTORIAL] Making a Trainer Using C++ in easiest way   Fri Feb 14, 2014 8:50 am

Well most of players want to learn how to create a DLL to inject in cabalmain. Now it's your turn to Create you own DLL using C++.

Take notes: making it simply or coding it in only 1 C++ Files it will result to Complexity so i applied Object Oriented Programming (OOP) to keep it neat, clean, easy to understand and easy to update.

Added Sampe Cheat and Used Multi Level Pointer
-Change Nation
-Movement Speed
-No Cooldown BM2
-Perfect Combo
-No Skill Delay
Requirements

1.) Visual Studio 2005/2008/2010/2012
2.) Microsoft Visual C++ 2010 Redistributable Package (x86)
Injector might be use
1.) Airdrop Injector
2.) PerX Injector
3.) Asian Injector 3

1.) Run Visual Studio then Click New Project.

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

3.) After clicking OK Button, the next window pop-up with “Previous”,”Next”, “Finish”,”Cancel”. Click Next Button
4.) Choose DLL then checked Empty Project then hit Finish Button

5.) After clicking finish, you will see like this.

6.) On 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.


Now will add some sample code.
AllDefines.h
Code:
//============================================================= 1.0.0.200 ========================================================

//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
Code:
#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
Code:
#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);
   }

}
MainDLL.cpp
Code:
#include <windows.h>

extern void Start();

//=========================================================== STARTING POINT =======================================================
BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
    switch ( dwReason ) {
        case DLL_PROCESS_ATTACH:

            DisableThreadLibraryCalls(hModule);

       CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Start, 0, 0, 0);      
       MessageBoxA (NULL,"Cheat Activated","My Sample DLL",MB_OK);
            break;            
        case DLL_PROCESS_DETACH:
            break;
        case DLL_THREAD_ATTACH:
            break;
        case DLL_THREAD_DETACH:
            break;
    }
    return TRUE;
}
//===================================
6.) 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

7.) Click Build on Menu then Build MySampleDLL

8.) After build DLL you will see “Build succeeded” Now the final step is open the Compiled DLL.
On Solution Explorer Click Show All Files > Right Click Release > Click Open Folder in Windows Explorer.

You will see the MySampleDLL.dll


Special Thanks:
-rantenor for ep9 CE table based on Cabal NA (Support Win 7 32bit and 64bit Only)
-PSCBots for Simple C++ Code of AOE
Back to top Go down
View user profile
Jhun»
VIPMEMBER
VIPMEMBER
avatar

Posts : 65
AP : 20038
Join date : 28/02/2013

PostSubject: Re: Talking [TUTORIAL] Making a Trainer Using C++ in easiest way   Sat May 10, 2014 4:39 am

I use

cheat=!cheats;
Back to top Go down
View user profile
alren10
Member
Member


Posts : 9
AP : 15589
Join date : 10/05/2014
Age : 28
Location : batangas

PostSubject: Re: Talking [TUTORIAL] Making a Trainer Using C++ in easiest way   Sat May 10, 2014 12:59 pm

thank you sir  bounce 
Back to top Go down
View user profile
cLue
Legendary
Legendary
avatar

Posts : 52
AP : 2147505567
Join date : 14/08/2012

PostSubject: Re: Talking [TUTORIAL] Making a Trainer Using C++ in easiest way   Fri May 16, 2014 10:03 am

alren10 wrote:
thank you sir  bounce 
Welcome
Back to top Go down
View user profile
weakdaw
Member
Member


Posts : 1
AP : 15571
Join date : 11/05/2014

PostSubject: Re: Talking [TUTORIAL] Making a Trainer Using C++ in easiest way   Sat May 17, 2014 4:18 am

Nc TuT

Keep Sharing !
Back to top Go down
View user profile
Jhun»
VIPMEMBER
VIPMEMBER
avatar

Posts : 65
AP : 20038
Join date : 28/02/2013

PostSubject: Re: Talking [TUTORIAL] Making a Trainer Using C++ in easiest way   Sat May 17, 2014 12:19 pm

EHHEHEHEHEHE
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Talking [TUTORIAL] Making a Trainer Using C++ in easiest way   

Back to top Go down
 
Talking [TUTORIAL] Making a Trainer Using C++ in easiest way
Back to top 
Page 1 of 1
 Similar topics
-
» Lot Plotting Tutorial in Autocad (Data Input using Excel)
» STAIR MYTH (ORO. PLATA. MATA)
» Blender for Architecture (Tutorial)
» lot plotting????
» CARPET Tutorial (Vray for Sketchup)

Permissions in this forum:You cannot reply to topics in this forum
FTBGUIDE :: MMO RPG Games :: Cabal PH (Tools , Tutorials,SourceCode)-
Jump to: