VERSION 9.70
ThID := GetWindowThreadProcessId(TibiaHandle, @PID);
PH := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);
Code:
procedure SendPacket(ProcessID: Cardinal; Packet: Pointer); stdcall; external 'packet.dll';
The new code i try to use to make a target if hp < variable
Edit4 is name from player/monster
The player/monster recive a RedSquare but i can only shoot runes with this on combobox...
if press f7 = exori frigo, she go on the floor.
And my attack from rod/sword don't work
Code:
procedure TMain.MenuItem1Click(Sender: TObject);
var
List : TListItem;
aux: string;
begin
List := ListView1.Items.add;
aux := (BL.Selected.Text);
List.Caption:= (aux);
end;
procedure TMain.ComboTargetTimer(Sender: TObject);
var
v1: integer;
v4: String;
i: integer;
auxTarget, i2, auxvalor: integer;
ler : Dword;
PacketBuffer: array [0..200] of byte;
begin
v4:= Edit4.Text;
v1 := StrToInt(ComboBox29.Text);
auxTarget := Integer(LastTarget);
Updateworld; // Chama a função
for i := 0 to MaxCreatures - 1 do
begin
if (BattleList[i].isVisible = 1) then
begin
if ((BattleList[i].Name = v4)) then
begin
auxValor :=BattleList[i].ID;
if ((auxValor = BattleList[i].ID) and (BattleList[i].HPBar <= v1)) then
begin
WriteProcessMemory(PH, Ptr(RedSquare), @auxvalor, 4, ler);
PacketBuffer[0] := $05;
PacketBuffer[1] := $00;
PacketBuffer[2] := $A1;
copymemory(@ PacketBuffer[3],@auxValor,4);
PacketBuffer[8] := $00;
PacketBuffer[9] := $00;
PacketBuffer[10] := $00;
SendPacket(PID, @PacketBuffer);
hotkey(ComboBox30.Text);
end;
end;
end;
end;
end;
I make a debugline and give-me error on this part: SendPacket(PID, @PacketBuffer);
I still using a packet.dll in my paste, my ASLR are disable, windows 7
What i doing wrong? i trying in version tibia 9.70