|
You last visited: Today at 09:20
Advertisement
how to bring up the hp in delphi?
Discussion on how to bring up the hp in delphi? within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.
06/11/2012, 02:17
|
#1
|
elite*gold: 0
Join Date: Mar 2011
Posts: 13
Received Thanks: 0
|
how to bring up the hp in delphi?
How can we make delphi read through the hp of char pointers
?

|
|
|
06/11/2012, 02:53
|
#2
|
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
|
Code:
function THostchar.HP: TBounds;
var
HP, HPM: Cardinal;
eax, written, Base: cardinal;
begin
ReadProcessMemory(Self.Handle, ptr(self.Offsets.Addresses_base_Address), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + $1C), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + self.Offsets.Structural_Character), @Base, 4, written);
ReadProcessMemory(Self.Handle, ptr(Base + self.Offsets.Character_HP), @HP, 4, written);
ReadProcessMemory(Self.Handle, ptr(Base + self.Offsets.Character_Max_HP), @HPM, 4, written);
result.Current := HP;
result.Max := HPM;
Try
result.Percent := Round((HP / HPM) * 100);
except
result.Percent := 0;
End;
end;
|
|
|
06/11/2012, 03:24
|
#3
|
elite*gold: 0
Join Date: Mar 2011
Posts: 13
Received Thanks: 0
|
what's wrong in my code? 
thank you!
Code:
var
H, TI, PI, W, rw: DWORD;
eax, written, Base: cardinal;
HP, HPM: DWORD;
begin
H := FindWindow(nil, 'Element Client');
if (H <= 0) then
exit;
try
ReadProcessMemory(Self.Handle, ptr($00B3B24C), @eax, 4, written); //BASE
ReadProcessMemory(Self.Handle, ptr(eax + $1C), @eax, 4, written);
ReadProcessMemory(Self.Handle, ptr(eax + $34), @Base, 4, written);
ReadProcessMemory(Self.Handle, ptr(Base + $494), @HP, 4, written); //pointer HP
ReadProcessMemory(Self.Handle, ptr(Base + $4DC), @HPM, 4, written); //Pointer Hp Max
label1.Caption := IntToStr(HP);
label2.Caption := IntToStr(HPM);
finally
end;
|
|
|
06/11/2012, 11:13
|
#4
|
elite*gold: 0
Join Date: Mar 2009
Posts: 112
Received Thanks: 123
|
Try to finish the attempted usage of H (H := FindWindow(nil, 'Element Client')  , instead of using Self.Handle as process handle.
You know, something like...
H := FindWindow(nil, 'Element Client');
GetWindowThreadProcessId(H, @ProcessId);
GameHandle := OpenProcess(PROCESS_VM_READ, False, ProcessId);
where ProcessId is of type Integer;
Then use GameHandle instead of Self.Handle.
When using OpenProcess, check below link for access rights other than PROCESS_VM_READ:
|
|
|
06/11/2012, 13:34
|
#5
|
elite*gold: 0
Join Date: Mar 2011
Posts: 13
Received Thanks: 0
|
It was more or less like this:
Quote:
var
H, TI, PI, W, rw, GameHandle: DWORD;
eax, written, Base: cardinal;
HP, HPM: DWORD;
ProcessId: Integer;
begin
H := FindWindow(nil, 'Element Client');
GetWindowThreadProcessId(H, @ProcessId);
GameHandle := OpenProcess(PROCESS_VM_READ, False, ProcessId);
if (H <= 0) then
exit;
try
ReadProcessMemory(GameHandle, ptr($00B3B24C), @eax, 4, written); //BASE
ReadProcessMemory(GameHandle, ptr(eax + $1C), @eax, 4, written);
ReadProcessMemory(GameHandle, ptr(eax + $34), @Base, 4, written);
ReadProcessMemory(GameHandle, ptr(Base + $494), @HP, 4, written); //pointer HP
ReadProcessMemory(GameHandle, ptr(Base + $4DC), @HPM, 4, written); //Pointer Hp Max
label1.Caption := IntToStr(HP);
label2.Caption := IntToStr(HPM);
finally
end;
|
is something wrong?
Sorry but I am beginner hacks!
|
|
|
06/11/2012, 15:41
|
#6
|
elite*gold: 0
Join Date: Mar 2009
Posts: 112
Received Thanks: 123
|
Yes, something is wrong.
I'm sorry, but in the effort to reply quickly I made a mistake in the post above.
By no means did I plan to place a smilie face after "(nil, 'Element Client')". It was in fact intended to look like this:
Code:
(H := FindWindow(nil, 'Element Client');
I humbly apologize and I want to ensure you, that no winking was in fact implied at any point.
As for your code, it works.
Problem is either UAC or wrong window name. Make sure you run this thing of yours as administrator and recheck that game window doesn't happen to be named, I don't know, "Perfect World International" or something along those lines.
|
|
|
06/11/2012, 17:34
|
#7
|
elite*gold: 0
Join Date: Mar 2011
Posts: 13
Received Thanks: 0
|
It worked!
Thanks to everyone who helped me
|
|
|
Similar Threads
|
DELPHI - Who make Exploits, Hacks and Tools with DELPHI?
05/15/2013 - CO2 Programming - 13 Replies
Hi all.
Iwith DELPHI, but a dont now.
hello, I use Delphi to program and i like someone put here source code of make Exploits, Hacks and Tools bot here, or part of the code.
ty to all
|
[DELPHI&METIN]Wie sind die Delphi Befehle für einen Bot?
03/07/2010 - General Coding - 3 Replies
Hallo liebe com,
ich habe mal eine Frage: Ich möchte einen Metin Bot in Delphi schreiben aber ich weiß nicht die Befehle für
eine bestimmte Taste senden etc.
könnt ihr mir die pls sagen oder per pn geben
MfGGGGGG
|
PLS bring me to BotJail
11/13/2007 - Eudemons Online - 22 Replies
pls.
can someone give me a working hack/bot or only a tip which brings me fast into botjail.
pls help me.
|
All times are GMT +1. The time now is 09:20.
|
|