Log in

View Full Version : TPA help



Deadly Serious
01-13-2012, 04:05 AM
This procedure usually just moves the mouse over to the portal and doesn't click it but sometimes it does, it's quite temperamental.
Does anyone know what I've done wrong?

Procedure Leave;
var
X,Y,I: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;

Begin
if not loggedin then exit;
FindNormalRandoms;
Antiban;
DidRedClick;

begin
FindColorsTolerance(TPA, 5081226, MSX1, MSY1, MSX2, MSY2, 15); // Thanks to Naums' Tutorial
ATPA := TPAToATPAEx(TPA, 28, 28);
For I := 0 To High(ATPA) Do
Begin
If MiddleTPAEx(ATPA[I], X, Y) Then
begin
Case random(11) of
0..10: begin
MMouse(X, Y, 2, 2);
ClickMouse2(True);
Writeln('Leaving the Mysterious rock formation');

// 9..10: begin;
// MMouse(X, Y, 2, 2);
// ClickMouse2(False);
// Waitoption('nter', 3000);
End;
End;
End;
End;
end;
end;

RISK
01-13-2012, 04:07 AM
Remove the case and try it with just a simple Mouse(X, Y, 2, 2);.

KingKong
01-13-2012, 04:16 AM
you should have this:

MiddleTPAEx(ATPA[d], x, y);
MMouse(x, y, 0, 0);
//check for uptext here
//then click