Log in

View Full Version : How to remove TPA box from around player?



laakerules
02-16-2012, 02:30 PM
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
02-16-2012, 02:37 PM
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY))); might work for you. Or you could do a distance check for the TPA in mind.

Home
02-16-2012, 03:03 PM
If PointIntBox(PLAYER_BOX[I]) then Continue;


~Home

laakerules
02-16-2012, 03:27 PM
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
02-16-2012, 04:54 PM
In a loop, "Continue", jumps back to the top of the loop.

Flight
02-17-2012, 01:21 AM
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