SRL Archive - Help

How to remove TPA box from around player?


laakerules

2012-02-16 09:30:22

I heard you could do this and i honestly had no idea. I knew you could resize it and move it. I just didnt know you could take pieces out of it.

Function FindGhoul(Var X,Y: Integer): Boolean;
var
CTS,I,T: Integer;
TPA: TPointArray;
begin
repeat
Result := False;
CTS := GetColorToleranceSpeed;

ColorToleranceSpeed(2);

SetColorSpeed2Modifiers(0.20, 1.60);

FindColorsSpiralTolerance(MSCX, MSCY, TPA,(11652298), MSX1, MSY1, MSX2, MSY2, 8);
ColorToleranceSpeed(CTS);

if (Length(TPA) < 1) then
Exit;

MMouse(TPA[0].X, TPA[0].Y, 5, 5);

if WaitUpText('ck Gho', 50) then
begin
GetMousePos(X, Y);
ClickMouse2(True);
Result := True;
If DidRedClick then
MarkTime(T);
Repeat
wait(2 + Random(10));
If (TimeFromMark(T) > 5000) Then Exit;
Until Infight;
Begin
Inc(Kills);
End;
Proggy;
repeat
wait(50);
until Not(InFight)or (not OthersInFight) or (not LoggedIn);
Exit;
end;
Until(Result)
end;

Theres my code.

RISK

2012-02-16 09:37:44

SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY))); might work for you. Or you could do a distance check for the TPA in mind.

Home

2012-02-16 10:03:46

If PointIntBox(PLAYER_BOX) then Continue;


~Home

laakerules

2012-02-16 10:27:16

Thanks home. But wont that just make it continue on with the function?

And if you switched it with Exit; then it wouldnt click colors outside of box.

Am i right?

euphemism

2012-02-16 11:54:48

In a loop, "Continue", jumps back to the top of the loop.

Flight

2012-02-16 20:21:57


PBox := TPAFromBox(IntToBox(245, 135, 280, 185)); //Parameters of your player's 'box' area

//Do color search, 'TPA' represents the colors found....

TPA := ClearTPAFromTPA(TPA, PBox); //Remove all the points in the PBox from your TPA