• Log in or sign up for an account here: https://www.sythe.org/login

color.scar

Status
Not open for further replies.

pescados666

Forum Addict
Joined
Jan 21, 2007
Sythe Gold
0
Messages
502
i need a working version of color.scar. every one i get doesnt work. i need to use srl scripts cuz theyre the only ones that work. im not going to pay. cuz its free. reply here. ill take link or msn.
 
here ya go.
Code:
//-----------------------------------------------------------------//
//--               Scar Standard Resource Library                --//
//--               » ColorFinding Routines                       --//
//-----------------------------------------------------------------//

//  » function  FindColorRightTol(var cx,cy: Integer; dacolor,ax1,ay1,ax2,ay2,tol: Integer): | by RSN
//  » function  FindMMColor(color:integer):boolean;                                   | by Stupid3ooo
//  » function  FindMMColorTol(color,tol:integer):boolean;                            | by Stupid3ooo
//  » procedure ClickMMColor(color:integer);                                          | by Stupid3ooo
//  » procedure ClickMMColorTol(color,tol:integer);                                   | by Stupid3ooo
//  » function  FindMSColor(color:integer):boolean;                                   | by Stupid3ooo
//  » function  FindMSColorTol(color,tol:integer):boolean;                            | by Stupid3ooo
//  » procedure ClickMSColor(color:integer;left:boolean);                             | by Stupid3ooo
//  » procedure ClickMSColorTol(color,tol:integer;left:boolean);                      | by Stupid3ooo
//  » function  FindColorEllipse(var x, y: integer; Color, Tol, X1, Y1, X2, Y2: integer): boolean; | by BenLand100
//  » function  FindColorsEllipse(var Points: TPointArray; Color, Tol, X1, Y1, X2, Y2: integer): boolean; | by BenLand100
//  » function  FindColorAbstract(var x,y: integer; Color, Tol, x1,y1,x2,y2,x3,y3,x4,y4: integer): boolean; | by BenLand100
//  » function  FindColorsAbstract(var Points: TPointArray; Color, Tol, x1,y1,x2,y2,x3,y3,x4,y4: integer): boolean; | by BenLand100
//  » function  ScanForObj(Scanwidth, Scanheight, Color, Tolerance: Integer; Name, DebugName: string): Boolean | by Pplsuqbawlz
//  » function  FindColorTolRaiser(var x, y, xe, ye, xs, ys, Color, BeginTol, EndTol: integer; Spiral: Boolean): Boolean;  | by Sdcit
//  » function  FindSimColorBase(color, xs, ys, xe, ye, LTimes, sTol, Distance: integer): integer; | by XxKanexX
//  » function  FindSimColor(color, xs, ys, xe, ye, tol, dist: integer; hardsearch: boolean): integer; | by XxKanexX
//  » function  FindSimColorMany(var save: array of integer; many, color, xs, ys, xe, ye, tol, dist: integer; hardsearch: boolean): integer; | by XxKanexX
//  » function  FindMMRoadColor: Integer; | by XxKanexX
//  » function  FindColorFromCentre(var x, y: Integer; Cx, Cy, Color, Radius, Tol: Integer): boolean; | by XxKanexX
//  » function  ColorDistanceTolerance(Col1, Col2, xs, ys, xe, ye, tol: Integer): Integer; // * By XxKabexX
//  » function  ColorDistance(Col1, Col2, xs, ys, xe, ye, tol: Integer): Integer; // * By XxKabexX
//  » procedure ClickRandomlyOnColour(Colour, x, y, xa, ya : Integer; Left : Boolean); // * By Spky
//  » function  FindColorCircle(var x, y: Integer; color, radius, MidPointx, MidPointy: Integer): Boolean; | by Freddy1990
//  » function  FindColorCircleTolerance(var x, y: Integer; color, radius, MidPointx, MidPointy, tolerance: Integer): Boolean; | by Freddy1990
//  » function  MouseColor(var x, y : Integer; color, radius, tol : Integer): Boolean; // * by Krazy_Meerkat
//  » function  FindClosestColor(var x, y, matchingcolour : Integer; colour, xs, ys, xe, ye : Integer): Boolean; // * by Krazy_Meerkat
//  » function  FindColorSkipBox(var x, y: Integer; color, x1, y1, x2, y2: Integer; box: TBox): Boolean; | by Freddy1990
//  » function  FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2, tolerance: Integer; box: TBox): Boolean; | by Freddy1990
//  » function  FindColorSkipBoxArray(var x, y: Integer; color, x1, y1, x2, y2: Integer; box: TBoxArray): Boolean; | by Freddy1990
//  » function  FindColorSkipBoxArrayTolerance(var x, y: Integer; color, x1, y1, x2, y2, tolerance: Integer; box: TBoxArray): Boolean; | by Freddy1990
//  » function  ScanMMColorExact(var x, y: Integer; color: Integer): Boolean; | by Freddy1990
//  » function  ScanMMColorTolerance(var x, y: Integer; color, tolerance: Integer): Boolean; | by Freddy1990
//  » procedure ClickExactMMColor(color: Integer); | by Freddy1990
//  » procedure ClickExactMMColorTol(color, tolerance: Integer); | by Freddy1990
//  » function  ScanMMAreaColorExact(var x, y: Integer; x1, y1, x2, y2, color: Integer): Boolean; | by Freddy1990
//  » function  ScanMMAreaColorExactTolerance(var x, y: Integer; x1, y1, x2, y2, color, tolerance: Integer): Boolean; | by Freddy1990

{*******************************************************************************
function FindColorRightTol(var cx, cy: Integer; dacolor, ax1, ay1, ax2, ay2, tol: Integer): Boolean;
By: RsN
Description: Same as FindColorTolerance but searches from right
*******************************************************************************}

function FindColorRightTol(var cx, cy: Integer; dacolor, ax1, ay1, ax2, ay2,
  tol: Integer): Boolean;
var
  a, b, c, d: Integer;
  x, y: Integer;
begin
  a := ax2 - 1;
  b := ay1;
  c := ax2;
  d := ay2;
  repeat
    if (FindColorTolerance(x, y, dacolor, a, b, c, d, tol)) then
      Result := True;
    a := a - 1;
    c := c - 1;
  until (Result) or (a <= ax1);
  if (Result) then
  begin
    cx := x;
    cy := y;
  end;
end;

{*******************************************************************************
function FindMMColor(var x, y: Integer; color: Integer): Boolean;
By: Stupid3ooo
Description: Finds color on minimap
*******************************************************************************}

function FindMMColor(var x, y: Integer; color: Integer): Boolean;
  // by Stupid3ooo
begin
  if (FindColor(x, y, color, 573, 8, 723, 158)) then
    Result := True;
end;

{*******************************************************************************
function FindMMColorTol(var x, y: Integer; color, tol: Integer): Boolean;
By: Stupid3ooo
Description: Finds color on Minimap with tolerance
*******************************************************************************}

function FindMMColorTol(var x, y: Integer; color, tol: Integer): Boolean;
begin
  if (FindColorTolerance(x, y, color, 573, 8, 723, 158, tol)) then
    Result := True;
end;

