zaglądaj często w ten temat
http://www.tpforums.org/forum/showthread.php?t=2491
jest tam wlasnie najswiezszy packet.dll
:)
Ostatnio zmieniony przez Shahar Numb : 26-03-2009, 13:47
Selena <3
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
const
PLAYER_ID = $631D90;
Battlelist_start = $631DF0;
Distance_name = $631D48;
implementation
{$R *.dfm}
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; 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 pozycja:integer;
var
i,id_battle,id:integer;
begin
id:=readmeminteger(Player_id);
for i:=1 to 149 do
Begin
id_battle:=Readmeminteger(Battlelist_start + (i*160)-4);
if id_battle=ID then
Begin
Result :=i;
exit;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(MemReadString(BattleList_Start+pozycja*160+Distance_name));
end;
end.
procedure say2(text:string);
var
PacketBuffer: array [0..200] of byte;
ProcessID: Cardinal;
begin
GetWindowThreadProcessId(FindWindow('TibiaClient', Nil), @ProcessID);
PacketBuffer[0] := Byte(Length(text) + 4);
PacketBuffer[1] := $00;
PacketBuffer[2] := $96;
PacketBuffer[3] := $01;
PacketBuffer[4] := Byte(Length(text));
PacketBuffer[5] := $00;
CopyMemory(@PacketBuffer[6], @text[1], Length(text));
SendPacket(ProcessID, @PacketBuffer, TRUE, FALSE);
end;
Ostatnio zmieniony przez Nergal : 14-07-2009, 11:26
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki