Code:
Function FindGold:
Var
H1,H2, I2, CTS, A, B, C, D, Walk,Height,Width,ColorCount: Integer;
pArray: TPointArray;
aPArray: T2DPointArray;
Begin
If Debug Then
FunctionStop:= 'FindGold: Entered';
If Not LoggedIn Then
Exit;
If FindNormalRandoms Then
Begin
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
If Debug Then
Writeln('FOUND NORMAL RANDOM');
End;
If InvFull Then
Begin
If Debug Then
Writeln('IN GOLD INV FULL');
Result := True;
Exit;
End;
If Walk >= 2 Then
Begin
If Debug Then
Writeln('CLICKED TWICE ON ROCK, NO MORE!');
Result := True;
Walk := 0;
Exit;
End;
If Spot = 1 Then
Begin
If OnScreen Then
SMART_DrawText(E,F,StatChars,'Looking For Gold, Low Spot',clWhite);
A:=140;
B:=120;
C:=251;
D:=259;
Width:= 10;
Height:= 18;
ColorCount := 80;
If Debug Then
Writeln('LOOKING FOR GOLD LOW SPOT');
// If Debug Then
// SMART_DrawBoxEx(False, IntToBox(A, B, C, D), clRed);
End Else
Begin
If OnScreen Then
SMART_DrawText(E,F,StatChars,'Looking For Gold, High Spot',clWhite);
A:=101;
B:=40;
C:=379;
D:=240;
Width:= 15;
Height:= 10;
ColorCount := 80;
If Debug Then
Writeln('LOOKING FOR GOLD HIGH SPOT');
// If Debug Then
// SMART_DrawBoxEx(False, IntToBox(A, B, C, D), clRed);
End;
If ((EmptySpot>=3) And (Spot = 1)) Then
Begin
SMART_ClearMS;
If OnScreen Then
SMART_DrawText(E,F,StatChars,'Looking For Coal, Low Spot',clWhite);
A:=26;
B:=110;
C:=365;
D:=MSY2;
Width:= 20;
Height:= 20;
ColorCount := 80;
If Debug Then
Writeln('LOOKING FOR COAL');
// If Debug Then
// SMART_DrawBoxEx(False, IntToBox(A, B, C, D), clRed);
End;
Wait(RandomRange(400,500));
MouseSpeed := RandomRange(17, 18);
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.12);
FindColorsSpiralTolerance(MSCX, MSCY, pArray, 4284788, MSX1, MSY1, MSX2, MSY2, 5);
aPArray := SplitTPAEx(pArray, 10, 10);
SortATPASize(aPArray,True);
If Debug Then
DebugATPABounds(aPArray);
If (Length(aPArray) = 0) Then
Begin
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
If Debug Then
Writeln('DIDNT FIND ANY DEPOSIT ROCK');
Result := False;
End;
H1 := High(aPArray);
If H1 < 2 Then
Begin
H2 := H1;
End Else
Begin
If Spot = 1 Then
Begin
H2 := 1;
End Else
H2 := 2;
End;
For I2 := 0 To H2 Do
Begin
MiddleTPAEx(aPArray[I2], GoldX, GoldY);
If Length(aPArray[I2]) < 900 then
Continue;
MMouse(GoldX, GoldY, 8, 8);
If (WaitUpTextMulti(['posit','neral','depo'],RandomRange(300,400))) Then
Begin
If Debug Then
Writeln('FOUND ORE DEPOSIT, CLICKING');
ClickMouse2(False);
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
If WaitOptionMulti(['ine Min', 'ine M', 'ne Min'],RandomRange(400,500)) Then
Begin
If Debug Then
Writeln('FOUND MINE OPTION');
Result := True;
MMouse(GoldX, GoldY, 4, 4);
Wait(RandomRange(200,300));
GetMousePos(GoldX,GoldY);
Exit;
End Else
Begin
If Debug Then
Writeln('DID NOT FIND MINE OPTION, TRYING AGAIN');
MMouse(50,50,100,100);
Exit;
End;
End;
End;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
If Debug Then
FunctionStop:= 'FindGold: Finished';
End;
Script it's not mine.