Well here it is:
Simba Code:
program new;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
function CopperColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.02, 1.48);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 6329580, MSX1, MSY1, MSX2, MSY2, 13);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
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 >= 33.24) and (X <= 61.86) and (Y >= 26.81) and (Y <= 55.88) and (Z >= 8.26) and (Z <= 32.74) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Procedure Antiban; //Thanks to Solidone40
Begin
Case Random(100) Of
1: HoverSkill('Mining', False);
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: HoverSkill('smithing', False);
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
end;
end;
Procedure MiniBreaker;
Begin
Case Random (160) Of
1: Wait(40000 + random(7400));
2: Wait(25500 + random(8550));
3: Wait(60040 + random(6759));
4: Wait(20400 + random(2549));
end;
end;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
Procedure DropCopper;
begin
if(InvFull) then
DropAllExcept([1]);// keep my pickaxe
end;
Procedure FullCheck;
begin
if(InvFull) then
begin
writeln('Dropping now');
DropCopper;
end;
end;
Procedure FindCopper;
var x, y: integer;
begin
repeat
if FindObj(x, y, 'ine', CopperColor, 1)Then
mouse(x, y, 1, 1,1);
ChooseOption('ine');
repeat
wait(1200+random(450));
AntiBan;
FullCheck;
FindNormalRandoms;
until not(IsUpText('opper')or(invFull))
until(InvFull)
end;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
FindCopper;
FullCheck;
DropCopper;
until(false)
end.