{*******************************************************************************
function FindMiniColor(var x, y: Integer; Color, Tol: Integer; Spiral: Boolean): Boolean;
By: Mutant Squirrle
Description: Finds color on Minimap: Spiral or Cubic (with tolerance)
*******************************************************************************}

function FindMiniColor(var x, y: Integer; Color, tol: Integer; Spiral: Boolean):
  Boolean;
begin
  if (not (Spiral)) then
    Result := FindColorTolerance(x, y, Color, 570, 10, 720, 160, tol)
      if (Spiral) then
      Result := FindColorSpiralTolerance(x, y, Color, 570, 10, 720, 160, tol)
end;

{*******************************************************************************
function FindMainColor(var x, y: Integer; Color, Tol: Integer; Spiral: Boolean): Boolean;
By: Mutant Squirrle
Description: Finds color on Main Screen: Spiral or Cubic with (tolerance)
*******************************************************************************}

function FindMainColor(var x, y: Integer; Color, tol: Integer; Spiral: Boolean):
  Boolean;
begin
  if (not (Spiral)) then
    Result := FindColorTolerance(x, y, Color, 3, 3, 515, 336, tol)
      if (Spiral) then
      Result := FindColorSpiralTolerance(x, y, Color, 3, 3, 515, 336, tol)
end;

{*******************************************************************************
procedure ClickMMColor(color: Integer);
By: Stupid3ooo
Description: Clicks color on Minimap
*******************************************************************************}

procedure ClickMMColor(color: Integer);
var
  x, y: Integer;
begin
  if (FindColor(x, y, color, 573, 8, 723, 158)) then
    Mouse(x, y, 0, 0, True);
end;

{*******************************************************************************
procedure ClickMMColorTol(color, tol: Integer);
By: Stupid3ooo
Description: Clicks Color on Minimap with tolerances
*******************************************************************************}

procedure ClickMMColorTol(color, tol: Integer); // by Stupid3ooo
var
  x, y: Integer;
begin
  if (FindColorTolerance(x, y, color, 573, 8, 723, 158, tol)) then
    Mouse(x, y, 0, 0, True);
end;

{*******************************************************************************
function FindMSColor(var x, y: Integer; color: Integer): Boolean;
By: Stupid3ooo
Description: Finds color on MainScreen.
*******************************************************************************}

function FindMSColor(var x, y: Integer; color: Integer): Boolean;
begin
  if (FindColor(x, y, color, 3, 3, 515, 338)) then
    Result := True;
end;

{*******************************************************************************
function FindMSColorTol(var x, y: Integer; color, tol: Integer): Boolean;
By: Stupid3ooo
Description: Finds color on Main Screen with tolerance.
*******************************************************************************}

function FindMSColorTol(var x, y: Integer; color, tol: Integer): Boolean;
begin
  if (FindColorTolerance(x, y, color, 3, 3, 515, 338, tol)) then
    Result := True;
end;

{*******************************************************************************
procedure ClickMSColor(color: Integer; left: Boolean);
By: Stupid3ooo
Description: Clicks color on mainscreen
*******************************************************************************}

procedure ClickMSColor(color: Integer; left: Boolean);
var
  x, y: Integer;
begin
  if (FindColor(x, y, color, 3, 3, 515, 338)) then
    Mouse(x, y, 0, 0, left);
end;

{*******************************************************************************
procedure ClickMSColorTol(color, tol: Integer; left: Boolean);
By: Stupid3ooo
Description: Clicks Color on MainScreen with Tolerance
*******************************************************************************}

procedure ClickMSColorTol(color, tol: Integer; left: Boolean);
var
  x, y: Integer;
begin
  if (FindColorTolerance(x, y, color, 3, 3, 515, 338, tol)) then
    Mouse(x, y, 0, 0, left);
end;

{*******************************************************************************
function FindColorEllipse(var x, y: Integer; Color, Tol, X1, Y1, X2, Y2: Integer): Boolean;
By: BenLand100
Description: Searches only in the given ellipse for a color with tol, returns true if found and position in x, y
Set Ellips Bounds according to the diagram:
         y1
    +----------+
    |          |
    | Ellipse  |
 x1 | Bounds   | x2
    |          |
    +----------+
         y2
*******************************************************************************}

function FindColorEllipse(var x, y: Integer; Color, tol, X1, Y1, X2, Y2:
  Integer): Boolean;
var
  Temp: TCanvas;
  Cx, Cy, H, W, ScreenBmp, TempBmp, Handle: Integer;
begin
  W := Max(X1, X2) - Min(X1, X2);
  H := Max(Y1, Y2) - Min(Y1, Y2);
  Handle := GetClientWindowHandle;
  TempBmp := BitmapFromString(W, H, '');
  Temp := GetBitmapCanvas(TempBmp);
  ScreenBmp := BitmapFromString(W, H, '');
  FastDrawClear(TempBmp, -1);
  CopyClientToBitmap(ScreenBmp, X1, Y1, X2, Y2);
  CopyCanvas(GetBitmapCanvas(TempBmp), Temp, 0, 0, W, H, 0, 0, W, H);
  Temp.Ellipse(0, 0, W, H);
  CopyCanvas(Temp, GetBitmapCanvas(TempBmp), 0, 0, W, H, 0, 0, W, H);
  SetTransparentColor(TempBmp, 16777215);
  FastDrawTransparent(0, 0, TempBmp, ScreenBmp);
  SetTargetBitmap(ScreenBmp);
  x := -1;
  y := -1;
  Cx := W div 2;
  Cy := H div 2;
  if FindColorSpiralTolerance(Cx, Cy, Color, 0, 0, W, H, tol) then
  begin
    x := Cx;
    y := Cy;
    Result := True;
  end;
  SetClientWindowHandle(Handle);
  FreeBitmap(TempBmp);
  FreeBitmap(ScreenBmp);
end;

{*******************************************************************************
function FindColorsEllipse(var Points: TPointArray; Color, Tol, X1, Y1, X2, Y2: Integer): Boolean;
By: BenLand100
Description: Searches only in the given ellipse for every color with tol, returns true if found and the points in Points
Set Ellips Bounds according to the diagram:
          y1
     +----------+
     |          |
     | Ellipse  |
  x1 | Bounds   | x2
     |          |
     +----------+
          y2
*******************************************************************************}

function FindColorsEllipse(var Points: TPointArray; Color, tol, X1, Y1, X2, Y2:
  Integer): Boolean;
var
  Temp: TCanvas;
  PtTemp: TPointArray;
  H, W, ScreenBmp, TempBmp, Handle: Integer;
