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".
Sorry my english =/
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);