How to make C++ trainers for Warrock

Posts 115 of 53 · Page 1 of 4
How to make C++ trainers for Warrock
How to make C++ trainers for Warrock
By cobra


[hide]
1)Open C++,Goto file/new/ MFC app wisard.exe
Make Project name: example = (My trainer), then hit ok
Now it asks you what type of application you want to make(clcik dialog based),hit next
now it asks what features would you like to include(leave same)Next
it asks what other support(Unclick ActiveX Controls),Hit next and finish,it opens a new window, hit ok

We now have our trainer template (or better known as Dialog)

2)Remove the crap on the Dialog(buttons,text,etc.)
Resize if needed
Lets make our trainer load warrock process
Right Click on the dialog,hit Class wizard,new window will open,hit edit code

This is were all the codeing goes
Scroll to the top of code look for this
Code:
// my trainerDlg.cpp : implementation file
//

#include "stdafx.h"
#include "my trainer.h"
#include "my trainerDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Right under #endif put this code

Code:
DWORD proc_id;
HANDLE hProcess;

void memory()
{
HWND hWnd = FindWindow(0, "WarRock");
GetWindowThreadProcessId(hWnd, &proc_id);
hProcess = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, proc_id);
}
This is what it should look like

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

#include "stdafx.h"
#include "my trainer.h"
#include "my trainerDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
DWORD proc_id;
HANDLE hProcess;

void memory()
{
HWND hWnd = FindWindow(0, "WarRock");
GetWindowThreadProcessId(hWnd, &proc_id);
hProcess = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, proc_id);
}
We have now set the process to warrock(you can use this on any game,just change the warrock to whatever game process)

Lets move on

Go back to your Dialog(Hit window button (next to help button up top),hit My trainer(dialog)

Add a button(click on a button,drag it to dialog)
right click it,hit properties(change the caption,this is the name of the button)
Lets make it Scope On
Now right click it again and hit Class Wizard



When you Highlight BN_CLICKED(Hit add Function button)
replace the highlight part only!!!!!!!(OnButton1),only change Button1 to ScopeOn
so it will look like this(OnScopeOn)
now while we are here in the function for ScopeOn button,lets set the code for our button.Hit teh edit code button

it takes you to this wich is highlighted
// TODO: Add your control notification handler code here
we will replace this with our code,notice its inbetween 2 astereks or w/e they are
Code:
 void CMytrainerDlg::OnScopeOn() 
                 {
	// TODO: Add your control notification handler code here
                  }
This is what it should look like
Code:
void CMytrainerDlg::OnScopeOn() 
{
Writelong(0x943A16, 1);
}
EDIT:Forgot Functions
ok above the last bit of codeing add this for writelong function
(just add some space above your last bit of codeing)

Code:
void Writelong(long addy, long value)
{
    memory();
	WriteProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &value, sizeof(value), NULL);

}
void WritePointerFloat(long addy, short offset, float value)
{
	long maddy;
	long saddy;
	memory();
	ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
	saddy = maddy + offset;
	WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}

NOW,lets build our trainer
first we must compile so lets rebiuld (goto the build button,hit rebuild all,uptop)
to see if we have any errors
if you did everything correct as shown(you shouldnt get any errors)
If you get no errors then go back to build button/hit build my trianer.exe
your project will be located in your C++ folder,in my projects.


now we have made a simple scope hack(I know buttons arnt good for scope,this was just to show you how to do it in C++(all the functions are there to make any hack that doesnt need a timer to freese it.[/hide]


heres the source files and trainer in the debug folder
hope this helps
My Trainer1.rarattachment deleted · 757 downloads before removal
Cool does this cover the GUI as well?
idk,what is gui,haah i know some c++ and d3d but im still a noob to certain stuff.so what is gui???

this is how to do warrock hacks in C++ with fuctions to make it work.it has the source files and the trainer too,try it.
Yea ima try to compile it later.... im a newb too.... GUI stands for Graphic User Interface..... like instead of only text it has a window with like buttons and stuff. The complete opposite of DOS.

but yea i see now it is text based so noooos it doesnt have a GUI... trying to find some tuts on em...
what complier is this for?
Quote Originally Posted by gaurav100in View Post
lol
Why bother spamming?
i use vc6++,for all my C++ apps.
...........help?
Ok i am using Microsoft Visual C++ Express Edition 2005, and i cant find the MFC application wizard. It's just not there..... help?
c++
hello i must need helps for do an hack with c++.Where can i find a guide for it?thanks a lot
Quote Originally Posted by nukeist_ View Post
Ok i am using Microsoft Visual C++ Express Edition 2005, and i cant find the MFC application wizard. It's just not there..... help?
MFC isn't included in Express Edition.

And as for this code, lol, it's very amateurish, but I guess a great starting point for those who don't have any sort of grasp of C/C++.

Suggested improvements:

Use VirtualProtectEx() before and after the WriteProcessMemory() calls to make sure memory isn't protected.

Remove all the extra shit from the OpenProcess() call, if you use PROCESS_ALL_ACCESS, the rest of the flags are redundant, and if you or them together like that, you may actually be unsetting the flags.

Maybe I'll write up a simple tutorial when I have time.
One suggestion... don't use a MFC to write a hack. That is foolish enough.

There are plenty of other ways of displaying a form without using a MFC.
I admittedly use WTL, but that's because I fucking hate GUI coding. I'm currently writing some simple IPC client/server classes so my launcher can communicate with my injected DLL efficiently. So yeah, I'm not exactly well-versed in the type of paradigms currently used in GUI programming. I'm more a back-end programmer. You know, code that actually does something.
all ya haters talk shit but were your tuts,O_o You dont have any,that are any good at least.My shit works dont knock it.Its a very basic way in c++ to do trainers,so kiss my ass mother fuckers.its for teh noobs anyways.
What's the saying? Those who can't do teach?

Notice you're a VIP, relying on the hacks of others.

I, on the other hand, rely on myself and my own skills.

Rethink your position.

By the way, YOUR tutorial?

Way to cut and paste, and leave out screenshots.

Who is the noob now, eh?
Posts 115 of 53 · Page 1 of 4
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?