begin
  W := Max(X1, X2) - Min(X1, X2);
  H := Max(Y1, Y2) - Min(Y1, Y2);
  Handle := GetClientWindowHandle;
  TempBmp := BitmapFromString(W, H, '');
  Temp := GetBitmapCanvas(TempBmp);
  ScreenBmp := BitmapFromString(W, H, '');
  FastDrawClear(TempBmp, -1);
  CopyCanvas(GetClientCanvas, GetBitmapCanvas(ScreenBmp), X1, Y1, X2, Y2, 0, 0,
    W, H);
  CopyCanvas(GetBitmapCanvas(TempBmp), Temp, 0, 0, W, H, 0, 0, W, H);
  Temp.Ellipse(0, 0, W, H);
  CopyCanvas(Temp, GetBitmapCanvas(TempBmp), 0, 0, W, H, 0, 0, W, H);
  SetTransparentColor(TempBmp, 16777215);
  FastDrawTransparent(0, 0, TempBmp, ScreenBmp);
  SetTargetBitmap(ScreenBmp);
  FindColorsSpiralTolerance(W / 2, H / 2, PtTemp, Color, 0, 0, W, H, tol);
  if GetArrayLength(PtTemp) > 0 then
  begin
    Points := PtTemp;
    Result := True;
  end;
  SetClientWindowHandle(Handle);
  FreeBitmap(TempBmp);
  FreeBitmap(ScreenBmp);
end;

{*******************************************************************************
function FindColorAbstract(var x, y: Integer; Color, Tol, x1, y1, x2, y2, x3, y3, x4, y4: Integer): Boolean;
By: BenLand100
Description: Searches in an abstract box (see Math.scar) for a color and tolerance and the first one found in x, y
*******************************************************************************}

function FindColorAbstract(var x, y: Integer; Color, tol, x1, y1, x2, y2, x3,
  y3, x4, y4: Integer): Boolean;
var
  found: Boolean;
  Pt, CX, CY, UY, dy, rx, LX: Integer;
  Points: TPointArray;
begin
  UY := Min(y1, y2);
  dy := Max(y3, y4);
  LX := Min(x1, x4);
  rx := Max(x2, x3);
  FindColorsSpiralTolerance(((LX + rx) / 2), ((UY + dy) / 2), Points, Color, LX,
    UY, rx, dy, tol);
  for pt := 0 to GetArrayLength(points) - 1 do
  begin
    if InAbstractBox(x1, y1, x2, y2, x3, y3, x4, y4, Points[pt].x, Points[pt].y)
      then
    begin
      found := True;
      CX := Points[pt].x;
      CY := Points[pt].y
        Break;
    end;
  end;
  x := -1
    y := -1
    if found then
  begin
    x := CX
      y := CY
      Result := True
  end;
end;

{*******************************************************************************
function FindColorsAbstract(var Points: TPointArray; Color, Tol, x1, y1, x2, y2, x3, y3, x4, y4: Integer): Boolean;
By: BenLand100
Description: Searches in an abstract box (see Math.scar) for a color and tolerance and puts every instance of it in Points
*******************************************************************************}

function FindColorsAbstract(var Points: TPointArray; Color, tol, x1, y1, x2, y2,
  x3, y3, x4, y4: Integer): Boolean;
var
  Found: Boolean;
  Pt, TempPt, UY, dy, rx, LX: Integer;
  FPoints, Temp: TPointArray;
begin
  UY := Min(y1, y2);
  dy := Max(y3, y4);
  LX := Min(x1, x4);
  rx := Max(x2, x3);
  FindColorsSpiralTolerance(((LX + rx) / 2), ((UY + dy) / 2), FPoints, Color,
    LX, UY, rx, dy, tol);
  for pt := 0 to GetArrayLength(FPoints) - 1 do
  begin
    WriteLn(IntToStr(FPoints[pt].x) + ', ' + IntToStr(FPoints[pt].y));
    if InAbstractBox(x1, y1, x2, y2, x3, y3, x4, y4, FPoints[Pt].x,
      FPoints[Pt].y) then
    begin
      Found := True;
      SetArrayLength(Temp, GetArrayLength(Temp) - 1);
      TempPt := GetArrayLength(Temp) - 1;
      Temp[TempPt].x := FPoints[Pt].x;
      Temp[TempPt].y := FPoints[Pt].y;
    end;
  end;
  if found then Result := True
    Points := Temp;
end;

{*******************************************************************************
function FindColorTolRaiser(x, y: Integer; xe, ye, xs, ys, Color, BeginTol, EndTol: Integer; Spiral: Boolean; TolSpeed: Integer): Boolean;
By: Sdcit
Description: Searches for a color with beginTol then raises tol by 1 until it equals EndTol or the color is found.
*******************************************************************************}

function FindColorTolRaiser(x, y: Integer; xe, ye, xs, ys, Color, BeginTol,
  EndTol: Integer; Spiral: Boolean; TolSpeed: Integer): Boolean;
var
  TolCount: Integer;
begin
  ColorToleranceSpeed(TolSpeed)
    if (Spiral) then
  begin
    for TolCount := BeginTol to EndTol do
      if (FindColorSpiralTolerance(x, y, color, xe, ye, xs, ys, TolCount)) then
      begin
        Result := True;
        Exit;
      end;
  end;
  if (not (Spiral)) then
  begin
    for TolCount := BeginTol to EndTol do
      if (FindColorTolerance(x, y, color, xe, ye, xs, ys, TolCount)) then
      begin
        Result := True;
        Exit;
      end;
  end;
end;

{*******************************************************************************
function ScanForObjectMulti(var x, y: Integer; Scanwidth, Scanheight, Color, Color2, Color3, Tolerence: Integer; Name: String): Boolean;
By: Renax
Description: like findobj
*******************************************************************************}

function ScanForObjectMulti(var x, y: Integer; Scanwidth, Scanheight, Color,
  Color2, Color3, Tolerence: Integer; Name: string): Boolean;
var
  a, b, c, d, e, f: Integer;
  Addx, Addy, Switch: Integer;
  Change, Forwardx, Forwardy, Which: Boolean;
begin
  Change := False;
  Which := False
    Forwardx := True;
  Forwardy := True;
  a := 516 / Scanwidth;
  b := 338 / Scanheight;
  c := Trunc(a / 2);
  d := Trunc(b / 2);
  e := 0;
  f := 0;
  Addx := 1;
  Addy := 1;
  Switch := 1;
  repeat
    if (FindColorTolerance(x, y, Color, (258 + e * Scanwidth), (169 + f *
      Scanheight), (258 + e * Scanwidth + Scanwidth), (169 + f * Scanheight +
      Scanheight), Tolerence)) then
      MMouse(x, y, 5, 5)
    else
      if (FindColorTolerance(x, y, Color2, (258 + e * Scanwidth), (169 + f *
        Scanheight), (258 + e * Scanwidth + Scanwidth), (169 + f * Scanheight +
        Scanheight), Tolerence)) then
        MMouse(x, y, 5, 5)
      else
        if (FindColorTolerance(x, y, Color3, (258 + e * Scanwidth), (169 + f *
          Scanheight), (258 + e * Scanwidth + Scanwidth), (169 + f * Scanheight
            +
          Scanheight), Tolerence)) then
          MMouse(x, y, 5, 5);
    if (IsUpText(Name)) then
    begin
      Result := True;
      Break;
    end;
    if (Change) then
    begin
      Switch := Switch * -1;
      Addx := (Addx * -1) + Switch;
      Addy := (Addy * -1) + Switch;
      Change := False;
    end;
    if (Forwardx) and (not (Which)) then
      e := e + Switch;
    if (Forwardy) and (Which) then
      f := f + Switch;
    if (e = Addx) then
    begin
      Forwardx := False;
      Which := True;
    end;
    if (f = Addy) then
    begin
      Forwardy := False;
      Which := False;
    end;
    if (not Forwardy) and (not Forwardx) then
    begin
      Forwardy := True;
      Forwardx := True;
      Change := True;
    end;
  until ((e > c) or (f > d));
