Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Code Game Trainer Created By: Me.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Morph.C
Cheater
Reputation: 0

Joined: 15 Aug 2009
Posts: 29

PostPosted: Sat Aug 15, 2009 2:07 am    Post subject: Code Game Trainer Created By: Me. Reply with quote

Hello everyone, this is my code of a Trainer to hack a game. Made In Delphi.

Code:
Unit Trainer;

Interface

Uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, XPMan, tlhelp32, StdCtrls, Buttons, ExtCtrls, ComCtrls, Menus;


Type
  TGameTrainer = class(TForm)
    StatusBar: TStatusBar;
    Panel: TPanel;
    Select: TGroupBox;
    Manifest: TXPManifest;
    WaitTimer: TTimer;
    ActivationTimer: TTimer;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    CheckBox4: TCheckBox;
    CheckBox5: TCheckBox;
    procedure WaitTimerTimer(Sender: TObject);
    procedure ActivationTimerTimer(Sender: TObject);
end;

Var
  GameTrainer: TGameTrainer;
  Written: Cardinal;
  ChangeValue: array of byte;
  PidHandle: integer;
  PidID: integer;
  ContinueLoop: BOOL;
  FSnapshotHandle: THandle;
  FProcessEntry32: TProcessEntry32;
  Temp: Integer;
  ProcessId: DWORD;
  HandleWindow: THandle;
  ThreadID: Cardinal;

Const
  Value_16:  Array [1..16]  Of Byte = ($00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00);


implementation
{$R *.dfm}

