SCAR Code:
function FindOre : Boolean;
var
OreTPA : TPointArray;
OreATPA : T2DPointArray;
CTS, I, FT : Integer;
begin
if InvFull or not (LoggedIn) then
Exit;
MarkTime(FT);
PlayersOre;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MMCY, OreTPA, OreColor, MSX1, MSY1, MSX2, MSY2, 5);
if (Length(OreTPA) < 1) then Exit;
OreATPA := SplitTPA(OreTPA, 15);
for I := 0 To High(OreATPA) do
If MiddleTPAEX(OreATPA[i], x, y) then
begin
MMouse(x, y, 0, 0);
Wait(400 + Random(265));
if IsUpText('ine') then
begin
GetMousePos(x, y);
Result := True;
Exit;
end
else
begin
Writeln('Player has failed to find the Ore.');
MMouse(x-25, y, 5, 5);
if IsUpText('ine') then
begin
Mouse(x-25, y, 5, 5, True);
Exit;
end
else
begin
Exit;
end;
end;
end;
if ((TimeFromMark(FT)) >= (9000)) then
LogOut;
end;
And you can guess what i did with GetMousePos. But just incase...
SCAR Code:
procedure PowerMine;
var
NextOre : Integer;
begin
if InvFull or not (LoggedIn) then Exit;
repeat
if FindOre then
begin
MarkTime(NextOre);
Mouse(x, y, 5, 5, True);
Wait(750);
if CheckOre then
begin
GasFound := GasFound + 1;
AvoidGas;
end;
repeat
if CheckOre then
begin
GasFound := GasFound + 1;
AvoidGas;
end;
Wait(625 + Random(395));
FindRandoms;
Wait(700 + Random(550));
HumanMovements;
until FindBlackChatMessage('You manage to mine') or ((TimeFromMark(NextOre)) >= (2500)) or ErrorMessage;
end;
until (InvFull);
end;
I want to make this faster because in some cases another player will come by. And i know that it's hard to beat a human with a bot, but i need it to be fast enough to at least get ores fast (It is sort of slow) + REP and thanks for help.