end;

{*******************************************************************************
function FindSimColorBase(color, xs, ys, xe, ye, LTimes, sTol, Distance: Integer): Integer;
By: XxKanexX
Description: Used in FindSimColor function.
*******************************************************************************}

function FindSimColorBase(color, xs, ys, xe, ye, LTimes, sTol, Distance:
  Integer): Integer;
var
  x, y, a, i, buff, tol, stimes: Integer;
begin
  tol := sTol;
  a := 2;
  Result := -1;
  repeat
    if (FindColorTolerance(x, y, color, xs, ys, xe, ye, tol)) then
    begin
      repeat
        buff := GetColor(x + Random(a) - Random(a), y + Random(a) - Random(a));
        if (buff = -1) then
          buff := GetColor(x + (Random(a) / 2) - (Random(a) / 2), y + (Random(a)
            / 2) - (Random(a) / 2));
        if (SimilarColors(buff, color, tol)) and (not (Buff = color)) and (not
          (buff = -1)) then
        begin
          Result := Buff;
          Exit;
        end else
        begin
          i := i + 1;
          tol := tol + 2;
          a := a + 1 + Random(Distance / (Distance / 2) + Random(i));
          if (a > Distance) then
            a := 1;
        end;
      until (tol > 40 + (LTimes) + (tol / 2));
    end else
      tol := tol + 1;
    stimes := stimes + 1;
  until (tol > 40 + ((LTimes) / 2)) and (stimes > 3);
end;

{*******************************************************************************
function FindSimColor(color, xs, ys, xe, ye, tol, dist: Integer; hardsearch: Boolean): Integer;
By: XxKanexX
Description: Searches for a color similar to the base color. Will result as -1 if not found.
*******************************************************************************}

function FindSimColor(color, xs, ys, xe, ye, tol, dist: Integer; hardsearch:
  Boolean): Integer;
var
  rtol, i: Integer;
begin
  if (tol <> -1) and (tol <> 0) then
    rtol := tol
  else
    rtol := 5;
  Result := FindSimColorBase(color, xs, ys, xe, ye, 5, rtol, dist);
  if (Result = -1) then
    Result := FindSimColorBase(color, xs, ys, xe, ye, 10, rtol + (Random(3) +
      1), dist);
  if (Result = -1) and (hardsearch) then
    for i := 1 to 3 do
    begin
      Result := FindSimColorBase(color, xs, ys, xe, ye, 10 + (5 * I), rtol +
        (Random(3) + 1), dist);
      if (Result <> -1) then
        Exit;
    end;
end;

{*******************************************************************************
function FindSimColorMany(var save: Array of Integer; many, color, xs, ys, xe, ye, tol, dist: Integer; hardsearch: Boolean): Integer;
By: XxKanexX
Description: Searches for 1 - 3 colors (specified in many) and saves them into an array.
Results in how many colors were found. All colors return different values.
If not found, returns as -1 in the array.
*******************************************************************************}

function FindSimColorMany(var save: array of Integer; many, color, xs, ys, xe,
  ye, tol, dist: Integer; hardsearch: Boolean): Integer;
var
  i: Integer;
begin
  SetArrayLength(save, many + 1);
  if (Many > 3) or (Many < 1) then
    Many := 1;
  save[1] := FindSimColor(color, xs, ys, xe, ye, tol, dist, hardsearch);

  if (many > 1) then
  begin
    repeat
      save[2] := FindSimColor(color, xs, ys, xe, ye, tol, dist, hardsearch);
      i := i + 1;
      if (i > 50) then
      begin
        save[2] := -1;
        break;
      end;
    until (save[2] <> save[1]) and (save[2] <> -1);
    i := 0;

    if (many > 2) then
    begin
      repeat
        save[3] := FindSimColor(color, xs, ys, xe, ye, tol, dist, hardsearch);
        i := i + 1;
        if (i > 50) then
        begin
          save[3] := -1;
          break;
        end;
      until (save[3] <> save[2]) and (save[3] <> save[1]) and (save[3] <> -1);
      i := 0;
    end;
  end;

  for i := 1 to many do
    if (not (save[i] = -1)) then
      Result := Result + 1;

end;

{*******************************************************************************
function FindColorToleranceDOB(var x, y: Integer; Color1, Color2, xs, ys, xe, ye, Tolerance: Integer): Boolean;
By: XxKanexX
Description: Works just like "FindColorTolerance" but will search for 2 colors.
if either one is found, will result as true.
Used in "InFight" function.
*******************************************************************************}

function FindColorToleranceDOB(var x, y: Integer; Color1, Color2, xs, ys, xe,
  ye, Tolerance: Integer): Boolean;
begin
  if (FindColorTolerance(x, y, Color1, xs, ys, xe, ye, Tolerance)) or
    (FindColorTolerance(x, y, Color2, xs, ys, xe, ye, Tolerance)) then
    Result := True;
end;

{*******************************************************************************
function FindSimColorManyText(var save: Array of Integer; text: String; many, color, xs, ys, xe, ye, tol, dist: Integer; hardsearch: Boolean): Integer;
By: XxKanexX
Description: Searches for 1 - 3 colors (specified in many) while a certain text
is in the 9, 9 co-ordinates and saves them into an array.
Results in how many colors were found. All colors return different values.
If not found, returns as -1 in the array.
*******************************************************************************}

function FindSimColorManyText(var save: array of Integer; text: string; many,
  color, xs, ys, xe, ye, tol, dist: Integer; hardsearch: Boolean): Integer;
var
  i: Integer;
begin
  if (not Option2(text)) then
    Exit
  else
  begin
    SetArrayLength(save, many + 1);
    if (Many > 3) or (Many < 1) then
      Many := 1;

    save[1] := FindSimColor(color, xs, ys, xe, ye, tol, dist, hardsearch);

    if (many > 1) then
    begin
      repeat
        if (not Option2(text)) then
        begin
          save[2] := -1;
          break;
        end;
        save[2] := FindSimColor(color, xs, ys, xe, ye, tol, dist, hardsearch);
        i := i + 1;
        if (i > 50) then
        begin
          save[2] := -1;
          break;
        end;
      until (save[2] <> save[1]) and (save[2] <> -1);
      i := 0;

      if (many > 2) then
      begin
        repeat
          if (not Option2(text)) then
          begin
            save[3] := -1;
            break;
          end;
          save[3] := FindSimColor(color, xs, ys, xe, ye, tol, dist, hardsearch);
          i := i + 1;
          if (i > 50) then
          begin
            save[3] := -1;
            break;
          end;
          if (not (Option2(text))) then
            Exit;
        until (save[3] <> save[2]) and (save[3] <> save[1]) and (save[3] <> -1);
        i := 0;
      end;
    end;

    for i := 1 to many do
      if (not (save[i] = -1)) then
        Result := Result + 1;
  end;
end;

