SCAR Code:
function FindBankFloorColor: integer;
var
i, Red, Green, Blue, GC, TestColor: integer;
TPA: TPointArray;
begin
GC := 5012614;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, GC, MMX1, MMY1, MMX2, MMY2, 6);
for i :=0 to High(TPA) do
begin
if rs_OnMinimap(TPA[i].x,TPA[i].y)then
begin
TestColor := GetColor(TPA[i].x,TPA[i].y)
ColorToRGB(TestColor, Red, Green, Blue);
if(InRange(Red - Blue, 45, 68))then
if(InRange(Red - Green, 10, 30))then
if(InRange(Green - Blue, 24, 55))then
if GetColor(TPA[i].x + 2, TPA[i].y + 2) = TestColor then
if GetColor(TPA[i].x + 1, TPA[i].y + 1) = TestColor then
if GetColor(TPA[i].x, TPA[i].y + 2) = TestColor then
if GetColor(TPA[i].x + 2, TPA[i].y) = TestColor then
if GetColor(TPA[i].x, TPA[i].y + 1) = TestColor then
if GetColor(TPA[i].x + 1, TPA[i].y) = TestColor then
if GetColor(TPA[i].x + 2, TPA[i].y + 1) = TestColor then
if GetColor(TPA[i].x + 1, TPA[i].y + 2) = TestColor then
begin
Result := TestColor;
Writeln('Bank Floor Color is ' + IntToStr(Result));
Exit;
end;
end;
end;
Result := 0;
writeln('wtf dude!');
end;
It compiles, but doesn't get the color of the road. If anyone could help I'd love you forever.