SRL Archive - Help

TPA help


Deadly Serious

2012-01-12 23:05:40

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

2012-01-12 23:07:55

Remove the case and try it with just a simple Mouse(X, Y, 2, 2);.

KingKong

2012-01-12 23:16:39

you should have this:

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