Damlox napisał
Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
Ostatnio zmieniony przez Vivynus : 10-07-2008, 14:59
MemWriteInteger(battlelist_start+(i*160)+distance_outfit, 60, 2); // distance_outfit - odległość do adresu outfitu, 60 - nowy wygłąd, 2 - długość wartości
Ostatnio zmieniony przez Vivynus : 13-07-2008, 12:17
function findplayerbyid(id: integer);
var
i: integer;
begin
for i:=0 to 150 do
begin
if (ReadMemInteger(battlelist_start+(i*160)-4) = id) then
begin
Result :=i;
exit;
end;
end;
end;
Ostatnio zmieniony przez Damlox : 13-07-2008, 21:52
Ostatnio zmieniony przez Ar'buz : 13-07-2008, 19:48
unit Bot;
interface
uses //Tutaj[Fatal Error] Tibia_bot.dpr(5): Could not compile used unit 'bot.pas'
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
// Funkcje czytające
function MemReadString(Address: Integer): String;
var
NB : LongWord;
Temp : ARRAY [1..255] OF Byte;
I : Byte;
IDProcess, proc_ID : Cardinal;
begin
GetWindowThreadProcessID(FindWindow('TibiaClient', nil), #proc_ID);
IDProcess := OpenProcess(PROCESS_ALL_ACCESS, false, proc_ID);
Result := '';
ReadProcessMemory(IDProcess, Ptr(Address), #Temp[1], 255, NB);
for I := 1 to 255 do
begin
if ((Temp[i] = 0) or (Temp[i] = $0F)) then
Break;
Result := Result + Chr(Temp[i]);
end;
end;
function ReadMemInteger(Address: Cardinal): Cardinal; //Read adress:value
var
ProcId: Cardinal;
tProc: THandle;
NBR: Cardinal;
value:integer;
begin
GetWindowThreadProcessId(FindWindow('TibiaClient',Nil), #ProcId);
tProc:= OpenProcess(PROCESS_ALL_ACCESS, False, ProcId);
ReadProcessMemory(tProc, Ptr(Address), #value, 4, NBR);
CloseHandle(tProc);
Result:=value;
end;
unit Bot;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
// Funkcje czytające
function ReadMemInteger(Address: Cardinal): Cardinal; //Read adress:value
var
ProcId: Cardinal;
tProc: THandle;
NBR: Cardinal;
value:integer;
begin
GetWindowThreadProcessId(FindWindow('TibiaClient',Nil), @ProcId);
tProc:= OpenProcess(PROCESS_ALL_ACCESS, False, ProcId);
ReadProcessMemory(tProc, Ptr(Address), @value, 4, NBR);
CloseHandle(tProc);
Result:=value;
end;
function MemReadString(Address: Integer): String;
var
NB : LongWord;
Temp : ARRAY [1..255] OF Byte;
I : Byte;
IDProcess, proc_ID : Cardinal;
begin
GetWindowThreadProcessID(FindWindow('TibiaClient', nil), @proc_ID);
IDProcess := OpenProcess(PROCESS_ALL_ACCESS, false, proc_ID);
Result := '';
ReadProcessMemory(IDProcess, Ptr(Address), @Temp[1], 255, NB);
for I := 1 to 255 do
begin
if ((Temp[i] = 0) or (Temp[i] = $0F)) then
Break;
Result := Result + Chr(Temp[i]);
end;
end;
// Koniec - Funkcje czytające
end.
Ostatnio zmieniony przez Sokrates : 17-07-2008, 14:38 Powód: poprawa
Ostatnio zmieniony przez Ar'buz : 17-07-2008, 16:47
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki