[Delphi] Problem with target.

10/05/2009 21:22 louco89#1
Well, I'm a little problem, I am creating a component in Delphi for the facilitate the lives of those who want to create a bot or something, but I can not set the "target", you get all the other information such as hp and mp, my only problem being that, if someone can give me an idea of how to do this I am grateful. Below is the code I'm using to try to define the "target".

Code:
var
  PH : THandle;
  PID, ThID : DWORD;
  b : DWORD;
  H : THandle;
  currentvalue: Integer;
  valueTarget: Integer;
begin
//
H := FindWindow(nil, Pchar(FWindow));
if (H=0) then exit;
ThID := GetWindowThreadProcessId(H, @PID);
PH := OpenProcess(PROCESS_ALL_ACCESS,FALSE,PID);
readprocessmemory(PH,Ptr(OFFBase),@currentvalue,SizeOF(currentvalue),b);
currentvalue:=currentvalue+$20;
readprocessmemory(PH,ptr(currentvalue),@currentvalue,SizeOF(currentvalue),b);
currentvalue:=currentvalue+OffTarget;
writeprocessmemory(PH,ptr(currentvalue),@valueTarget,SizeOF(valueTarget),b);
Sorry my english =/
10/07/2009 01:59 BuBucekTop#2
Man, you're going wrong...
The only way to properly set target is to use code injection. Look ath this thread [Only registered and activated users can see links. Click Here To Register...], find correct call-address for your client and enjoy targeting =)
10/07/2009 18:02 louco89#3
I had seen it, but I thought it gave no inject, thanks anyway I will give a studied and do through inject.