Hey guys, yesterday, brandon made me an awesome CTS2 function to find my bank, but it doesent actually find the bank... It moves the mouse about 5 pixels below the bank onto the floor, and eventually times out. Seeing how I have no knowledge of CTS2, I cant really fix it myself, even though i tried to update the colors in the function to no avail. If someone could show me what values have to be updated, and what I'd change them to, it would be great! Here is the function:
Simba Code:
Function OpenBankCustom: Boolean; //Credit to Brandon for fixing and beefing up this function.
var
B: TBox;
Location: TPoint;
CTS, I, L: Integer;
ATPA: T2DPointArray;
TPA, TPA2: TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.02, 2.40);
FindColorsTolerance(TPA, 8434655, MSX1, MSY1, MSX2, MSY2, 15);
If (Length(TPA) < 1) then Exit;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA:= TPAToATPAEx(TPA, 31, 190);
L := Length(ATPA);
If (L < 1) then Exit;
SetColorSpeed2Modifiers(0.11, 0.20);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
For I := 0 To L Do
begin
B := GetTPABounds(ATPA[I]);
with B do
begin
If (FindColorsTolerance(TPA2, 4937053, MSX1, MSY1, MSX2, MSY2, 20)) then
begin
Location := MiddleTPA(TPA2);
MMouse(Location.X, Location.Y, 0, 0);
If (WaitUptextMulti(['ank', 'Bank', 'ooth', 'booth', 'ank boo'], 600)) then
begin
ClickMouse2(MOUSE_LEFT);
Result := True;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
end;
end;
end;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
This is my screen on ACA, I got it to highlight the bankers perfectly, there really isnt anything else on the bank booth to highlight, since the golden stuff highlights the walls and floors, and the brown highlights doors and abunch of whacky stuff. Note: This is the angle that the camera will always be turned, if it makes a difference.