Simba Code:
function FindIron: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.17);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 2175062, MMX1, MMY1, MMX2, MMY2, 10);
if (Length(arp) = 0) then
begin
Writeln('Hmm..No rocks available pesky bots!');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 2.01) and (X <= 10.15) and (Y >= 1.67) and (Y <= 8.16) and (Z >= 0.86) and (Z <= 3.75) then
begin
Result := arC[i];
Writeln('FindIron=' + IntToStr(arC[i]));
Break;
end;
end;
end;
function MineOre: Boolean;
var x, y, PlusOne, MineCount :integer;
begin
PlusOne:=InvCount+1;
If FindObj(x, y, 'ron', FindIron, 1) or FindObj(x, y, 'ine', FindIron, 1) or FindObj(x, y, 'Ore', FindIron, 20) or WaitupText('ine ron', FindIron) then
begin
Mouse(x, y,3,3,true);
WaitOption('Mine Iron',500+randomrange(300,500));
writeln('Mining an Iron');
end;
repeat
wait(4050+randomrange(1500,2000));
until not IsUpText('ron') or (InvFull);
case random(1) of
1: Mouse(X, Y, 5, 5, True);
2: begin
Mouse(X, X, 5, 5, False);
WaitOption('Mine Iron', 500+randomrange(300,500));
end;
end;
repeat
Marktime(MineCount);
Antiban;
Wait(200)
If Invcount=Plusone then
Writeln('We got some ore');
Until(InvCount=PlusOne) or (TimeFromMark(MineCount) >5560)
end;