2011-07-04 19:52:53 +00:00
unit Unit6;
{$MODE Delphi}
interface
uses
LCLIntf, Messages, SysUtils, Classes, Graphics, Controls, Forms,
2021-03-26 00:10:44 +01:00
Dialogs, StdCtrls, Buttons, LResources, betterControls;
2011-07-04 19:52:53 +00:00
type
TForm6 = class( TForm)
Memo1: TMemo;
Button2: TButton;
Button1: TButton;
Label1: TLabel;
SpeedButton1: TSpeedButton;
procedure Button2Click( Sender: TObject) ;
procedure Button1Click( Sender: TObject) ;
procedure FormCreate( Sender: TObject) ;
procedure FormClose( Sender: TObject; var Action: TCloseAction) ;
procedure FormCloseQuery( Sender: TObject; var CanClose: Boolean ) ;
procedure SpeedButton1Click( Sender: TObject) ;
private
{ Private declarations }
i: ^ Integer ;
public
{ Public declarations }
end ;
var
Form6: TForm6;
implementation
2021-11-22 21:15:37 +01:00
uses Unit4, Unit7, frmHelpUnit, cetranslator;
2011-07-04 19:52:53 +00:00
2012-01-04 10:31:22 +00:00
resourcestring
rsWellDoneYouScrewedUpTheTutorial = 'Well done, you screwed up the tutorial!!!!' ;
rsStep5CodeFinderPW = 'Step 5: Code finder (PW=%s)' ;
2021-09-05 13:51:56 +02:00
rsTryAgain6 = 'This may look difficult, but it shouldn' 't be. Basically find health, right click health, find what overwrites it, change health, click replace, change health, '
+ 'done. But don' 't feel down if you don' 't get it. At least you know the basics of memory scanning... Are you sure you want to quit?' ;
2015-12-24 19:26:48 +01:00
rsLOSER = 'BOO' ;
2012-01-04 10:31:22 +00:00
rsTutorialStep5=
2021-09-05 13:51:56 +02:00
'Sometimes the location of a value is stored at changes, when you restart the game, or even while you' 're playing. In ' +
2012-01-04 10:31:22 +00:00
'that case you can use 2 things to still make a table that works.' + #13 #10 +
'In this step I' 'll try to describe how to use the Code Finder function.' + #13 #10 +
'' + #13 #10 +
2014-06-02 02:27:46 +00:00
'The value down here will be at a different location each time you start the tutorial, so a normal entry in the address ' +
2012-01-04 10:31:22 +00:00
'list wouldn' 't work.' + #13 #10 +
2021-09-05 13:51:56 +02:00
'First try to find the address. (You' 've got to this point so I assume you know how to do that.)' + #13 #10 +
2014-06-02 02:27:46 +00:00
'When you' 've found the address, right-click the address in Cheat Engine and choose "Find out what writes to this ' +
2012-01-04 10:31:22 +00:00
'address". A window will pop up with an empty list.' + #13 #10 +
2020-04-16 11:53:33 -04:00
'Then click on the Change value button in this tutorial, and go back to Cheat Engine. If everything went right, there ' +
2012-01-04 10:31:22 +00:00
'should be an address with assembler code there now.' + #13 #10 +
2021-09-05 13:51:56 +02:00
'Click it and choose the Replace option to replace it with code that does nothing. That will also add the code address ' +
'to the code list in the Advanced Options window. (Which gets saved if you save your table.)' + #13 #10 +
2012-01-04 10:31:22 +00:00
'' + #13 #10 +
2021-09-05 13:51:56 +02:00
'Click on Stop, so the game will start running normal again, and click on Close to close the window.' + #13 #10 +
2012-01-04 10:31:22 +00:00
'Now, click on Change value, and if everything went right the Next button should become enabled.' + #13 #10 +
'' + #13 #10 +
2021-09-05 13:51:56 +02:00
'Note: When you' 're freezing the address with a high enough speed it may happen that Next becomes visible anyhow.' ;
2012-01-04 10:31:22 +00:00
2011-07-04 19:52:53 +00:00
procedure TForm6. Button2Click( Sender: TObject) ;
begin
hide;
form7: = tform7. create( self) ;
2014-06-02 02:27:46 +00:00
form7. left: = left;
form7. top: = top;
form7. width: = width;
form7. height: = height;
2011-07-04 19:52:53 +00:00
form7. show;
end ;
procedure TForm6. Button1Click( Sender: TObject) ;
var j, k, l: integer ;
begin
//set new value
j: = i^ ;
k: = random( 1 0 0 0 ) ;
l: = 0 ;
while k= j do
begin
k: = random( 1 0 0 0 ) ;
inc( l) ;
if l= 1 0 0 then
2012-01-04 10:31:22 +00:00
raise exception. Create( rsWellDoneYouScrewedUpTheTutorial) ;
2011-07-04 19:52:53 +00:00
end ;
i^ : = k;
if i^ = j then button2. Enabled: = true ;
label1. Caption: = IntToStr( i^ ) ;
{$O+}
j: = 0 ;
k: = 0 ;
{$O-}
end ;
procedure TForm6. FormCreate( Sender: TObject) ;
var k: integer ;
begin
2014-05-22 07:53:26 +00:00
k: = 1 + random( 1 0 ) ;
2011-07-04 19:52:53 +00:00
while k> 0 do
begin
getmem( i, 4 ) ;
dec( k) ;
end ;
i^ : = 1 0 0 ;
2021-11-22 21:15:37 +01:00
caption: = altnamer( caption) ;
memo1. lines. text : = altnamer( rsTutorialStep5) ;
2012-01-04 10:31:22 +00:00
memo1. Lines. Insert( 0 , Format( rsStep5CodeFinderPW, [ inttostr( 8 8 8 8 9 9 ) ] ) ) ;
2011-07-04 19:52:53 +00:00
memo1. SelStart: = 0 ;
2016-09-05 21:17:11 +02:00
font. size: = 1 2 ;
2019-07-19 11:27:16 +02:00
frmHelp. attach( self, '5' ) ;
2011-07-04 19:52:53 +00:00
end ;
procedure TForm6. FormClose( Sender: TObject; var Action: TCloseAction) ;
begin
application. Terminate;
end ;
procedure TForm6. FormCloseQuery( Sender: TObject; var CanClose: Boolean ) ;
begin
2012-01-04 10:31:22 +00:00
canclose: = MessageDlg( rsTryAgain6, mtconfirmation, [ mbyes, mbno] , 0 ) = mryes;
2011-07-04 19:52:53 +00:00
end ;
procedure TForm6. SpeedButton1Click( Sender: TObject) ;
begin
2012-01-04 10:31:22 +00:00
showmessage( rsLOSER) ;
2011-07-04 19:52:53 +00:00
button2. Click;
end ;
initialization
{$i Unit6.lrs}
{$i Unit6.lrs}
end .