{*******************************************************************************
function FindMMRoadColor: Integer;
By: XxKanexX
Description: Finds the Minimap Road color.
*******************************************************************************}

function FindMMRoadColor: Integer;
var
  RoadDTM, RoadDTM2, RoadDTM3, RoadDTM4, RoadDTM5, RoadDTM6: Integer;
begin
  RoadDTM := DTMFromString('78DA632C606260C8644001C1DEDE609A11CA6' +
    '72C06AAC925A0A61AA82683809A3CA09A74DC6A80B20C002D8107' +
    '28');
  RoadDTM2 := DTMFromString('78DA639CCDC4C0E0C18002F2D2D2C0342394C' +
    'FD80754E34340CD5CA01A2F026A1610615737508D377E3500EF49' +
    '0A99');
  RoadDTM3 := DTMFromString('78DA632C61626088634001D5C545609A11CA6' +
    '7CC04AA4924A0A600A82609BF1A007DF4069B');
  RoadDTM4 := DTMFromString('78DA632C666260886340016579B9609A11CA6' +
    '7AC00AA8922A0A610A8269A809A7CC27601008CA20891');
  RoadDTM5 := DTMFromString('78DA6364626660F8C1800262C2C2C0342394C' +
    'FC80954F381801A2EA09ADF44A8F98E5F0D0073BD082E');
  RoadDTM6 := DTMFromString('78DA6364676660F065644006C9B1D1601A26C' +
    'AC80354E342400D2F508D177E3500F004045F');
  Result := FindMMColorDTMBaseDouble(RoadDTM, RoadDTM2, 4934483, 6710894, 7);
  if Result < 1 then
    Result := FindMMColorDTMBaseDouble(RoadDTM3, RoadDTM4, 7171702, 7500667, 7);
  if Result < 1 then
    Result := FindMMColorDTMBaseDouble(RoadDTM5, RoadDTM6, 5658204, 5987683, 7);
  FreeDTM(RoadDTM);
  FreeDTM(RoadDTM2);
  FreeDTM(RoadDTM3);
  FreeDTM(RoadDTM4);
  FreeDTM(RoadDTM5);
  FreeDTM(RoadDTM6);
end;

{*******************************************************************************
function FindMMLimeRoadColor: Integer;
By: XxKanexX
Description:
*******************************************************************************}

function FindMMLimeRoadColor: Integer;
var
  LimeDTM, LimeDTM2, LimeDTM3, LimeDTM4, LimeDTM5, LimeDTM6: Integer;
  i: Integer;
begin
  LimeDTM := DTMFromString('78DA63EC66626028644001ADCDD9609A11CA6' +
    '76C07AAC926A0A607A82687809A89403505F8D50000E92709C4');
  LimeDTM2 := DTMFromString('78DA63E460666078CC8002C2031CC0342394C' +
    'FC80D54F392801A01A09A5704D4B001D53CC5AF060040E20775');
  LimeDTM3 := DTMFromString('78DA63EC60626098CB80028A7363C0342394C' +
    'F0852339D809A4EA09A8904D4B402D5CCC4AF0600E252097D');
  LimeDTM4 := DTMFromString('78DA63EC656260A8644001DD4DF9609A11CA6' +
    '7EC07AA2927424D010135DD403545F8D5000001E10A09');
  LimeDTM5 := DTMFromString('78DA637CC3C4C0F09801054CEA4A06D38C503' +
    'EE307A09A5704D47C06AA798A5F0D0063B90A0B');
  LimeDTM6 := DTMFromString('78DA6364606660086764400685C9DE601A26C' +
    'AC80854134840CD3F26826A0015EE0567');
  for i := 1 to 2 do
  begin
    Result := FindMMColorDTMBaseDouble(LimeDTM, LimeDTM2, 7046021, 6583422, 5 +
      (3 * i));
    if Result < 1 then
      Result := FindMMColorDTMBaseDouble(LimeDTM3, LimeDTM4, 60573313, 7307915, 5
        + (3 * i));
    if Result < 1 then
      Result := FindMMColorDTMBaseDouble(LimeDTM5, LimeDTM6, 6523538, 4940657, 5
        + (3 * i));
    if Result < 1 then
      Result := FindMMColorDTMBase(LimeDTM5, 6194059, 5 + (3 * i));
    if Result > 1 then
      break;
  end;
  FreeDTM(LimeDTM);
  FreeDTM(LimeDTM2);
  FreeDTM(LimeDTM3);
  FreeDTM(LimeDTM4);
  FreeDTM(LimeDTM5);
  FreeDTM(LimeDTM6);
end;

{*******************************************************************************
function FindColorFromCentre(var x, y: Integer; Cx, Cy, Color, Radius, Tol: Integer): Boolean;
By: XxKanexX
Description: From the centre increases the box to find the color in up to the radius.
*******************************************************************************}

function FindColorFromCentre(var x, y: Integer; Cx, Cy, Color, Radius, tol:
  Integer): Boolean;
var
  i: Integer;
begin
  for i := 1 to Radius do
  begin
    if FindColorTolerance(x, y, Color, Cx - i, Cy - i, Cx + i, Cy + i, tol) then
    begin
      Result := True;
      Exit;
    end;
  end;
end;

{*******************************************************************************
function ColorDistance(Col1, Col2, xs, ys, xe, ye: Integer): Integer;
By: XxKanexX
Description: Detects co-ordinates of both colors and measures the distance between each of them.
*******************************************************************************}

function ColorDistance(Col1, Col2, xs, ys, xe, ye: Integer): Integer;
var
  a, b: Integer;
begin
  FindColor(x, y, Col1, xs, ys, xe, ye);
  FindColor(a, b, Col2, xs, ys, xe, ye);
  Result := Distance(x, y, a, b);
end;

{*******************************************************************************
function ColorDistanceTolerance(Col1, Col2, xs, ys, xe, ye, tol: Integer): Integer;
By: XxKanexX
Description: Does the same as, "ColorDistance". But the colors are searched with tolerance.
*******************************************************************************}

function ColorDistanceTolerance(Col1, Col2, xs, ys, xe, ye, tol: Integer):
  Integer;
var
  a, b: Integer;
begin
  FindColorTolerance(x, y, Col1, xs, ys, xe, ye, tol);
  FindColorTolerance(a, b, Col2, xs, ys, xe, ye, tol);
  Result := Distance(x, y, a, b);
end;

{*******************************************************************************
procedure ClickRandomlyOnColour(Colour, x, y, xa, ya: Integer; Left: Boolean);
By: Spky
Description: Clicks randomly on the specified colour in box "x, y, xa, ya".
*******************************************************************************}

procedure ClickRandomlyOnColour(Colour, x, y, xa, ya: Integer; Left: Boolean);
var
  Ix, Iy, I: Integer;
  Coords: array of TPoint;
begin
  for Iy := y to ya do
    for Ix := x to xa do
      if (GetColor(Ix, Iy) = Colour) then
      begin
        SetArrayLength(Coords, GetArrayLength(Coords) + 1)
          Coords[GetArrayLength(Coords) - 1].x := Ix;
        Coords[GetArrayLength(Coords) - 1].y := Iy;
      end;
  I := 0 + Random(GetArrayLength(Coords));
  if (I > 0) then
    case Left of
      True: Mouse(Coords[I].x, Coords[I].y, 0, 0, True);
      False: Mouse(Coords[I].x, Coords[I].y, 0, 0, True);
    end;
