Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Help with C++ Trainer - CODE INSIDE

Help with C++ Trainer - CODE INSIDE

Posts 1–3 of 3 · Page 1 of 1
BA
bagpiperdude90
Help with C++ Trainer - CODE INSIDE
oook. So, I've got a trainer that works for static addresses. here's the code (credits to whomever it is due):

Code:
// trainer_tut1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
/* --------- TUTORIAL: Making your first Trainer -------- */
/* --------- by Anonymous - posted on mpgh.net   -------- */

#include <windows.h>
#include <conio.h>
#include <dos.h>
#include <tlhelp32.h>
#include <stdio.h>


int stamina = 1;	// will store the stamina value

bool dostamina = false;		// determines if user activated stamina freezing

LPVOID stamina_addr =	(void*) 0x00943A16;		// memory address of the stamina value in the WarRock process

void screen()	// output
{
	printf("Hello World! This is my first WarRock trainer!  \n\n");
	
	if(dostamina) printf("[1] - Get Scope [ENABLED]\n");	// if user enabled stamina freeze, let him know!
	else printf("[1] - Get Scope [disabled]\n");			// same if it's disabled
}

int main(int argc, char* argv[])
{	
	HANDLE hProcessSnap;	// will store a snapshot of all processes
	HANDLE hProcess = NULL;	// we will use this one for the WarRock process
	PROCESSENTRY32 pe32;	// stores basic info of a process, using this one to read the ProcessID from
	
	hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );	// make process snapshot

	pe32.dwSize = sizeof( PROCESSENTRY32 );		// correct size

	Process32First(hProcessSnap, &pe32);	// read info about the first process into pe32

	do	// loop to find the WarRock process
	{		
		if(strcmp(pe32.szExeFile, "WarRock.exe") == 0)	// if WarRock was found
		{
			hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);	// open it, assigning to the hProcess handle
			break;	// break the loop
		}
	}
	while(Process32Next(hProcessSnap, &pe32));	// loop continued until Process32Next deliver NULL or its interrupted with the "break" above

	CloseHandle( hProcessSnap );	// close the handle 

	if(hProcess == NULL)	// self explanatory tbh
	{
		printf("WarRock not found\n\n");
		getch();	// wait for a key press. otherwise the app will just close so fast when the process is not found, you wont know wtf happened.
	}
	else
	{
		screen();	// print the display
		
		char key = ' ';	// make a key variable to store pressed keys
		
		while(key != VK_ESCAPE)	// loop until user presses Escape
		{
			
			if(kbhit())		// if a key was pressed
			{
				key = getch();	// it is saved into "key"

				switch(key)		// here the commands are handled depending on the key that was pressed
				{				// case '1': ... break;  case '2': ... break; and so on
				case '1':
					dostamina = !dostamina;		// flip the dostamina value true<->false to enable/disable it
					ReadProcessMemory(hProcess, stamina_addr, &stamina, 4, NULL);	// read the stamina value from the memory into the "stamina" variable
					break;			
				}

				screen();	// print the display after each key press

			}

			stamina = 1;
			if(dostamina)	// if stamina freeze is activated
				WriteProcessMemory(hProcess, stamina_addr, &stamina, 4, NULL);	// write the stamina value that was saved before with the key press into memory
		}

		CloseHandle(hProcess);	// close the handle
		
	}

	return 0;	// THE END
}

But, I want to let me edit addresses with pointers (offsets, whatever you wanna call them). So, i found something else to try, and integrated it into my code. Here's the full code:

Code:
// my trainerDlg.cpp : implementation file
//

#include "stdafx.h"
#include <windows.h>
#include <conio.h>
#include <dos.h>
#include <tlhelp32.h>
#include <stdio.h>

long addy = 0x008B5288;
short offset = 180;
int value = 10000;
long maddy;
long saddy;

long stamina = 1;	// will store the stamina value

