Results 1 to 3 of 3

Thread: My auto miner v2

  1. #1
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    My auto miner v2

    SCAR Code:
    program AutoMiner;
    {.include SRL/SRL.scar}

    var
    Clicks: Integer;
    Loads: Integer;


    const
    aorb=('a');// a is iron, b is coal
    IronColour= 2701145;
    CoalColour= 2636603;



    procedure Proggy;
    begin
        Writeln('[]========================================[]');
        Writeln('---------------->Our Proggy<----------------');
        Writeln('  did ' + IntToStr(Loads) + ' Loads' + '    ');
        Writeln('[]========================================[]');
       
        end;





    Function FindIron: Boolean;
    begin
      if(aorb=('a'))then
      x:=256;y:=174;
    if(FindColorspiralTolerance(x, y, IronColour, 0, 0, 515, 337, 2))then
      begin
        Result := True;
        Writeln('Fount Some Iron');
        wait(1000+random(500));
      end else;
        Writeln('Were Is That Iron?');
        wait(1000+random(500));
    end;

    Function FindCoal: Boolean;
    begin
      if(aorb=('b'))then
      x:=256;y:=174;
    if(FindColorspiralTolerance(x, y, CoalColour, 0, 0, 515, 337, 2))then
      begin
        Result := True;
        Writeln('Fount Some Coal');
        wait(1000+random(500));
      end else;
        Writeln('Were Is That Coal?');
        wait(1000+random(500));
    end;


    Function MoveMouseToIron: Boolean;
    begin

      Repeat
        if aorb=('a')
        if (FindIron) Then
            begin
          Result := True;
          MMouse(x, y, 2, 2);
          Wait(10+random(20));
          Exit;
        end;
      until (False)
    end;

    Function MoveMouseToCoal: Boolean;
    begin

      Repeat
        if aorb=('b')
        if (FindCoal) then
        begin
          Result := True;
          MMouse(x, y, 2, 2);
          Wait(10+random(20));
          Exit;
        end;
      until (False)
    end;

    procedure ClickIron;
    begin

      if (MoveMouseToIron = true) then
      begin
        aorb=('a');
        Mouse(x, y, 2, 2, True)
        Wait(3500+random(100));
      end;
    end;

    procedure ClickCoal;
    begin

      if (MoveMouseToCoal = true) then
      begin
        aorb=('b');
        Mouse(x, y, 2, 2, True)
        Wait(3500+random(100));
      end;
    end;

    Procedure Dropores;
    begin
      if(InvFull)then
        DropTo(2,28);
        Loads:=Loads+1;
        end;







    begin
    repeat
    setupsrl;
    if(aorb=('a'))then
    FindIron;
    MoveMouseToIron;
    ClickIron;
    Dropores;

    until(false);

    repeat
    setupsrl;
    if(aorb=('b'))then
    FindCoal;
    MoveMouseToCoal;
    ClickCoal;
    Dropores;
    until(false);
    Proggy;
    end.


    but now i get
    Line 63: [Error] (17724:1): 'THEN' expected in script D:\Documents and Settings\Harry.049652820287\Desktop\Miner V3. 0.o.scar
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    first of all, you miss typed the scar tags they have to be like this:[SC AR][/SC AR] (Remove spaces in the SCAR's) I'll read it over and see if I can fix the problem for you.
    Edit heres the script working version:
    SCAR Code:
    program AutoMiner;
    {.include SRL/SRL.scar}

    var
    Clicks: Integer;
    Loads: Integer; //don't need this, but it doesen't hurt script so i left it.


    const
    aorb=('a');// a is iron, b is coal
    IronColour= 2701145;
    CoalColour= 2636603;



    procedure Proggy;
    begin
    ClearDebug;//put this here so it clears debug each time it writes proggy
    Writeln('[]========================================[]');
    Writeln('---------------->Our Proggy<----------------');
    Writeln(' did ' + IntToStr(Loads) + ' Loads' + ' ');
    Writeln('[]========================================[]');
    end;





    Function FindIron: Boolean;
    begin
    if(aorb=('a'))then
    x:=256;y:=174;
    if(FindColorspiralTolerance(x, y, IronColour, 0, 0, 515, 337, 2))then
    begin
    Result := True;
    Writeln('Fount Some Iron');
    wait(1000+random(500));
    end else
    Writeln('Were Is That Iron?');
    wait(1000+random(500));
    end;

    Function FindCoal: Boolean;
    begin
    if(aorb=('b'))then
    x:=256;y:=174;
    if(FindColorspiralTolerance(x, y, CoalColour, 0, 0, 515, 337, 2))then
    begin
    Result := True;
    Writeln('Fount Some Coal');
    wait(1000+random(500));
    end else
    Writeln('Were Is That Coal?');
    wait(1000+random(500));
    end;


    Function MoveMouseToIron: Boolean;
    begin
    Repeat
    if aorb=('b')then
    Exit;
    if(FindIron) Then//there is no procedure for find rock,FindIron or FindCoal
    begin
    Result := True;
    MMouse(x, y, 2, 2);
    Wait(50+random(100));
    Mouse(x, y, 2, 2,true); //this clicks rock without needing second function
    end;
    until (InvFull)
    end;

    Function MoveMouseToCoal: Boolean;
    begin

    Repeat
    if aorb=('a')then
    Exit;
    if (FindCoal) then
    begin
    Result := True;
    MMouse(x, y, 2, 2);
    Wait(50+random(100));
    Mouse(x, y , 2, 2,true);
    end;
    until (InvFull)
    end;

    {procedure ClickIron; ////// /
    begin                         /
                                   /
    if (MoveMouseToIron = true) then/
    begin                            /
    aorb=('a');                       /
    Mouse(x, y, 2, 2, True)            /
    Wait(3500+random(100));             /
    end;                                 /
    end;                                  /
                                           /
    procedure ClickCoal;                    /
    begin                                    /
                                              /
    if (MoveMouseToCoal = true) then           /
    begin                                       /
    aorb=('b');                                  /
    Mouse(x, y, 2, 2, True)                       /
    Wait(3500+random(100));                        /DONT need all this because
    end;                                       /we made it clicks mouse above
    end;}


    Procedure Dropores;
    begin
    DropTo(2,28);
    Loads:=Loads+1;
    end;

    begin
    setupsrl;
    repeat
    FindCoal;
    FindIron;
    Dropores;
    Proggy; //put it here because it clears debug every time it writes new one
    until(False)
    end.
    If you are going to use this script, I would like some credits for helping you do this
    Nice Job though, you just still need to learn about main loops and things like that. you don't need/can't have 2 main loops like you were trying to do. look this script over and look at why/how i changed things. you'll get it.

  3. #3
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what are scar tags?
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. auto miner
    By Waddo in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 04-16-2008, 07:29 AM
  2. need a good script , auto miner auto banker plz!!
    By samuel in forum RS3 Outdated / Broken Scripts
    Replies: 27
    Last Post: 11-19-2007, 08:46 AM
  3. help with auto ess miner
    By emoyasha in forum OSR Help
    Replies: 7
    Last Post: 10-12-2007, 01:55 PM
  4. Auto Miner
    By Doctor in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 09-02-2007, 01:05 AM
  5. Auto Miner
    By Doctor in forum RS3 Outdated / Broken Scripts
    Replies: 0
    Last Post: 09-01-2007, 03:14 AM

Posting Permissions

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