| 1 | UNIT Unit11; | 
 
 
 
 
 | 2 |  | 
 
 
 
 
 | 3 | INTERFACE | 
 
 
 
 
 | 4 |  | 
 
 
 
 
 | 5 | USES | 
 
 
 
 
 | 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | 
 
 
 
 
 | 7 | Dialogs, StdCtrls, ExtCtrls; | 
 
 
 
 
 | 8 |  | 
 
 
 
 
 | 9 | TYPE | 
 
 
 
 
 | 10 | TForm11 = Class(TForm) | 
 
 
 
 
 | 11 | edit_address: TEdit; | 
 
 
 
 
 | 12 | timer_check_value: TTimer; | 
 
 
 
 
 | 13 | Label1: TLabel; | 
 
 
 
 
 | 14 | Label2: TLabel; | 
 
 
 
 
 | 15 | Label3: TLabel; | 
 
 
 
 
 | 16 | PROCEDURE timer_check_valueTimer(Sender: TObject); | 
 
 
 
 
 | 17 | PROCEDURE FormCloseQuery(Sender: TObject; var CanClose: Boolean); | 
 
 
 
 
 | 18 | PRIVATE | 
 
 
 
 
 | 19 | PUBLIC | 
 
 
 
 
 | 20 | END; | 
 
 
 
 
 | 21 |  | 
 
 
 
 
 | 22 | VAR | 
 
 
 
 
 | 23 | Form11: TForm11; | 
 
 
 
 
 | 24 |  | 
 
 
 
 
 | 25 | CONST | 
 
 
 
 
 | 26 | address_script_var_pointer:LongWord=$10EC0; | 
 
 
 
 
 | 27 |  | 
 
 
 
 
 | 28 | IMPLEMENTATION | 
 
 
 
 
 | 29 |  | 
 
 
 
 
 | 30 | {$R *.dfm} | 
 
 
 
 
 | 31 |  | 
 
 
 
 
 | 32 | USES Unit1,Unit2,Unit3,Unit5,Unit6,Unit7,Unit8,Unit9,Unit10; | 
 
 
 
 
 | 33 |  | 
 
 
 
 
 | 34 | PROCEDURE TForm11.FormCloseQuery(Sender: TObject; var CanClose: Boolean); | 
 
 
 
 
 | 35 | BEGIN | 
 
 
 
 
 | 36 | Self.Visible:=False; | 
 
 
 
 
 | 37 | CanClose:=False; | 
 
 
 
 
 | 38 | Form1.Menu_Patch_Scriptvars.Checked:=False; | 
 
 
 
 
 | 39 | END; | 
 
 
 
 
 | 40 |  | 
 
 
 
 
 | 41 | FUNCTION patch_scriptvars_loaded:Boolean; | 
 
 
 
 
 | 42 | CONST check_for:LongWord=$0B395BE9; | 
 
 
 
 
 | 43 | address_at:LongWord=$479470; | 
 
 
 
 
 | 44 | BEGIN | 
 
 
 
 
 | 45 | IF Decode_Int(ReadMem(address_at,4))=check_for THEN result:=True | 
 
 
 
 
 | 46 | ELSE result:=False; | 
 
 
 
 
 | 47 | END; | 
 
 
 
 
 | 48 |  | 
 
 
 
 
 | 49 | PROCEDURE TForm11.timer_check_valueTimer(Sender: TObject); | 
 
 
 
 
 | 50 | BEGIN | 
 
 
 
 
 | 51 | IF _connected AND patch_scriptvars_loaded THEN BEGIN | 
 
 
 
 
 | 52 | edit_address.Text:=IntToHex(Decode_Int(ReadMem(address_script_var_pointer,4)),8); | 
 
 
 
 
 | 53 | END; | 
 
 
 
 
 | 54 | END; | 
 
 
 
 
 | 55 |  | 
 
 
 
 
 | 56 | END. |