bool dostamina = false;		// determines if user activated stamina freezing


void screen()	// output
{
	printf("Trainer test ver. 1.3  \n\n");
	
	if(dostamina) printf("[1] - SuperJump [ENABLED]\n");	// if user enabled stamina freeze, let him know!
	else printf("[1] - SuperJump [disabled]\n");			// same if it's disabled
}

int main(int argc, char* argv[])
{	
	HANDLE hProcessSnap;	// will store a snapshot of all processes
	HANDLE hProcess = NULL;	// we will use this one for the WarRock process
	PROCESSENTRY32 pe32;	// stores basic info of a process, using this one to read the ProcessID from
	
	hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );	// make process snapshot

	pe32.dwSize = sizeof( PROCESSENTRY32 );		// correct size

	Process32First(hProcessSnap, &pe32);	// read info about the first process into pe32

	do	// loop to find the WarRock process
	{		
		if(strcmp(pe32.szExeFile, "WarRock.exe") == 0)	// if WarRock was found
		{
			hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);	// open it, assigning to the hProcess handle
			break;	// break the loop
		}
	}
	while(Process32Next(hProcessSnap, &pe32));	// loop continued until Process32Next deliver NULL or its interrupted with the "break" above

	CloseHandle( hProcessSnap );	// close the handle 

	if(hProcess == NULL)	// self explanatory tbh
	{
		printf("WarRock not found\n\n");
		getch();	// wait for a key press. otherwise the app will just close so fast when the process is not found, you wont know wtf happened.
	}
	else
	{
		screen();	// print the display
		
		char key = ' ';	// make a key variable to store pressed keys
		
		while(key != VK_ESCAPE)	// loop until user presses Escape
		{
			
			if(kbhit())		// if a key was pressed
			{
				key = getch();	// it is saved into "key"

				switch(key)		// here the commands are handled depending on the key that was pressed
				{				// case '1': ... break;  case '2': ... break; and so on
				case '1':
					dostamina = !dostamina;		// flip the dostamina value true<->false to enable/disable it
					ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);	// read the stamina value from the memory into the "stamina" variable
					break;			
				}

				screen();	// print the display after each key press

			}

			if(dostamina)	// if stamina freeze is activated
			{
				saddy = maddy + offset;
				value = 10000;
				WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, 4, NULL);
			}
		}

		CloseHandle(hProcess);	// close the handle
		
	}

	return 0;	// THE END
}
the first one, static addresses, works beautifully. However, when I try to use pointers, nothing happens at all. What am I doing wrong?

BTW: both compile fine in Microsoft Visual C++ 2005 Express Edition, which is free, of off MS website. Just google it.

Also, this is C++ NOT VISUAL BASIC. Couldn't for the life of me figure out Microsoft Visual Basic 2005 Express Edition.

Before you accuse me of coming here trying to find an easy way out, I've looked to freaking page 30 on google, using multiple searches. Also, I am fluent in PHP, so I know what I'm doing... sorta.

First code sets scope, second code should set superjump. Whats wrong?
#1 · 18y ago
cjg333
cjg333
yo you probly have to define your offset or create the function for a pointer,not really sure is this a win32 app,or mfc app?,well hit me up il try to help you msn cjg9590@hotmail.com
#2 · 18y ago
BA
bagpiperdude90
figured it out. thanks for the offer, though!
#3 · 18y ago
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

  • help with makeing trainersBy damanis1 in WarRock - International Hacks
    4Last post 19y ago
  • Help With KWR TrainerBy Synns in WarRock Korea Hacks
    7Last post 19y ago
  • need help with some quick codesBy ravinghippie in Anti-Cheat
    1Last post 17y ago
  • Help with my Trainer...By tolb in WarRock - International Hacks
    12Last post 19y ago
  • [b]Need Some Help With My Trainer[/b]By shanky1 in Visual Basic Programming
    2Last post 19y ago

Tags for this Thread

None