end;

{*******************************************************************************
function FindColorCircle(var x, y: Integer; color, radius, MidPointx, MidPointy: Integer): Boolean;
By: Freddy1990
Description: Searches for a color within a circle.
*******************************************************************************}

function FindColorCircle(var x, y: Integer; color, radius, MidPointx, MidPointy:
  Integer): Boolean;
begin
  Result := FindColorCircleD(x, y, color, radius, MidPointx, MidPointy, 0);
end;

{*******************************************************************************
function FindColorCircleTolerance(var x, y: Integer; color, radius, MidPointx, MidPointy, tolerance: Integer): Boolean;
By: Freddy1990
Description: Searches for a color with a tolerance within a circle.
*******************************************************************************}

function FindColorCircleTolerance(var x, y: Integer; color, radius, MidPointx,
  MidPointy, tolerance: Integer): Boolean;
begin
  Result := FindColorCircleD(x, y, color, radius, MidPointx, MidPointy,
    tolerance);
end;

{*******************************************************************************
function MouseColor(var x, y: Integer; color, radius, tol: Integer): Boolean;
By: Krazy_Meerkat
Description: Searches for a color with a tolerance in a spiral around the mouse.
*******************************************************************************}

function MouseColor(var x, y: Integer; color, radius, tol: Integer): Boolean;
var
  MousieX, MousieY: Integer;
begin
  GetMousePos(MousieX, MousieY);
  if (FindColorSpiralTolerance(x, y, color, MousieX - radius, MousieY - radius,
    MousieX + radius, MousieY + radius, tol)) then
    Result := True;
end;

{*******************************************************************************
function FindClosestColor(var x, y, matchingcolour: Integer; colour, xs, ys, xe, ye: Integer): Boolean;
By: Krazy_Meerkat
Description: Searches for a color using the least amount of tolerance possible
*******************************************************************************}

function FindClosestColor(var x, y, matchingcolour: Integer; colour, xs, ys, xe,
  ye: Integer): Boolean;
var
  tol, range: Integer;
begin
  tol := 100
    range := tol div 4
    repeat
    if (FindColor(x, y, colour, xs, ys, xe, ye)) then
      break;
    if (not (FindColorSpiralTolerance(x, y, colour, xs, ys, xe, ye, tol))) then
    begin
      repeat
        tol := tol + range
      until (FindColorSpiralTolerance(x, y, colour, xs, ys, xe, ye, tol))
        tol := tol - (range div 2)
        range := (range div 2)
    end;
    tol := tol - range
  until (range = 0)
    Result := True;
  matchingcolour := GetColor(x, y);
end;

{*******************************************************************************
function FindColorSkipBox(var x, y: Integer; color, x1, y1, x2, y2: Integer; box: TBox): Boolean;
By: Freddy1990
Description: Searches for a color in a square while skipping a square.
*******************************************************************************}

function FindColorSkipBox(var x, y: Integer; color, x1, y1, x2, y2: Integer;
  box: TBox): Boolean;
var
  a, b: TPointArray;
begin
  SetArrayLength(a, 1);
  SetArrayLength(b, 1);
  a[0] := cPoint2(box, 1);
  b[0] := cPoint2(box, 2);
  Result := FindColorSkipBoxD(x, y, color, x1, y1, x2, y2, 0, a, b);
end;

{*******************************************************************************
function FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2, tolerance: Integer; box: TBox): Boolean;
By: Freddy1990
Description: Searches for a color in a square while skipping a square with a tolerance.
*******************************************************************************}

function FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2,
  tolerance: Integer; box: TBox): Boolean;
var
  a, b: TPointArray;
begin
  SetArrayLength(a, 1);
  SetArrayLength(b, 1);
  a[0] := cPoint2(box, 1);
  b[0] := cPoint2(box, 2);
  Result := FindColorSkipBoxD(x, y, color, x1, y1, x2, y2, tolerance, a, b);
end;

{*******************************************************************************
function FindColorSkipBoxArray(var x, y: Integer; color, x1, y1, x2, y2: Integer; box: TBoxArray): Boolean;
By: Freddy1990
Description: Searches for a color in a square while skipping multiple squares.
*******************************************************************************}

function FindColorSkipBoxArray(var x, y: Integer; color, x1, y1, x2, y2:
  Integer; box: TBoxArray): Boolean;
var
  a, b: TPointArray;
begin
  a := cPointArray2(box, 1);
  b := cPointArray2(box, 2);
  Result := FindColorSkipBoxD(x, y, color, x1, y1, x2, y2, 0, a, b);
end;

{*******************************************************************************
function FindColorSkipBoxArrayTolerance(var x, y: Integer; color, x1, y1, x2, y2, tolerance: Integer; box: TBoxArray): Boolean;
By: Freddy1990
Description: Searches for a color in a square while skipping multiple squares.
*******************************************************************************}

function FindColorSkipBoxArrayTolerance(var x, y: Integer; color, x1, y1, x2,
  y2, tolerance: Integer; box: TBoxArray): Boolean;
var
  a, b: TPointArray;
begin
  a := cPointArray2(box, 1);
  b := cPointArray2(box, 2);
  Result := FindColorSkipBoxD(x, y, color, x1, y1, x2, y2, tolerance, a, b);
end;

{*******************************************************************************
function ScanMMColorExact(var x, y: Integer; color: Integer): Boolean;
By: Freddy1990
Description: Finds a color on the minimap. (minimap being 100% correct)
*******************************************************************************}

function ScanMMColorExact(var x, y: Integer; color: Integer): Boolean;
begin
  Result := ScanExactMinimapD(x, y, color, 0);
end;

{*******************************************************************************
function ScanMMColorExactTolerance(var x, y: Integer; color, tolerance: Integer): Boolean;
By: Freddy1990
Description: Finds a color with a tolerance on the minimap. (minimap being 100% correct)
*******************************************************************************}

function ScanMMColorExactTolerance(var x, y: Integer; color, tolerance:
  Integer): Boolean;
begin
  Result := ScanExactMinimapD(x, y, color, tolerance);
end;

{*******************************************************************************
procedure ClickExactMMColor(color: Integer);
By: Freddy1990
Description: Clicks a color on the EXACT minimap
*******************************************************************************}

procedure ClickExactMMColor(color: Integer);
var
  x, y: Integer;
begin
  if (ScanMMColorExact(x, y, color)) then
    Mouse(x, y, 0, 0, True);
end;

{*******************************************************************************
procedure ClickExactMMColorTol(color, tolerance: Integer);
By: Freddy1990
Description: Clicks a color with a tolerance on the EXACT Minimap.
*******************************************************************************}

procedure ClickExactMMColorTol(color, tolerance: Integer);
var
  x, y: Integer;
begin
  if (ScanMMColorExactTolerance(x, y, color, tolerance)) then
    Mouse(x, y, 0, 0, True);
end;