Function GetProcessID(Const ExeFileName: string; var ProcessId: integer;Const ProcessNo :Integer = 1): boolean;
begin
result := false;
temp:=1;
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := Sizeof(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
 while integer(ContinueLoop) <> 0 do
  begin
   if (StrIComp(PChar(ExtractFileName(FProcessEntry32.szExeFile)), PChar(ExeFileName)) = 0)
     or (StrIComp(FProcessEntry32.szExeFile, PChar(ExeFileName)) = 0)  then
      begin
       If Temp = ProcessNo then
        begin
        ProcessId:= FProcessEntry32.th32ProcessID;
        result := true;
        break;
       end else inc(Temp);
      end;
     ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
    end;
  CloseHandle(FSnapshotHandle);
end;

procedure WriteArray(Address: Cardinal; ChangeValues: array of byte);
Begin
 if GetProcessID('ProcessGame.exe', PidID, 1) then
  Begin
    PidHandle:= OpenProcess(PROCESS_ALL_ACCESS,False,PidId);
    WriteProcessMemory(PidHandle, Pointer(Address), @ChangeValues, SizeOf(ChangeValues), Written);
    Closehandle(PidHandle);
  End;
End;

procedure WriteByte(Address: Cardinal; ChangeValues: Byte);
Begin
 if GetProcessID('ProcessGame.exe', PidID, 1) then
  Begin
    PidHandle:= OpenProcess(PROCESS_ALL_ACCESS,False,PidId);
    WriteProcessMemory(PidHandle, Pointer(Address), @ChangeValues, SizeOf(ChangeValues), Written);
    Closehandle(PidHandle);
  End;
End;

procedure TGameTrainer.WaitTimerTimer(Sender: TObject);
begin
if StatusBar.Panels[0].Text = 'Waiting The Game' then
StatusBar.Panels[0].Text := 'Waiting The Game.'
else if StatusBar.Panels[0].Text = 'Waiting The Game.' then
StatusBar.Panels[0].Text := 'Waiting The Game..'
else if StatusBar.Panels[0].Text = 'Waiting The Game..' then
StatusBar.Panels[0].Text := 'Esperando El GunBound...'
else if StatusBar.Panels[0].Text = 'Waiting The Game...' then
StatusBar.Panels[0].Text := 'Waiting The Game'
end;

procedure TGameTrainer.ActivationTimerTimer(Sender: TObject);
Begin
if GetProcessID('ProcessGame.exe', PidID, 1) then
Begin

If CheckBox1.Checked Then
Begin
WriteArray($008A6DA0,Value_16);
End;

If CheckBox2.Checked Then
Begin
WriteArray($008A6DB8,Value_16);
End;

If CheckBox3.Checked Then
Begin
WriteArray($008A6E88,Value_16;
End;

If CheckBox4.Checked Then
Begin
WriteByte($008A6E78,$48);
End;

If CheckBox5.Checked Then
Begin
WriteByte($008A6E78,$AB);
End;

StatusBar.Panels[0].Text := 'Hacked, Closing';
Close;
End;
End;

end.


Enjoy! and dont steal me the credits xD.
And Tell me if you have a problem whit it, to help yours.

Credits: Morph.C.


Last edited by Morph.C on Mon Aug 24, 2009 8:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Aug 15, 2009 6:17 am    Post subject: Reply with quote

now i dont care what you come on here and post. But dont take credits for the MAJOR functions that power your program.

The reason i say that is just the general nature of people here and also the fact that the indentation style is completely different.

Code:

procedure TGameTrainer.WaitTimerTimer(Sender: TObject);
begin
if StatusBar.Panels[0].Text = 'Waiting The Game' then
StatusBar.Panels[0].Text := 'Waiting The Game.'
else if StatusBar.Panels[0].Text = 'Waiting The Game.' then
StatusBar.Panels[0].Text := 'Waiting The Game..'
else if StatusBar.Panels[0].Text = 'Waiting The Game..' then
StatusBar.Panels[0].Text := 'Esperando El GunBound...'
else if StatusBar.Panels[0].Text = 'Waiting The Game...' then
StatusBar.Panels[0].Text := 'Waiting The Game'
end;

procedure TGameTrainer.ActivationTimerTimer(Sender: TObject);
Begin
if GetProcessID('ProcessGame.exe', PidID, 1) then
Begin

If CheckBox1.Checked Then
Begin
WriteArray($008A6DA0,Value_16);
End;

If CheckBox2.Checked Then
Begin
WriteArray($008A6DB8,Value_16);
End;

If CheckBox3.Checked Then
Begin
WriteArray($008A6E88,Value_16;
End;

If CheckBox4.Checked Then
Begin
WriteByte($008A6E78,$48);
End;

If CheckBox5.Checked Then
Begin
WriteByte($008A6E78,$AB);
End;

StatusBar.Panels[0].Text := 'Hacked, Closing';
Close;
End;
End;


Something tells me thats all you wrote


but i could be wrong and in that case i would apologize and say good job ;P

_________________


Last edited by HomerSexual on Sat Aug 15, 2009 6:29 am; edited 1 time in total
Back to top
View user's profile Send private message
top1
Newbie cheater
Reputation: 0

Joined: 21 Nov 2008
Posts: 11

PostPosted: Sat Aug 15, 2009 6:20 am    Post subject: Reply with quote

CAN I HAVE YOUR EMAIL ADDRESS ?
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Aug 15, 2009 6:28 am    Post subject: Reply with quote

top1 wrote:
CAN I HAVE YOUR EMAIL ADDRESS ?


lolwhat. Just private message him

_________________
Back to top
View user's profile Send private message
top1
Newbie cheater
Reputation: 0

Joined: 21 Nov 2008
Posts: 11

PostPosted: Sat Aug 15, 2009 6:50 am    Post subject: Reply with quote

blankrider wrote:
top1 wrote:
CAN I HAVE YOUR EMAIL ADDRESS ?


lolwhat. Just private message him


you have email i want some quiz to ask you
Back to top
View user's profile Send private message
Morph.C
Cheater
Reputation: 0

Joined: 15 Aug 2009
Posts: 29

PostPosted: Sat Aug 15, 2009 8:17 am    Post subject: WTF?? Reply with quote

Grandmaster Cheater Supreme, Eh Man.... what happen.. it is my code is 100% original of myself Confused. I'm not a Lecher '-'. sorry if you see other such codes. And Sorry for my english but i'm speak spanish and the google translator is bad Sad.
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sat Aug 15, 2009 8:34 am    Post subject: Re: WTF?? Reply with quote

Ðario ~ wrote:
Grandmaster Cheater Supreme, Eh Man.... what happen.. it is my code is 100% original of myself Confused. I'm not a Lecher '-'. sorry if you see other such codes. And Sorry for my english but i'm speak spanish and the google translator is bad Sad.


Then dont use the google translator Very Happy, try to write the english yourself, i dont care if your english aint perfect, nor if its not too good, mine is neither, and i find writing english a very good practice, especially when someone corrects my english.
Back to top
View user's profile Send private message
Morph.C
Cheater
Reputation: 0

Joined: 15 Aug 2009
Posts: 29

PostPosted: Sat Aug 15, 2009 9:21 am    Post subject: Reply with quote

Oh Okay Smile .
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sat Aug 15, 2009 4:00 pm    Post subject: Reply with quote

English is a very usefull thing to learn.
And next time you post a delphi project (which this obviously is) you might want to upload the entire project for us to get the gui aswell
Btw, what game is this for?
Back to top
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sun Aug 16, 2009 12:41 am    Post subject: Reply with quote

I think you would find programming much easier to understand with proper knowledge of English.
_________________
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Aug 16, 2009 12:52 am    Post subject: Reply with quote

angerist wrote:
I think you would find programming much easier to understand with proper knowledge of English.


Because programmers who don't speak English are completely helpless...

Are you kidding me?
Back to top
View user's profile Send private message
Polynomial
Grandmaster Cheater
Reputation: 5

Joined: 17 Feb 2008
Posts: 524
Location: Inside the Intel CET shadow stack

PostPosted: Mon Aug 17, 2009 7:37 pm    Post subject: Reply with quote

He has a point. All of the APIs are named in English, along with all keywords and class names, and most documentation. Learning a reasonable level of English would help him understand the function of a class much more quickly.
_________________
It's not fun unless every exploit mitigation is enabled.
Please do not reply to my posts with LLM-generated slop; I consider it to be an insult to my time.
Back to top
View user's profile Send private message
Morph.C
Cheater
Reputation: 0

Joined: 15 Aug 2009
Posts: 29

PostPosted: Mon Aug 17, 2009 7:42 pm    Post subject: Eh Wait A MOMENT I'm NOT A NEWBIE:...!!!!!!!!! Reply with quote

Sorry, not that speak English do not know if it is spoken but not to engage in a conversation.

I'm talking about are not very well up there for example.

And I understand the APIS, declarations and other things that exist in the programation, eh not all. but several do.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Tue Aug 18, 2009 7:43 am    Post subject: Reply with quote

Burningmace wrote:
He has a point. All of the APIs are named in English, along with all keywords and class names, and most documentation. Learning a reasonable level of English would help him understand the function of a class much more quickly.


uhm but we dont think of API in terms of english, we see it as computer terms, just as non english speaking would. It is just memorization

_________________
Back to top
View user's profile Send private message
Polynomial
Grandmaster Cheater
Reputation: 5

Joined: 17 Feb 2008
Posts: 524
Location: Inside the Intel CET shadow stack

PostPosted: Thu Aug 20, 2009 4:02 am    Post subject: Reply with quote

True, but the name is important. For example, you're using a new library and it contains APIs (see below) for image manipulation, and you want one that inverts the image's colours - which do you use?
Code:
Projiejsst
Knutt
AvbeerestenLusse
Opknaa

No idea, right?

Whereas this is much easier:
Code:
LoadImage
Rotate
GetPixel
Invert


Before you get confused, the first ones were made up and aren't any language that exists - but that's how it feels to read a language you don't understand. Learning basic English helps identify the function of APIs and classes. It's an inarguable truth.

To the original poster - I'm sorry that this thread got derailed a little and that it seems like we're bitching about your English, we don't mean to offend.

_________________
It's not fun unless every exploit mitigation is enabled.
Please do not reply to my posts with LLM-generated slop; I consider it to be an insult to my time.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites