Results 1 to 8 of 8

Thread: semicolon error

  1. #1
    Join Date
    Apr 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default semicolon error

    what I have to do now?

    SCAR Code:
    program Powerminer;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\Skill\Mining.scar}

    ////////////////////////////////////////////////////////////
    //      [SRL4] QuickPowerMiner by Timothegreat            //
    //                                                        //
    //                   Version 3.0 Pro                      //
    //                                                        //
    //                     ------------                       //
    //                     Instructions                       //
    //                     ------------                       //
    //                                                        //
    // 1. Setup your players by the ore you want to mine      //
    // 2. Fill out lines 23-60                                //
    // 3. Hit the play button                                 //
    // 4. Enjoy!                                              //
    //                 Autoresponder by Me                    //
    //                Gas Detection by Wizzup                 //
    ////////////////////////////////////////////////////////////

    const
      SRLStatsID = '';  // SRL Stats ID Number
      SRLStatsPW = '';  // SRL Stats Password
      UseResponder = True; // Use autoresponder? (recommended)
      SleepMode = False; // sleep mode? (single player)
      SleepFor = 10; // minutes to sleep (add random 5 minutes to it)
      RunDir = 'N'; // direction to run if in fight
                    // N for north, S for south, etc.
                   
    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :=''; //3-4 letters from name
      Players[0].Active:= True;
      Players[0].Booleans[1]:= True; // True if new rocks. False if old. (new rocks have veins)
      Players[0].Booleans[2]:= False; // Pick equipped?
      Players[0].Strings[1]:= 'Tin'; // type of ore
      Players[0].Integers[1]:= 27; // # of loads
    end


    {---------------------DO NOT TOUCH BELOW THIS---------------------------}

    const
      oldclay = 5212840;
      oldcopper = 4483472;
      oldtin = 8553100;
      oldiron = 2437455;
      oldgold = 2081517;
      oldcoal = 2636603;
      oldmith = 6636869;
      oldaddy = 5202510;

      newclay = 5212840;
      newcopper = 5010848; //
      newtin = 7829376; //
      newiron = 3030370; //
      newgold = 2081517; // from rimmington
      newcoal = 2636603;
      newmith = 6636869;
      newaddy = 5202510;

    var
      x,y,cx,cy,orecolor,TLoads,Gasses,attempts,tol,levels,BrokenPicks,tempcolor,
      loads,ores,RespondedTimes:integer;
      done:boolean;
      Mincount:byte;

    procedure SetupScript;
    begin
      if (Players[CurrentPlayer].Booleans[1])then
      begin
        Mincount:= 1;
        tol:= 5;
        case lowercase(Players[CurrentPlayer].Strings[1]) of
          'clay'    : orecolor:= newclay;
          'copper'  : orecolor:= newcopper;
          'tin'     : orecolor:= newtin;
          'iron'    : orecolor:= newiron;
          'coal'    : orecolor:= newcoal;
          'mithril' : orecolor:= newmith;
          'mith'    : orecolor:= newmith;
          'adamant' : orecolor:= newaddy;
          'addy'    : orecolor:= newaddy;
        end;
      end else
      begin
        Mincount:= 4;
        tol:= 5;
        case lowercase(Players[CurrentPlayer].Strings[1]) of
          'clay'    : orecolor:= oldclay;
          'copper'  : orecolor:= oldcopper;
          'tin'     : orecolor:= oldtin;
          'iron'    : orecolor:= oldiron;
          'coal'    : orecolor:= oldcoal;
          'mithril' : orecolor:= oldmith;
          'mith'    : orecolor:= oldmith;
          'adamant' : orecolor:= oldaddy;
          'addy'    : orecolor:= oldaddy;
        end;
      end;
    end;

    var
      thechat,talkername,ZeText:string;
      GoodBye,YourName,General,Greetings,Crafting,Mining,Macroes:Array [0..10] of string;
      Funnies,Questions,Totals,Highest: Array [0..10] of String;
      ResponseTime: LongInt;

    {*******************************************************************************
    function DetermineHighest: String;
    By: Timothegreat
    Description: Determines your character's highest skill

    *******************************************************************************}


    function DetermineHighest: string;
    var
      h,i,skill: integer;
    begin
      for h:= 1 to 99 do
      begin
        for i:= 1 to 21 do
        begin
          if (Players[CurrentPlayer].level[i] >= h) then
          begin
            skill:= i;
          end;
        end;
      end;
      case skill of
        1 : result:= 'attack';
        2 : result:= 'strength';
        3 : result:= 'defence';
        4 : result:= 'range';
        5 : result:= 'prayer';
        6 : result:= 'magic';
        7 : result:= 'runecrafting';
        8 : result:= 'hitpoints';
        9 : result:= 'agility';
        10 : result:= 'herblore';
        11 : result:= 'thieving';
        12 : result:= 'crafting';
        13 : result:= 'fletching';
        14 : result:= 'slayer';
        15 : result:= 'mining';
        16 : result:= 'smithing';
        17 : result:= 'fishing';
        18 : result:= 'cooking';
        19 : result:= 'firemaking';
        20 : result:= 'woodcutting';
        21 : result:= 'farming';
      end;
    end;

    {*******************************************************************************
    function DetermineTotal: String;
    By: Timothegreat
    Description: Determines your character's total lvl

    *******************************************************************************}


    function DetermineTotal: string;
    var
      i,total: integer;
    begin
      for i:= 1 to 21 do
      begin
        Total:= Total + Players[CurrentPlayer].Level[i];
      end;
      result:= inttostr(Total+3);
    end;

    procedure SetupArrays;
    begin
      Greetings[0]:= 'Hi';
      Greetings[1]:= 'Hello';
      Greetings[2]:= 'Sup';
      Greetings[3]:= 'yo';
      Greetings[4]:= 'good day';
      Greetings[5]:= 'homey';
      Greetings[6]:= 'homeslice';//
      Greetings[7]:= 'ello';
      Greetings[8]:= 'Sup';
      Greetings[9]:= 'Hi';
      Greetings[10]:= 'Hey';

      Questions[0]:= 'ok i guess...you?';
      Questions[1]:= 'great';
      Questions[2]:= 'good';
      Questions[3]:= 'ok, u';
      Questions[4]:= 'fine';
      Questions[5]:= 'umm..ok';
      Questions[6]:= 'awesome';
      Questions[7]:= 'How are you';
      Questions[8]:= 'ow are u';
      Questions[9]:= 'ow r u';
      Questions[10]:= 'ow are you doing';

      General[0]:= 'idk';
      General[1]:= 'i dont know';
      General[2]:= 'wow..';
      General[3]:= 'hmmmmmmmmmmmmm';
      General[4]:= 'im black';
      General[5]:= 'poo';
      General[6]:= 'im captain underpants';
      General[7]:= 'Who';
      General[8]:= 'What';
      General[9]:= 'How';
      General[10]:= 'Why';

      Macroes[0]:= 'what the hell?';
      Macroes[1]:= 'omfg im not an autoer';
      Macroes[2]:= 'whatcha talkin bout willis';
      Macroes[3]:= 'bots are gone';
      Macroes[4]:= 'there arent bots anymore';
      Macroes[5]:= 'stupid potty bots';
      Macroes[6]:= 'il creampie some of these bots';
      Macroes[7]:= 'utoer';
      Macroes[8]:= 'bot';
      Macroes[9]:= 'acroer';
      Macroes[10]:= 'utoing';

      Funnies[0]:= 'lol';
      Funnies[1]:= 'rofl';
      Funnies[2]:= 'roflcopter';
      Funnies[3]:= 'lmao';
      Funnies[4]:= 'lmfao';
      Funnies[5]:= 'pwnt?';
      Funnies[6]:= 'wtf';
      Funnies[7]:= 'lol';
      Funnies[8]:= 'rofl';
      Funnies[9]:= 'lmao';
      Funnies[10]:= 'haha';

      YourName[0]:= 'ya?';
      YourName[1]:= 'what?';
      YourName[2]:= 'what you want?';
      YourName[3]:= 'yep?';
      YourName[4]:= '......?';
      YourName[5]:= 'im chuck norris';
      YourName[6]:= 'byah! rick james';
      YourName[7]:= Players[CurrentPlayer].Name;
      YourName[8]:= Players[CurrentPlayer].Nick;
      YourName[9]:= Players[CurrentPlayer].Name;
      YourName[10]:= Players[CurrentPlayer].Nick;

      GoodBye[0]:= 'later man';
      GoodBye[1]:= 'bye dude';
      GoodBye[2]:= 'cya later man';
      GoodBye[3]:= 'cya dude';
      GoodBye[4]:= 'k later';
      GoodBye[5]:= 'bye man';
      GoodBye[6]:= 'i love you';
      GoodBye[7]:= 'gtg';
      GoodBye[8]:= 'bye';
      GoodBye[9]:= 'brb';
      GoodBye[10]:= 'cya';

      Crafting[0]:= 'mine is '+inttostr(Players[CurrentPlayer].level[12]);
      Crafting[1]:= inttostr(Players[CurrentPlayer].level[12])+' you';
      Crafting[2]:= inttostr(Players[CurrentPlayer].level[12]);
      Crafting[3]:= 'almost '+inttostr(Players[CurrentPlayer].level[12]+1);
      Crafting[4]:= 'im almost'+inttostr(Players[CurrentPlayer].level[12]+1);
      Crafting[5]:= 'poopy only '+inttostr(Players[CurrentPlayer].level[12]);
      Crafting[6]:= 'okey im '+inttostr(Players[CurrentPlayer].level[12]);
      Crafting[7]:= 'crafting lvl';
      Crafting[8]:= 'crafting level';
      Crafting[9]:= 'craft lvl';
      Crafting[10]:= 'craft level';

      Mining[0]:= 'mine is '+inttostr(Players[CurrentPlayer].level[15]);
      Mining[1]:= inttostr(Players[CurrentPlayer].level[15])+' you';
      Mining[2]:= inttostr(Players[CurrentPlayer].level[15]);
      Mining[3]:= 'almost '+inttostr(Players[CurrentPlayer].level[15]+1);
      Mining[4]:= 'im almost'+inttostr(Players[CurrentPlayer].level[15]+1);
      Mining[5]:= 'poopy only '+inttostr(Players[CurrentPlayer].level[15]);
      Mining[6]:= 'okey im '+inttostr(Players[CurrentPlayer].level[15]);
      Mining[7]:= 'mining lvl';
      Mining[8]:= 'mine lvl'
      Mining[9]:= 'minin lev';
      Mining[10]:= 'mining level';
     
      Highest[0]:= 'mine is '+DetermineHighest;
      Highest[1]:= DetermineHighest+' you';
      Highest[2]:= DetermineHighest;
      Highest[3]:= DetermineHighest+' i guess';
      Highest[4]:= 'mines '+DetermineHighest;
      Highest[5]:= DetermineHighest;
      Highest[6]:= 'mines '+DetermineHighest+' u?';
      Highest[7]:= 'high lvl';
      Highest[8]:= 'biggest lvl'
      Highest[9]:= 'highest lvl';
      Highest[10]:= 'highest lev';

      Totals[0]:= 'mine is '+DetermineTotal;
      Totals[1]:= DetermineTotal+' you';
      Totals[2]:= DetermineTotal;
      Totals[3]:= DetermineTotal+' i guess';
      Totals[4]:= 'mines '+DetermineTotal;
      Totals[5]:= DetermineTotal;
      Totals[6]:= 'mines '+DetermineTotal+' u?';
      Totals[7]:= 'total lvl';
      Totals[8]:= 'totals lvl'
      Totals[9]:= 'total lev';
      Totals[10]:= 'totals lev';

    end;

    function TheLastChat: Boolean;
    var
      i: Integer;
      textP: TPoint;
    begin
      textP := TextCoords(8);
      talkername := LowerCase(Trim(GetTextAtEx(textP.x - 2, textP.y - 2, 0, SmallChars, False, False, 0, 1,
        0, 60, False, tr_allChars)))
      i := Pos(':', talkername)
      talkername:= ':'+talkername;
      talkername:=Between(':',':',talkername);
      if not(talkername = '') then
      begin
        Result := True;
      end;
    end;

    function CheckLastChatText(thetext:string): Boolean;
    var
      x, y: Integer;
      textP: TPoint;
    begin
      textP := TextCoords(8);
      if findcolor(x, y, 16711680, textp.x, textp.y, textp.x + 200, textp.y + 14) then
      begin
        thechat := LowerCase(Trim(GetTextAtEx(x - 3, textp.y - 2, 0, SmallChars, False,
          False, -1, 1, 16711680, 60, False, tr_allChars)));
        if (pos(thetext,thechat) <> 0) then
          Result := True;
        try
        if (pos(thetext,Capitalize(thechat)) <> 0) then
          Result := True;
        except
          writeln('stupid chat');
        end;
        try
        if (pos(Capitalize(thetext),Capitalize(thechat)) <> 0)then
          Result := True;
        except
          writeln('stupid chat');
        end;
      end;
    end;

    function Respondit(TheType:Array of String):boolean;
    var
      i,Response:integer;
    begin
      if not TheLastchat then exit;
      if (Capitalize(talkername) = Capitalize(Players[CurrentPlayer].Name))then exit;
      for i:= 7 to 10 do
      begin
        ZeText:= TheType[i];
        if CheckLastChatText(ZeText)then
        begin
          Response:= random(7);
          wait(random(500));
          TypeSend(TheType[Response]);
          RespondedTimes:= RespondedTimes + 1;
          ReportVars[3]:= ReportVars[3] + 1;
          SendSRLReport;
          SRLRandomsReport;
          Result:=true;
        end;
      end;
    end;

    function RespondAll:boolean;
    begin
      SetupArrays;
      result:= false;
      if (TimeFromMark(ResponseTime) < RandomRange(5000,7500))then exit;
      result:= RespondIt(Highest);
      if result then
      begin
        MarkTime(ResponseTime);
        exit;
      end;
      result:= RespondIt(Totals);
      if result then
      begin
        MarkTime(ResponseTime);
        exit;
      end;
      result:= RespondIt(Greetings);
      if result then
      begin
        MarkTime(ResponseTime);
        exit;
      end;
      if result then exit;
      case random(4)of
        0: result:= RespondIt(Funnies);
        1: wait(1);
        2: wait(1);
      end;
      if result then
      begin
        MarkTime(ResponseTime);
      end;
      if result then exit;
      result:= RespondIt(Crafting);
      if result then
      begin
        MarkTime(ResponseTime);
      end;
      if result then exit;
      result:= RespondIt(Mining);
      if result then
      begin
        MarkTime(ResponseTime);
      end;
      if result then exit;
      result:= RespondIt(Questions);
      if result then
      begin
        MarkTime(ResponseTime);
      end;
      if result then exit;
      result:= RespondIt(YourName);
      if result then
      begin
        MarkTime(ResponseTime);
      end;
      if result then exit;
      result:= RespondIt(Goodbye);
      if result then
      begin
        MarkTime(ResponseTime);
      end;
      if result then exit;
      result:= RespondIt(Macroes);
      if result then
      begin
        MarkTime(ResponseTime);
      end;
    end;

    var Mx, My, Ux, Uy : integer;
    MyTPoint1, MyTPoint2: TPoint;

    function PointOnCubicBezier(cp: TPointArray; t: Extended): TPoint;
    var
      ax, ay, bx, by, cx, cy,
      tSquared, tCubed, Curve: Extended;
    begin
      Curve:= 3.0; //average curve.
      cx := Curve * (cp[1].x - cp[0].x);
      bx := Curve * (cp[2].x - cp[1].x) - cx;
      ax := cp[3].x - cp[0].x - cx - bx;

      cy := Curve * (cp[1].y - cp[0].y);
      by := Curve * (cp[2].y - cp[1].y) - cy;
      ay := cp[3].y - cp[0].y - cy - by;

      tSquared := t * t;
      tCubed := tSquared * t;

      result.x := Round((ax * tCubed) + (bx * tSquared) + (cx * t) + cp[0].x);
      result.y := Round((ay * tCubed) + (by * tSquared) + (cy * t) + cp[0].y);
    end;


    function Spline(ex, ey: integer; CTRLP1, CTRLP2: TPoint): TPointArray;
    var
        theta, theta_Inc: extended;     sx, sy: integer;
        Dist: integer;
        CtrlPoints: Array [1..4] of TPoint; //Added, Control Points array.
    begin
      GetMousePos(sx, sy);
      Dist:= Distance(sx, sy, ex, ey);
      CtrlPoints[1]:= Point(sx, sy);
      CtrlPoints[2]:= CtrlP1;
      CtrlPoints[3]:= CtrlP2;
      CtrlPoints[4]:= Point(ex, ey);
      theta_inc:= 1.0 div Dist;
      theta:= 0.0;
      repeat
        theta_Inc:= MinE(1.0 - theta, theta_Inc); //This is the line to stop theta over 1.0
        theta:= theta + theta_Inc;
        SetLength(Result,Length(Result)+1);
        Result[High(result)]:= PointOnCubicBezier(ctrlpoints, theta);
      until(Theta >= 1.0);
      result[High(result)]:= Point(ex, ey); //This is a failsafe. High = Length - 1.
    end;

    procedure TimoMouse(x, y, rx, ry: integer; left, justmove:boolean);
    var
      P: TPointArray;
      I, tempx, tempy, b, c: integer;
    begin
      GetMousePos(mx,my);
      x:= x+random(rx);
      y:= y+random(ry);
      ux:=x;
      uy:=y;
      tempy:= my + y;
      tempx:= mx + x;
      if (mx > x) then
      begin
        if (my > y) then
        begin
          MyTPoint1.y:= tempy/2;
          MyTPoint1.x:= tempx/2;
          MyTPoint2.y:= tempy/3;
          MyTPoint2.x:= tempx/3;
        end else
        begin
          MyTPoint1.y:= tempy/3;
          MyTPoint1.x:= tempx/2;
          MyTPoint2.y:= tempy/2;
          MyTPoint2.x:= tempx/3;
        end;
      end else
      begin
        if (my > y) then
        begin
          MyTPoint1.y:= tempy/2;
          MyTPoint1.x:= tempx/3;
          MyTPoint2.y:= tempy/3;
          MyTPoint2.x:= tempx/2;
        end else
        begin
          MyTPoint1.y:= tempy/3;
          MyTPoint1.x:= tempx/3;
          MyTPoint2.y:= tempy/2;
          MyTPoint2.x:= tempx/2;
        end;
      end;
      P:= Spline(x, y, MyTPoint1, MyTPoint2);
      for i:= 0 to High(P) do
      begin
        MoveMouse(P[i].x, P[i].y);
        wait(randomrange(0, 2));
      end;
      if justmove then exit;
      Wait(60 + Random(30));
      GetMousePos(b, c);
      HoldMouse(b + 1, c, left);
      repeat
        Wait(20 + Random(30));
        I := I + 1;
      until (I > 4);
      GetMousePos(b, c);
      ReleaseMouse(b, c, left);
      Wait(100 + Random(100));
    end;

    procedure setchats;
    begin
      if not(LoggedIn)then exit;
      if not findcolortolerance(x,y,65280,138,490,155,499,2)then
      begin
        TimoMouse(x,y,2,2,false,false);
        ChooseOption('On');
      end;
    end;

    function GetMessage:string;

    begin
      Result := Trim(GetTextAtEx(30, 443 , 0, SmallChars, False,
      False, 0, 1, 0, 80, False, tr_AllChars));
    end;

    function GetMessage2:string;

    begin
      Result := Trim(GetTextAtEx(30, 429 , 0, SmallChars, False,
      False, 0, 1, 0, 80, False, tr_AllChars));
    end;

    function WhichLevel:string;
    Var TheLevel:string;
    begin
      if FindColor(x, y, 8388608, 14, 372, 495, 389) then
      begin
        TheLevel := GetTextAtEx(x + 4, y - 1, 0, NPCChars, false, false, 0, 2, 8388608, 60, false, tr_AllChars)
        Result := Trim(Between('ced a','evel',TheLevel))
      end;
    end;


    Function Level:boolean;
    begin
      Result:=FindColor(x, y, 8388608, 14, 372, 495, 389)
      if (result) then
      begin
        WriteLn('******** Advanced A '+WhichLevel+' Level ********');
        WriteFileString(TheFile, '******** Advanced A '+WhichLevel+' Level ********'
        + Chr(13))
        clicktocontinue;
        wait(2000)
        clicktocontinue;
        levels:=levels+1;
      end;
    end;

    procedure Dropit(slot1,slot2: integer);
    var
      i,beginslot,endslot: integer;
      DropPoint: Array [0..27] of TPoint;
    begin
      DropPoint[0]:= inttopoint(579,230);
      DropPoint[1]:= inttopoint(621,230);
      DropPoint[2]:= inttopoint(663,230);
      DropPoint[3]:= inttopoint(703,230);
      DropPoint[4]:= inttopoint(579,266);
      DropPoint[5]:= inttopoint(621,266);
      DropPoint[6]:= inttopoint(663,266);
      DropPoint[7]:= inttopoint(703,266);
      DropPoint[8]:= inttopoint(579,303);
      DropPoint[9]:= inttopoint(621,303);
      DropPoint[10]:= inttopoint(663,303);
      DropPoint[11]:= inttopoint(703,303);
      DropPoint[12]:= inttopoint(579,339);
      DropPoint[13]:= inttopoint(621,339);
      DropPoint[14]:= inttopoint(663, 336);
      DropPoint[15]:= inttopoint(705, 337);
      DropPoint[16]:= inttopoint(578, 371);
      DropPoint[17]:= inttopoint(620, 372);
      DropPoint[18]:= inttopoint(663, 372);
      DropPoint[19]:= inttopoint(704, 372);
      DropPoint[20]:= inttopoint(579, 407);
      DropPoint[21]:= inttopoint(621, 406);
      DropPoint[22]:= inttopoint(663, 407);
      DropPoint[23]:= inttopoint(706, 407);
      DropPoint[24]:= inttopoint(579, 444);
      DropPoint[25]:= inttopoint(620, 444);
      DropPoint[26]:= inttopoint(662, 443);
      DropPoint[27]:= inttopoint(705, 442);
      beginslot:= slot1 - 1;
      endslot:= slot2 - 1;
      for i:= beginslot to endslot do
      begin
        Mouse(DropPoint[i].X,DropPoint[i].Y,6,6,false);
        wait(random(10));
        ChooseOption('Drop');
        wait(random(100));
      end;
    end;

    Function w_WizzupGas(cx,cy: integer): Boolean;

    Var
       CTS, I, Le, T, Time: Integer;
       P, P2: TPointArray;
       C, C2: TIntegerArray;
       R, G, B: Integer;
       H, S, L: Extended;
       X, Y, Z: Extended;
       GP: TPoint;

    Begin
      Result := False;

      Time := GetSystemTime;

      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.16, 0.46);
      GP.X := cx;
      GP.Y := cy;
      GP.Y := GP.Y - 20;
      FindColorsTolerance(P, 9083807, GP.x - 25, GP.y - 25, GP.X + 25, GP.Y + 25, 15);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      If Length(P) < 60 Then
        Exit;

      C := GetColors(P);
      C2 := C;
      ClearSameIntegers(C);


      If Length(C) < 40 Then // Maybe lower the value.
      //If Length(C) < 60 Then
      Begin
        Exit;
      End;

      WriteLn('Passed Color Diversity: ' + IntToStr(Length(C)));
      Writeln('Total colors found: ' + IntToStr(Length(P)));

      SetLength(C, 0);
      SetLength(C, Length(C2));
      SetLength(P2, Length(P));

      Le := High(C2);

      For I := 0 To Le Do
      Begin
        ColorToRGB(C2[i], R, G, B);
        //If ((R - G) <= 6) And (G - B > 7) Then
        If ((R - G) <= 10) And (G - B > 7) Then
        Begin
          ColorToHSL(C2[i], H, S, L);
          If (H > 11.5) And (H < 16.0) And (S < 16.0) And (S > 2.0) And (L > 42.0) And (L < 71.0) Then
          Begin
            ColorToXYZ(C2[i], X, Y, Z);
            If (X >= 18.0) And (X <= 45.0) And (Y >= 20.0)
                           And (Y <= 48.0) And (Z >= 15.0)
                           And (Z <= 47.0) And (Abs(X - Y) < 3.0)
                           And (Abs(X - Z) < 5.0) And (Abs(Y - Z) < 6.5)
                            Then
            Begin
              C[T] := C2[i];
              P2[T] := P[i];
              T := T + 1;
            End;
          End;
        End;
      End;
      SetLength(C, T);

      ClearSameIntegers(C);

      If Length(C) < 25 Then
      Begin
        Exit;
      End;
      WriteLn('Passed Color Diversity after filtering the colors: ' + IntToStr(Length(C)));
      Writeln('Total colors found, after filtering: ' + IntToStr(Length(P2)));


      Result := True;
      WriteLn('Gas Gave TRUE');
      writeln('Time taken: ' + IntToStr(GetSystemTime - Time));
    End;

    Function MKFindGas:boolean; // By MasterKill
    begin
      if not LoggedIn then Exit;
      if (FindColorTolerance (x, y, 10596274, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 8950933, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 9017755, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 7900302, 0, 0, 500, 500, 1)) then result:= true;
    end;

    function noore:boolean;
    begin
      result:= (pos('no ore',GetMessage)<>0)
    end;

    function manage:boolean;
    begin
      result:= (pos('manage',GetMessage)<>0)
    end;

    function swing:boolean;
    begin
      if(pos('swing',GetMessage)<>0)then
      begin
        result:=true;
      end else
      begin
        if(pos('swing',GetMessage2)<>0)then
        begin
          if not(Manage)then
          begin
            if not(NoOre)then
            begin
              result:=true;
            end;
          end;
        end else
        begin
          result:=false;
        end;
      end
    end;

    function higherlvlrock:boolean;
    begin
      case lowercase(Players[CurrentPlayer].Strings[1]) of
        'clay'    : result:= false;
        'copper'  : result:= false;
        'tin'     : result:= false;
        'iron'    : result:= false;
        'coal'    : result:= true;
        'mithril' : result:= true;
        'mith'    : result:= true;
        'adamant' : result:= true;
        'addy'    : result:= true;
      end;
    end;

    function RunePick:integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 224;
      dtmMainPoint.y := 272;
      dtmMainPoint.AreaSize := 4;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 5984829;
      dtmMainPoint.Tolerance := 15;

      dtmSubPoints[0].x := 213;
      dtmSubPoints[0].y := 297;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 65536;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 214;
      dtmSubPoints[1].y := 297;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 65536;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 220;
      dtmSubPoints[2].y := 275;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 65536;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 237;
      dtmSubPoints[3].y := 280;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 65536;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 209;
      dtmSubPoints[4].y := 274;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 65536;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;

      Result := AddDTM(TempTDTM);
    end;

    function AddyPick:integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 225;
      dtmMainPoint.y := 272;
      dtmMainPoint.AreaSize := 4;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 4149311;
      dtmMainPoint.Tolerance := 15;

      dtmSubPoints[0].x := 213;
      dtmSubPoints[0].y := 297;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 65536;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 214;
      dtmSubPoints[1].y := 297;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 65536;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 220;
      dtmSubPoints[2].y := 275;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 65536;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 237;
      dtmSubPoints[3].y := 280;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 65536;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 209;
      dtmSubPoints[4].y := 274;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 65536;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;

      Result := AddDTM(TempTDTM);
    end;

    function MithPick:integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 225;
      dtmMainPoint.y := 272;
      dtmMainPoint.AreaSize := 4;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 5782587;
      dtmMainPoint.Tolerance := 15;

      dtmSubPoints[0].x := 213;
      dtmSubPoints[0].y := 297;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 65536;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 214;
      dtmSubPoints[1].y := 297;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 65536;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 220;
      dtmSubPoints[2].y := 275;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 65536;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 237;
      dtmSubPoints[3].y := 280;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 65536;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 209;
      dtmSubPoints[4].y := 274;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 65536;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;

      Result := AddDTM(TempTDTM);
    end;

    function SteelPick:integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 225;
      dtmMainPoint.y := 272;
      dtmMainPoint.AreaSize := 4;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 7040116;
      dtmMainPoint.Tolerance := 15;

      dtmSubPoints[0].x := 213;
      dtmSubPoints[0].y := 297;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 65536;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 214;
      dtmSubPoints[1].y := 297;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 65536;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 220;
      dtmSubPoints[2].y := 275;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 65536;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 237;
      dtmSubPoints[3].y := 280;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 65536;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 209;
      dtmSubPoints[4].y := 274;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 65536;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;

      Result := AddDTM(TempTDTM);
    end;

    function IronPick:integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 224;
      dtmMainPoint.y := 272;
      dtmMainPoint.AreaSize := 4;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 4671565;
      dtmMainPoint.Tolerance := 15;

      dtmSubPoints[0].x := 213;
      dtmSubPoints[0].y := 297;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 65536;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 214;
      dtmSubPoints[1].y := 297;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 65536;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 220;
      dtmSubPoints[2].y := 275;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 65536;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 237;
      dtmSubPoints[3].y := 280;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 65536;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 209;
      dtmSubPoints[4].y := 274;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 65536;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;

      Result := AddDTM(TempTDTM);
    end;

    function BronzePick:integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 225;
      dtmMainPoint.y := 272;
      dtmMainPoint.AreaSize := 4;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 2243147;
      dtmMainPoint.Tolerance := 15;

      dtmSubPoints[0].x := 213;
      dtmSubPoints[0].y := 297;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 65536;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 214;
      dtmSubPoints[1].y := 297;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 65536;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 220;
      dtmSubPoints[2].y := 275;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 65536;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 237;
      dtmSubPoints[3].y := 280;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 65536;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 209;
      dtmSubPoints[4].y := 274;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 65536;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;

      Result := AddDTM(TempTDTM);
    end;

    function PickHandle:integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..4] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 829;
      dtmMainPoint.y := 650;
      dtmMainPoint.AreaSize := 4;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 335662;
      dtmMainPoint.Tolerance := 15;

      dtmSubPoints[0].x := 834;
      dtmSubPoints[0].y := 639;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 65536;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 824;
      dtmSubPoints[1].y := 664;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 65536;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 823;
      dtmSubPoints[2].y := 664;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 65536;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 835;
      dtmSubPoints[3].y := 644;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 65536;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 831;
      dtmSubPoints[4].y := 641;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 65536;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;

      Result := AddDTM(TempTDTM);
    end;

    function FindLostPick:boolean; forward;

    function FindPickaxe(Equip:boolean):boolean;
    var
      i: Integer;
      PickDTM,PickColor: Array[0..5] of Integer;
      Pick: Array[0..5] of String;
    begin
      if not LoggedIn then exit;
      PickDTM[0]:= RunePick;
      Pick[0]:= 'Rune';
      PickColor[0]:= 5984829;
      PickDTM[1]:= AddyPick;
      Pick[1]:= 'Addy';
      PickColor[1]:= 4149311;
      PickDTM[2]:= MithPick;
      Pick[2]:= 'Mith';
      PickColor[2]:= 6176831;
      PickDTM[3]:= SteelPick;
      Pick[3]:= 'Steel';
      PickColor[3]:= 7697790;
      PickDTM[4]:= IronPick;
      Pick[4]:= 'Iron';
      PickColor[4]:= 4342343;
      PickDTM[5]:= BronzePick;
      Pick[5]:= 'Bronze';
      PickColor[5]:= 1979202;
      if Players[CurrentPlayer].Booleans[2]then
      begin
        GameTab(5)
      end else
      begin
        GameTab(4);
      end;
      for i:= 0 to 5 do
      begin
        if FindDTM(PickDTM[i],x,y,MIX1,MIY1,MIX2,MIY2)then
        begin
          if Equip then
          begin
            Mouse(x,y,4,4,true);
            wait(500+random(500));
          end;
          Players[CurrentPlayer].Strings[0]:= Pick[i];
          Players[CurrentPlayer].Integers[0]:= PickColor[i];
          writeln('You have a '+Pick[i]+' pickaxe');
          result:= true;
        end;
      end;
      if not Result then
      begin
        if(FindLostPick)then
        begin
          Result:= True;
        end else
        begin
          NoPick:= True;
        end;
      end;
    end;

    Procedure AttachPick;
    Var
      AxeHead: Integer;
    Begin
      if not(LoggedIn)then exit;
      AxeHead := DTMFromString('78DA637466626078C280024C9D4D19FE03694' +
           '620FE0F048CD640352F18D000231209A42D816A9E1150E3886917' +
           '861A27A09AC704D4B800D53C24A0C60DA8E63901359E44A871256' +
           'C1700B0451030');
      GameTab(4);
      If(FindDTM(PickaxeHandle, X, Y, MIX1, MIY1, MIX2, MIY2))Then
        Begin
          Mouse(X, Y, 4, 4, False);
          ChooseOption('Use');
          Wait(300+Random(400));
          If(FindDTM(AxeHead, X, Y, MIX1, MIY1, MIX2, MIY2))Then
            Begin
              Mouse(X, Y, 3, 3, True);
              Writeln('Pick Attached!');
            End;
          Wait(300+Random(400));
        End;
      FreeDTM(AxeHead);
    End;

    function FindLostPick:boolean;
    var
      i: Integer;
      RedPoints: TPointArray;
    begin
      if not LoggedIn then exit;
      FindColorsTolerance(RedPoints,241,MMX1,MMY1,MMX2,MMY2,5);
      for i:= 0 to length(RedPoints)-1 do
      begin
        Mouse(RedPoints[i].X,RedPoints[i].Y,4,4,true);
        FFlag(0);
        if FindObjCustom(x,y,['ake'],[Players[CurrentPlayer].Integers[0]],15)then
        begin
          Mouse(x,y,0,0,true);
          FFlag(0);
          wait(500+random(500));
          AttachPick;
          if FindPickaxe(True) then
          begin
            result:= true;
            ReportVars[3]:= ReportVars[3] + 1;
            SendSRLReport;
            SRLRandomsReport;
            break;
          end;
        end;
      end;
    end;

    function FindFastRandoms: boolean;
    var
      I, mk, lx, ly: integer;
    begin
      result:= false;
      GetMousePos(lx, ly);
      MarkTime(MK);
      for i:= 0 to 8 do
      begin
        case I of
          0: FindTalk;
          1: if FindBox then SolveBox;
          3, 4: if FindFight then
                begin
                  RunAway(RunDir, True, 1, 15000);
                end;
          5: if FindInventoryRandoms then result:= true;
          7: FindTalk;
          8: wait(1);
        end;
      end;
      //Writeln('FindFastRandoms took '+IntToStr(TimeFromMark(MK))+' msec.');
    end;

    var
      RespondTimer:integer;

    procedure ResetRespond;
    begin
      MarkTime(RespondTimer);
    end;

    function FollowColor(var cx,cy: integer; color: integer): Boolean;
    begin
      if not LoggedIn then Exit;
      if FindColorSpiralTolerance(cx,cy,Color,x-30,y-30,x+30,y+30,Tol) then
      begin
        Result := True;
        //GoneColor:= GetColor(x,y);
        Status('Rock followed');
      end else
      begin
        Result := False;
        cx:= MSCX;
        cy:= MSCY;
        Status('Failed to Follow Rock');
      end;
    end;

    function FollowOre:boolean;
    var
      CTS: integer;
      FlagTime,FlagGone: LongInt;
    begin
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      MarkTime(FlagTime);
      result:= true;
      while TimeFromMark(FlagTime) < RandomRange(7000,8000) do
      begin
        if not FollowColor(cx,cy,TempColor)then
        begin
          result:= false;
        end;
        Wait(50);
        if not FlagPresent then
        begin
          MarkTime(FlagGone);
          while TimeFromMark(FlagGone) < 1000 do
          begin
            if not FollowColor(cx,cy,TempColor)then
            begin
              result:= false;
            end;
            Wait(50);
          end;
          ColorToleranceSpeed(CTS);
          Break;
        end;
      end;
      ColorToleranceSpeed(CTS);
    end;

    procedure HandleFight;
    begin
      RunAway(RunDir,true,1,randomrange(10000,15000));
    end;

    procedure waitrock;
    var
      oretime:LongInt;
    begin
      MarkTime(oretime);
      if swing then
      begin
        repeat
          if NoPick then break;
          FindFastRandoms;
          wait(1);
          if (TimeFromMark(RespondTimer) > 3000)then
          begin
            if RespondAll then ResetRespond;
          end;
          if not(LoggedIn)then break;
          FindNormalRandoms;
          if level then break;
          if higherlvlrock then
          begin
            if (TimeFromMark(oretime) > randomrange(12500,15000))then break;
          end else
          begin
            //if (TimeFromMark(oretime) > 7500)then exit;
            if (TimeFromMark(oretime) > randomrange(10000,12500))then break;
          end;
          if manage then break;
          if level then break;
          FindFastRandoms;
          if FindFight then
          begin
            HandleFight;
          end;
          if manage then break;
          if level then break;
          FindFastRandoms;
          if manage then break;
          if level then break;
          case random(10) of
            0: FindTalk;
            1: SleepAndMoveMouse(random(3000));
          end;
          FindFastRandoms;
          FindNormalRandoms;
          if manage then break;
          if w_wizzupgas(cx,cy-5)then
          begin
            MFF(MSCX,MSCY,5,5);
            Gasses:= Gasses + 1;
            ReportVars[2] := ReportVars[2] + 1;
            SendSRLReport;
            SRLRandomsReport;
            FTWait(36+random(4));
            Status('Found Gas! Using wizzups');
            exit;
          end else
          begin
            if MKFindGas then
            begin
              MFF(MSCX,MSCY,5,5);
              Gasses:= Gasses + 1;
              ReportVars[2] := ReportVars[2] + 1;
              SendSRLReport;
              SRLRandomsReport;
              FTWait(36+random(4));
              Status('Found Gas! Using Masterkills');
              exit;
            end;
          end;
          if manage then exit;
          FindFastRandoms;
          FindNormalRandoms;
          if level then break;
          if noore then break;
          if not LoggedIn then break;
          wait(1);
        until(manage);
      end;
      if noore then exit;
    end;

    procedure powermine;
    begin
      if not(LoggedIn)then exit;
      if NoPick then exit;
      FindNormalRandoms;
      SetChats;
      wait(1);
      if not FindPickaxe(false) then
      begin
        logout;
        Players[CurrentPlayer].Active:= false;
      end;
      if not LoggedIn then exit;
      RespondAll;
      if FindObjOre2(cx,cy,'ocks',orecolor,tol,mincount)then
      begin
        GetMousePos(cx,cy);
        TempColor:=GetColor(cx,cy);
      end else
      begin
        FTWait(1+random(2));
        exit;
      end;
      if w_wizzupgas(cx,cy-5)then
      begin
        MFF(MMCX+2,MMCY,4,4);
        Gasses:= Gasses + 1;
        ReportVars[2] := ReportVars[2] + 1;
        SendSRLReport;
        SRLRandomsReport;
        MMouse(random(MSX2),random(MSY2),5,5);
        Status('Found Gas! Using wizzups gas checker');
        FTWait(8+random(2));
        exit;
      end else
      begin
        if (isuptext('ine'))then
        begin
          case(random(6))of
          0,1,2,3,4:Mouse(cx,cy,0,0,true);
          5:begin
              Mouse(cx,cy,0,0,false);
              ChooseOption('Mine');
            end;
          end;
          attempts:= attempts + 1;
          FollowOre;
          FindNormalRandoms;
          FTWait(4);
        end;
        WaitRock;
        wait(100+random(250));
      end;
    end;

    procedure SetupPick;
    begin
      if not(LoggedIn)then exit;
      {if(GetCombatLevel < 10)Then
      begin
          Writeln('Please Level Up Your Charachters in Combat');
          Logout;
          Players[CurrentPlayer].Loc := 'Too Low Level';
          Players[CurrentPlayer].Active:= False;
          Exit;
      end;}

      if(not FindPickaxe(false))then
      begin
        Writeln('Couldnt get pick colors, Equip or have in inventory.');
        Logout;
      end else
      begin
        GetAllLevels;
        done:= true;
      end;
      SetAngle(true);
    end;

    procedure ProgressReport;
    var Sec:integer;
    begin
      Sec := GetTimeRunning div 1000+1;
      writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
      writeln(' [SRL4] QuickPowerminer 3.0 by Timothegreat ')
      writeln('----------------------------------------')
      writeln(' Time Running: '+TimeRunning)
      writeln(' Ores Mined: '+inttostr(ores))
      writeln(' Loads: '+inttostr(loads))
      writeln(' Ores/hr: '+IntToStr(Round(3600*Ores/Sec)))
      writeln(' Responded: '+inttostr(RespondedTimes)+' Times')
      writeln(' Broken Picks: '+inttostr(BrokenPicks));
      writeln(' Gasses found: '+inttostr(Gasses));
      writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
    end;

    procedure setup;
    begin
      SetupSRL;
      ScriptID := '513';
      if ((SRLStatsID = '') or (SRLStatsPW = ''))then
      begin
        SRLID:='3936';
        SRLPassword:='leechme';
        writeln('Stupid leecher...');
        writeln('Get a stats account soon at');
        writeln('http://stats.srl-forums.com');
      end else
      begin
        SRLID := SRLStatsID;
        SRLPassword := SRLStatsPW;
      end;
    end;

    function AllPlayersInactive: boolean;
    var
      p: integer;
    begin
      for p:= 0 to HowManyPlayers - 1 do
        if Players[p].Active then exit;
      result:= true;
    end;

    procedure SwitchPlayers(Active:boolean);
    var
      thenextplayer,thelastplayer: integer;
      SleepyTime: LongInt;
    begin
      Logout;
      Players[CurrentPlayer].Active:= Active;
      TheNextPlayer:= CurrentPlayer + 1;
      TheLastPlayer:= HowManyPlayers - 1;
      if (TheNextPlayer <= TheLastPlayer)then
      begin
        CurrentPlayer:= CurrentPlayer + 1;
      end else
      begin
        CurrentPlayer:= 0;
      end;
      if not(Players[CurrentPlayer].Active)then
      begin
        repeat
          CurrentPlayer:= random(HowManyPlayers);
        until(Players[CurrentPlayer].Active)or(AllPlayersInactive);
      end;
      ProgressReport;
      if AllPlayersInactive then
      begin
        writeln('All Players False');
        TerminateScript;
      end;
      done:= false;
      if SleepMode then
      begin
        SleepyTime:= SleepFor+random(5);
        SleepyTime:= SleepyTime * 60000;
        wait(SleepyTime);
      end;
      LoginPlayer;
    end;

    procedure MainLoop;
    begin
      Repeat
        if not LoggedIn then LoginPlayer;
        Done:=false;
        wait(1000);
        Repeat
          if Not LoggedIn then break;
          if not(done) then
          begin
            SetupPick;
          end;
          SetupScript;
          if NoPick then
          begin
            TLoads:=0;
            Done:= False;
            NextPlayer(false);
          end;
          Powermine;
          if not LoggedIn then break;
          if (invfull) then
          begin
            Done:= False;
            TLoads:= TLoads + 1;
            loads:= loads + 1;
            ReportVars[1] := ReportVars[1] + 1;
            SendSRLReport;
            SRLRandomsReport;
            if (Players[CurrentPlayer].Booleans[2])then
            begin
              DropIt(1,28);
              ores:= ores + 28;
              ReportVars[0] := ReportVars[0] + 28;
              SendSRLReport;
              SRLRandomsReport;
            end else
            begin
              DropIt(2,28);
              ores:= ores + 27;
              ReportVars[0] := ReportVars[0] + 27;
              SendSRLReport;
              SRLRandomsReport;
            end;
            ProgressReport;
          end;
          if not LoggedIn then break;
        until(TLoads >= Players[CurrentPlayer].Integers[1]);
        TLoads:=0;
        if LoggedIn then
        begin
          Done:= False;
          SwitchPlayers(True);
        end else
        begin
          SwitchPlayers(False);
        end;
      until(AllPlayersInactive);
      SRLRandomsReport;
    end;

    {*******************************************************************************
    function FindRS: Boolean;
    By: RsN
    Description: Finds RS Window
    *******************************************************************************}


    function FindRS: Boolean;
    begin
      Result := FindWindowBySize(766, 504);
    end;

    begin
      Setup;
      DeclarePlayers;
      Done:= False;
      LoginPlayer;
      SetupScript;
      MainLoop;
      ProgressReport;
    end.

    Failed when compiling
    Line 50: [Error] (13192:1): Semicolon (';') expected in script C:\eJay_se\[SRL4] QuickPowerMiner3[1].0 pro.scar

    plz someone help,

    thanks

  2. #2
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    compiles fine for me, so it's probably the line afterwards that has the error.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  3. #3
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

  4. #4
    Join Date
    Apr 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry, i made scar tags of it and put the hole script in it.

  5. #5
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    at the end of DeclarePlayer's you need to change 'end' to 'end;'
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  6. #6
    Join Date
    Apr 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i did that but got still the same problem

  7. #7
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Well, I'm guessing it's out of date, so I would say give up trying to get it to run or contact the author via the scripts topic or through pm.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  8. #8
    Join Date
    Apr 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ah ok, thanks for help anyway

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The noob and the darn semicolon error
    By superit23 in forum OSR Help
    Replies: 4
    Last Post: 12-10-2008, 11:07 PM
  2. [Error] (16682:4): Semicolon (';') expected
    By skilld u in forum OSR Help
    Replies: 3
    Last Post: 03-24-2008, 12:12 AM
  3. Semicolon help
    By Dangerous Garden Tools in forum OSR Help
    Replies: 17
    Last Post: 03-11-2008, 04:08 PM
  4. Semicolon (';') help
    By TommyGun in forum OSR Help
    Replies: 5
    Last Post: 02-28-2008, 02:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •