 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Fri Nov 23, 2007 11:44 am Post subject: WPM delphi |
|
|
Well since I had problems with kaspers TUT, I searched for another, with results.
It's really nice and it WORKS. First I tried to nop a adress:
| Code: | procedure TForm1.Button1Click(Sender: TObject);
var
WindowName: Integer;
ProcessId: Integer;
ThreadId: Integer;
buf: PChar;
HandleWindow: Integer;
Write: Cardinal;
const
Address = $00488C02;
PokeValue = $90;
NumberOfBytes = 2;
begin
WindowName := FindWindow(NIL, 'MapleStory');
if WindowName = 0 then
begin
MessageDlg('Program not running.', mtWarning, [mbOK], 0);
end;
ThreadId := GetWindowThreadProcessId(WindowName, @ProcessId);
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId);
GetMem(buf, 1);
buf^ := Chr(PokeValue);
WriteProcessMemory(HandleWindow, ptr(Address), buf, NumberOfBytes, Write);
FreeMem(buf);
CloseHandle(HandleWindow);
end; |
Worked perfect, but how to I use more bytes like
| Code: | | 0F 86 6C FF FF FF 83 FA 7B 0F 87 63 FF FF FF A1 |
I can't get it working, HLP PLIZ
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Fri Nov 23, 2007 12:02 pm Post subject: |
|
|
| Stick the bytes into an array then write that array.
|
|
| Back to top |
|
 |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Fri Nov 23, 2007 12:10 pm Post subject: |
|
|
Im not sure, but couldnt you just set the poke value as
$0F $86 $6C $FF $FF $FF $83 $FA $7B $0F $87 $63 $FF $FF $FF $A1
, im not sure if you add commas, but just try it and see if it works
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Fri Nov 23, 2007 12:17 pm Post subject: |
|
|
| slippppppppp wrote: | Im not sure, but couldnt you just set the poke value as
$0F $86 $6C $FF $FF $FF $83 $FA $7B $0F $87 $63 $FF $FF $FF $A1
, im not sure if you add commas, but just try it and see if it works  |
Already tried, no.
Flyte: Ok, now how do I inject it?
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Fri Nov 23, 2007 12:24 pm Post subject: |
|
|
| rEakW0n wrote: | | Flyte: Ok, now how do I inject it? |
Give WPM the address of the array and for the number of bytes you want to write put the size of the array.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Fri Nov 23, 2007 12:34 pm Post subject: |
|
|
so like that:
| Code: | | iNJECTArray: Array [0..15] of Byte =($0F, $86, $6C, $FF, $FF, $FF, $83, $FA, $7B, $0F, $87, $63, $FF, $FF, $FF, $A1); |
But I dont get it how to add it in the WPM() procedure.
HAPL PLOX
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Fri Nov 23, 2007 12:35 pm Post subject: |
|
|
the array of byte method is by Renko, the Hex is by me
Edit: What makes me confused is that it works perfect to me in C but in Delphi it does trouble
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Fri Nov 23, 2007 12:39 pm Post subject: |
|
|
| rEakW0n wrote: | so like that:
| Code: | | iNJECTArray: Array [0..15] of Byte =($0F, $86, $6C, $FF, $FF, $FF, $83, $FA, $7B, $0F, $87, $63, $FF, $FF, $FF, $A1); |
But I dont get it how to add it in the WPM() procedure.
HAPL PLOX |
I really don't know Delphi, I only know how to read the code. So don't be surprised if this is riddled with errors.
| Code: | bytearraay: Array [0..15] of Byte =($0F, $86, $6C, $FF, $FF, $FF, $83, $FA, $7B, $0F, $87, $63, $FF, $FF, $FF, $A1);
... Junk here ...
WriteProcessMemory(HandleWindow, ptr(Address), PChar(bytearray), 16, Write); |
|
|
| Back to top |
|
 |
rapion124 Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Mar 2007 Posts: 1095
|
Posted: Fri Nov 23, 2007 1:25 pm Post subject: |
|
|
@Flyte: You can't store values in an array like that. The compiler will throw an error. You must store each array separately.
The easiest way would be to use the inline asm compiler. Declare poke bytes as an array of bytes [0..15]. Then add this to the beginning of your code.
| Code: |
begin
asm
PokeBytes:
DB $0F $86 $6C $FF $FF $FF $83 $FA $7B $0F $87 $63 $FF $FF $FF $A1
end;
end;
|
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Fri Nov 23, 2007 1:47 pm Post subject: |
|
|
| rapion124 wrote: | | @Flyte: You can't store values in an array like that. The compiler will throw an error. You must store each array separately. |
Just tested it, and the compiler did not throw an error, it worked perfectly. Check again.
_________________
|
|
| Back to top |
|
 |
|
|
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
|
|