{*******************************************************************************
function ScanMMAreaColorExact(var x, y: Integer; x1, y1, x2, y2, color: Integer): Boolean;
By: Freddy1990
Description: Finds a color in the specified rectangle on the minimap. (minimap being 100% correct)
*******************************************************************************}

function ScanMMAreaColorExact(var x, y: Integer; x1, y1, x2, y2, color:
  Integer): Boolean;
begin
  Result := ScanExactMMAreaD(x, y, x1, y1, x2, y2, color, 0);
end;

{*******************************************************************************
function ScanMMAreaColorExactTolerance(var x, y: Integer; x1, y1, x2, y2, color, tolerance: Integer): Boolean;
By: Freddy1990
Description: Finds a color in the specified rectangle with a tolerance on the minimap. (minimap being 100% correct)
*******************************************************************************}

function ScanMMAreaColorExactTolerance(var x, y: Integer; x1, y1, x2, y2, color,
  tolerance: Integer): Boolean;
begin
  Result := ScanExactMMAreaD(x, y, x1, y1, x2, y2, color, tolerance);
end;
 
it still gives me a error. the findcolorcircled error. try this script and tell me if it works on urs.

program StrangeEssMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Mining.scar}






(* ######## ### ### #############
######## ### ### ### #############
######## ### ### ### ###
### ### ### ### ###
### ### ### ### ###
######## ### ### ### ############# ---->
######## ### ### ### ###
### ### ### ### ###
### ### ### ### ###
######## ### ### ############# #############
######## ### ############# #############

#### #### ##### ###
##### ##### ### ## ###
### ## ## ### ### ## ###
### #### ### ### ## ###
### ## ### ### ## ###
### ### ### ## ###
### ### ### #####
### ### ### ####


-------------------------------------------------------------------------
=========================================================================
-------------------------------------------------------------------------
##

## ## ## ## ####### ## ## ###### #######
## #### ## ## ## ## ## ## ##
## ## ## ## ## ####### ####### ###### #######
#### #### ## ## ## ## ## ##
## ## ## ####### ## ## ###### #######

-------------------------------------------------------------------------
=========================================================================
// Varrok essence miner version : 3.1.2 Srl updated //
// ------------------------------ //
// by Solemn Wishes //
// contact: [email protected] //
// //
// //
//----------------------------------------------------------------------//
// //
// Start in varrok bank (recomended near middle banker) hit run and //
// let the script do the rest, no color setup needed //
// //
//----------------------------------------------------------------------//
// Instructions. //
//----------------------------------------------------------------------//
// //
// 1. USE Runescape with LOW Detail, Very Bright. //
// 2. Set your Screen to 32 bit TRUE color. //
// 3. Set Playernames, Passwords ect ect.... //
// 4. Start at Varrok east bank, middle booth if possible //
// 5. Be sure to have a pickaxe somewhere (inventory/equipted) //
//----------------------------------------------------------------------//*)


var
arrow,clickhere,timestalked,play :integer;
tripstodo, trips, teleportbackup,teleport: Integer;
magicthingy,randomfight,mined,exp,report, report2:integer;


(*-------------------------------------------------------------------------*)
// //
// Essence miner start, only edit the player array bellow. //
(*-------------------------------------------------------------------------*)

Const StartPlayer = 0;

Procedure DeclarePlayers;
begin
HowManyPlayers:=10;

NumberOfPlayers(HowManyPlayers);

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Loc :='varrok';
Players[0].Active:=True;

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='varrok';
Players[1].Active:=True;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Loc :='varrok';
Players[2].Active:=True;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Loc :='varrok';
Players[3].Active:=True;

Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Loc :='varrok';
Players[4].Active:=True;

Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Loc :='varrok';
Players[5].Active:=True;

Players[6].Name :='';
Players[6].Pass :='';
Players[6].Nick :='';
Players[6].Loc :='varrok';
Players[6].Active:=True;

Players[7].Name :='';
Players[7].Pass :='';
Players[7].Nick :='';
Players[7].Loc :='varrok';
Players[7].Active:=True;

Players[8].Name :='';
Players[8].Pass :='';
Players[8].Nick :='';
Players[8].Loc :='varrok';
Players[8].Active:=True;

Players[9].Name :='';
Players[9].Pass :='';
Players[9].Nick :='';
Players[9].Loc :='varrok';
Players[9].Active:=True;

end;
//-------------------------------------------------------------------------//
procedure solemnrandoms;
begin

if(not(loggedin)) then LoginPlayer;
FindNormalRandoms;
if(FindFight)then
begin
writeln('we are being attacked, running away')
RunAwayDirection('S')
RunBack;
randomfight:= randomfight+1
end;
end;
//-------------------------------------------------------------------------//
procedure walkingrandoms;
var i : integer;
begin

if(not(loggedin)) then LoginPlayer;
FindLamp('mining');
findnewbox;

i:= random(3)+1
if(i=1)then
begin;
FindNormalRandoms;
antiban;
end;
end;
//-------------------------------------------------------------------------//
procedure checkbankcolor;
var c : integer;
begin
if(not(bankcolor>0))then
repeat
BankColor:= GetSymbolColor(x,y, 'bank');
c:= c+1;
until(bankcolor>0)or(c>10)

if(c>10)then
begin
writeln('unable to find the bank symbol color, please set manually');
Terminatescript;
end;
end;
//-------------------------------------------------------------------------//
function magicshopfloorsetup:boolean;
var c, door : integer;
tx, ty : integer;
begin

door := BitmapFromString(2, 4, 'z78DA33300001574B0338C0CF06' +
'00E7CC0979');

magicthingy:= GetSymbolColor(x,y,'magic shop');
if(magicthingy>0)then
begin
result:= true;
end;

if not result then
begin
repeat
If FindBitMapspiralTolerance(door,TX,TY,600,100,642,140,c) then
begin
magicthingy :=GetColor(TX,TY);
Result:=true;
break;
end;
if not result then
c:=c+1;
wait(50)
until(result)or(c=50)
if magicthingy=0 then writeln('Magic shop NOT Found');
FreeBitMap(door);
end;
end;
//-------------------------------------------------------------------------//
function walktoaubury:boolean;
var c : integer;
begin
if(findsymbol(x,y, 'bank'))then
checkbankcolor;
begin
mouse(665,130,4,3,true)
wait(6000+random(2000))
while(WaitTillFlag)do
walkingrandoms;
flag;
end;
begin
magicshopfloorsetup;
repeat
ClickMMColor(magicthingy)
if(flag)then;
begin
result:= true;
flag;
end;
if not result then
c:= c+1;
until(result)or(c>15)
end;
end;
//-------------------------------------------------------------------------//
function findandtalk:boolean;
var i : integer;
begin
i:= random(3)+1;
repeat
if(i=2)then
begin
walkingrandoms;
solemnrandoms;
result:= true;
end;
if(not(i=2))and not(result)then
i:= random(3)+1;
if (FindObj(x, y, 'ubury', 2186884, 5))then
mouse(x,y,1,1,false)
if(ClickOption('elepor', 1))then
begin
flag;
wait(4000+random(2000))
end;
until(findcolorspiraltolerance(x,y,10855856,561,4,719,167,14))
end;
//-------------------------------------------------------------------------//
function detectroom2:boolean;
var tol : integer;
begin
tol:= 10;
repeat
if(findcolorspiraltolerance(x,y,10855856,561,4,719,167,tol))then
begin
mouse(x,y,4,3,true);
WaitTillFlag;
flag;
result:= true;
end;
if not result then
tol:= tol+1;
until(result)
writeln('We have been teleported to the middle-room')
end;
//-------------------------------------------------------------------------//
function detectrooms:boolean;
begin
walkingrandoms;
if(findbitmaptolerancein(arrow, x, y, 543, 3, 760, 165, 50))then
begin
result:=true;
end;
if not result then
detectroom2;
end;
//-------------------------------------------------------------------------//
function backtoshop:boolean;
var tol : integer;
begin
repeat
if(findbitmaptolerancein(arrow,x,y,543,3,760,165,tol))then
begin
mouse(x,y,5,5,true)
flag;
result:= true;
end;
if not result then
tol:= tol+1;
wait(25)
until(result)
begin
repeat
if (FindObj(x, y, 'ortal', 10072760, 25))then
begin
Mouse(x,y,3,2,true)
flag;
result:= true;
end;
until(result)
repeat
wait(1500+random(500))
until(not(findcolorspiral(x , y, 0 ,185, 125, 385, 230)and
not(findcolorspiral(x , y, 16777215 ,185, 125, 385, 230))))
end;
end;
//-------------------------------------------------------------------------//
procedure backtobank;
var i : integer;
begin
i:= random(3)+1;
if(i=3)then
begin
walkingrandoms;
solemnrandoms;
end;
mouse(677,56,1,2,true)
flag;
begin
checkbankcolor;
clickMMcolor(bankcolor);
flag;
repeat
if (not(Loggedin)) then break;
openbank3;
until(BankScreen or (TimeFromMark(Mark)>60000));
end;
if(BankScreen)then
begin
Wait(Random(2000)+200);
FixBank;
Deposit(2,28,2);
end;
mined:= mined+27
timestalked:= timestalked+1
exp:= exp+135
end;
//-------------------------------------------------------------------------//
Procedure progressReport;
var
RHours,Minutes,Seconds,RMinutes,RSeconds:LongInt;
Time:String;
begin
if(GetSystemTime-report2 > report*60000)then
begin
Seconds:=(GetSystemTime) div 1000;
Minutes:=Seconds div 60;
RHours:=Minutes div 60;
Time:=inttostr(Seconds)+' Seconds';
if Minutes<>0 then
begin
RSeconds:=Seconds Mod (Minutes*60);
Time:=inttostr(Minutes)+' Minutes and '+inttostr(RSeconds)+' Seconds';
end;
if RHours<>0 then
begin
RMinutes:=Minutes Mod (RHours*60);
RSeconds:=Seconds Mod (Minutes*60);
Time:=inttostr(RHours)+' Hours, '+inttostr(RMinutes)+' Minutes and '+inttostr(RSeconds)+' Seconds';
end;
begin
writeln('');
writeln('');
writeln(' WORKED FOR '+(TIME));
writeln(' <This essence miner was created by solemn wishes >');
writeln(' TALKED TO THE AUBURY '+inttostr(timestalked)+' TIMES SO FAR');
writeln(' MINED '+inttostr(mined)+ ' ESSENCE ROCKS SO FAR');
writeln(' GAINED AROUND '+inttostr(exp)+' EXP SO FAR')
writeln('');
writeln('');
Report2:=GetSystemTime;
end;
end;
end;
//-------------------------------------------------------------------------//
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
WriteLn(' ');
WriteLn(' ');
WriteLn(' ');
writeln('**********************************************');
writeln('Name : '+ Players[CurrentPlayer].Name);
writeln('Number : '+inttostr(CurrentPlayer));
writeln('Mining Level : '+ inttostr(Players[CurrentPlayer].level[15]));
writeln('Worked for : '+IntToStr(Players[CurrentPlayer].Worked)+' minutes.');
if Players[CurrentPlayer].Active=True then Active:='True' else Active:='False';
writeln('Active : '+ Active);
writeln('Location : '+ Players[CurrentPlayer].loc);
writeln('**********************************************');

for i := 0 to HowManyPlayers-1 do
begin
if Players.Active=True then Active:='True' else Active:='False';
writeln( (inttostr(i))+' : '+Players.name+ ' = '+Active+
'.- Lvl : '+inttostr(Players.level[15])+
'.- B :'+inttostr(Players.Banked)+' Times.'+
'.- A: '+IntToStr(Players.Worked)+' mins.'+
'.- Loc: '+Players.loc);
end
writeln('**********************************************');
end;
//-------------------------------------------------------------------------//
procedure loadbitmaps;
begin
teleport := BitmapFromString(10, 15, 'z78DA3330182CC00D0720' +
'5E1731E2C3492FB5C28AD4D8192A7A870A00000D1EB9C5');

teleportbackup := BitmapFromString(29, 17, 'z78DA33301805A3' +
'60700137208091A3AE1D58D722AB27462FF1EA8951499E69B4162' +
'7D50D03EB5ACA53C2A86BE9E35A5AE732525D325A328FBA7678B8' +
'76A80000F0D74AB7');

play := BitmapFromString(8, 12, 'z78DA33302007B8110170A927D' +
'57C5AAB2746EF60763F2DE28B780000AAE17B79');

clickhere := BitmapFromString(10, 16, 'z78DA3330185EC0CD8D1' +
'CF5A4EAA2C4C6C1A31793A4C45E624C187E7A2989056A0000A02B' +
'B79D');

arrow := BitmapFromString(4, 2, 'C5BAC9C5BAC9C5BAC9C5BAC9E2' +
'6225E26225E26225E26225');

end;
//-------------------------------------------------------------------------//
function minethatess:boolean;
var c, i : integer;
begin
repeat
repeat
if(FindObj(x,y, 'ine',8553104,15))then
begin
getmousepos(x,y)
Mouse(x,y,2,3,true)
flag;
result:= true;
end;
until(result)
if(GetColor(109,429)=0)and(GetColor(84,428)=0)then
Repeat
Wait(2000+random(750));
solemnrandoms;
findpick;
c:= c+1;
Until(not((GetColor(109,429)=0)and(GetColor(84,428)=0)))or(c=20)
i:= i+1
until(i=15)or(inventoryfull= true)
end;
//-------------------------------------------------------------------------//
begin;

setupsrl;
setupsrlmining;
DeclarePlayers;
CurrentPlayer:= StartPlayer;
activateclient;
if(not(LoggedIn))then
LoginPlayer;
if(LoggedIn)then
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
loadbitmaps;
FindPickHeadColor;
repeat

repeat
tripstodo:= random(5)+3;
walktoaubury;
findandtalk;
detectrooms;
minethatess;
backtoshop;
backtobank;
progressReport;
PlayerStats
trips:= trips+1;

until(trips=tripstodo)

begin
repeat
Wait(1000);
FindnormalRandoms;
until(not(LoggedIn));
NextPlayer(True);
end;
if (not(Loggedin)) then NextPlayer(False);
FindPickHeadColor;

until(false)
end.
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top