Log in

View Full Version : Exclude coordinates from color search



Ricky
02-25-2012, 01:49 AM
I have a FindColorsSpiralTolerance, but the color of the armor I'm wearing matches the monsters, how to exclude a certain area from color searching?

I don't need a complete script or anything just the basic theory will get me going. :)

I have this as FindColorsSpiralTolerance:
function MonsterFinder(var X,Y: Integer): Boolean;
var
CTS,I,T: Integer;
TPA: TPointArray;
begin
FindNormalRandoms;
repeat
Result := False;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.20, 1.60);
FindColorsSpiralTolerance(MSCX, MSCY, TPA,(7177095), MSX1, MSY1, MSX2, MSY2, 8);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
MMouse(TPA[0].X, TPA[0].Y, 5, 5);
if IsUpTextMultiCustom(['rned', 'ahk']) then
begin
FindNormalRandoms;
GetMousePos(X, Y);
ClickMouse2(True);
if DidRedClick then
Result := True;
repeat
Flag;
until not IsMoving
end;
Until(Result)
end;

RISK
02-25-2012, 01:50 AM
Do a distance check from the found point and the center of the screen. If the distance between the two points is less than X, then you could consider it to be excluded.