Results 1 to 2 of 2

Thread: I can only get my script to mine 1 rock....

  1. #1
    Join Date
    Jul 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I can only get my script to mine 1 rock....

    Even after i have already mined the ore from the rock it continues to try to mine from that one rock, not trying to go to another any ideas?

    SCAR Code:
    program MinerAttempt;
    {.include SRL/SRL/Misc/Smart.Scar}
    {.include SRL\SRL.scar}

    var
    x, y: Integer;
    Clicks: Integer;
    Loads: Integer;
    Failed: Integer;

    const
    SmartWorld = 144;//What world to load smart in
    Signed = False;  //False = signed
                     //True = unsigned
    RockColor1 = 3097926; //Add rock colors here
    RockColor2 = 2768446;
    RockColor3 = 3295561;
    RockColor4 = 2175025;

    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name := 'username'; //UserName
      Players[0].Pass := 'password'; //Password
      Players[0].Nick := 'nickname'; //Nickname
      Players[0].Active := True; //Active

      Cleardebug;
      Writeln('You are using '+IntToStr(HowManyPlayers)+' Players');
    end;

    procedure SetUpSmart;
    begin
      Status('Setting up SMART!');
      Disguise('Setting up SMART!');
      smartSetupex(SmartWorld, True, Signed, False);
      wait(1000);
      SetTargetDC(SmartGetDC);
    end;

    procedure DoAntiRandoms;
    begin
     FindTalk;
     FindNormalRandoms;
     if (FindFight = true) then
      begin
         RunAway('W', true, 1, (Random(2000) + 8000));
      end;
    end;

    procedure AntiBan;
    var OriginalDegrees: integer;
    begin
        case random(6) of
            0: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   RandomMovement;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
            1: begin
                   Players[CurrentPlayer].Integers[12]:= XpTillNextLevel('mining');
                   Players[CurrentPlayer].Integers[2] := GetSkillInfo('mining',false);
                   Players[CurrentPlayer].Integers[3] := (GetXP('mining') - Players[CurrentPlayer].Integers[1]);
               end;
            2: PickUpMouse;
            3: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   BoredHuman;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
            4: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   RandomMovement;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
            5: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   BoredHuman;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
        end;
    end;


    procedure ProgressReport;
    begin
    ClearDebug;
        Writeln('[]==========================================[]');
        Writeln('---------------->Minded Ore<----------------');
        Writeln('  Did ' + IntToStr(Loads) + ' Loads' + '    ');
        Writeln('--------------------------------------------');
        Writeln('  Did ' + IntToStr(Clicks) + ' Clicks' + '  ');
        Writeln('[]==========================================[]');
    end;

    procedure FindRock;
    begin
       If (not LoggedIn) then exit;
          if (not (FindObjCustom(x, y, ['ocks', 'ine'], [RockColor1, RockColor2, RockColor3, RockColor4], 2))) then
             Wait(100+random(100));
             Failed := Failed + 1;
             Writeln('Failed to mine' + IntToStr(Failed) + 'times, Logoff at 20 failurs');
             if(Failed = 20)then
          begin
            Writeln('Failed to find Rocks, Logging out');
            Logout;
            Exit;
          end else

          begin
               if (FindObjCustom(x, y, ['ocks', 'ine'], [RockColor1, RockColor2, RockColor3, RockColor4], 2)) then
               repeat
                     wait(100+random(50));
                     Mouse(x, y, 2, 2, true);
                     DoAntiRandoms;
                     AntiBan;
               until(invcount = 28);
          end;
    end;

    Procedure DropOre;
    begin
        if FindObjCustom(x, y, ['Ore'], [RockColor1, RockColor2, RockColor3, RockColor4], 2) then
        DropAll;
    end;

    begin
    SetupSRL;
    SetupSmart;
    ActivateClient;
    wait(1000);
    DeclarePlayers;
    loginplayer;
    wait(1000+random(700));
    SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
    wait(1500+random(500));
    setrun(true);
    MakeCompass('N');
    wait(1500+random(500));
    repeat
    FindRock;
    DropOre;
    AntiBan;
    DoAntiRandoms;
    ProgressReport;
    until(false);
    end.

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, California
    Posts
    276
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tell me if this works.
    If it doesn't, add me on MSN and I can help you much more.
    My MSN is: whiteboysherman@hotmail.com
    SCAR Code:
    program MinerAttempt;
    {.include SRL/SRL/Misc/Smart.Scar}
    {.include SRL\SRL.scar}

    var
    x, y: Integer;
    Clicks: Integer;
    Loads: Integer;
    Failed: Integer;

    const
    SmartWorld = 144;//What world to load smart in
    Signed = False;  //False = signed
                     //True = unsigned
    RockColor1 = 3097926; //Add rock colors here
    RockColor2 = 2768446;
    RockColor3 = 3295561;
    RockColor4 = 2175025;

    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name := 'username'; //UserName
      Players[0].Pass := 'password'; //Password
      Players[0].Nick := 'nickname'; //Nickname
      Players[0].Active := True; //Active

      Cleardebug;
      Writeln('You are using '+IntToStr(HowManyPlayers)+' Players');
    end;

    procedure SetUpSmart;
    begin
      Status('Setting up SMART!');
      Disguise('Setting up SMART!');
      smartSetupex(SmartWorld, True, Signed, False);
      wait(1000);
      SetTargetDC(SmartGetDC);
    end;

    procedure DoAntiRandoms;
    begin
     FindTalk;
     FindNormalRandoms;
     if (FindFight = true) then
      begin
         RunAway('W', true, 1, (Random(2000) + 8000));
      end;
    end;

    procedure AntiBan;
    var OriginalDegrees: integer;
    begin
        case random(6) of
            0: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   RandomMovement;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
            1: begin
                   Players[CurrentPlayer].Integers[12]:= XpTillNextLevel('mining');
                   Players[CurrentPlayer].Integers[2] := GetSkillInfo('mining',false);
                   Players[CurrentPlayer].Integers[3] := (GetXP('mining') - Players[CurrentPlayer].Integers[1]);
               end;
            2: PickUpMouse;
            3: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   BoredHuman;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
            4: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   RandomMovement;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
            5: begin
                   OriginalDegrees := Round(rs_GetCompassAngleDegrees);
                   BoredHuman;
                   MakeCompass(IntToStr(OriginalDegrees));
                   SetAngle(true);
               end;
        end;
    end;


    procedure ProgressReport;
    begin
    ClearDebug;
        Writeln('[]==========================================[]');
        Writeln('---------------->Minded Ore<----------------');
        Writeln('  Did ' + IntToStr(Loads) + ' Loads' + '    ');
        Writeln('--------------------------------------------');
        Writeln('  Did ' + IntToStr(Clicks) + ' Clicks' + '  ');
        Writeln('[]==========================================[]');
    end;

    procedure FindRock;
    begin
      Repeat
        If (not LoggedIn) then exit;
        if (not (FindObjCustom(x, y, ['ocks', 'ine'], [RockColor1, RockColor2, RockColor3, RockColor4], 2))) then
        begin
          Wait(100+random(100));
          Failed := Failed + 1;
          Writeln('Failed to mine' + IntToStr(Failed) + 'times, Logoff at 20 failurs');
          if(Failed = 20)then
            begin
              Writeln('Failed to find Rocks, Logging out');
              Logout;
              Exit;
            end;
        end else
        begin
          if (FindObjCustom(x, y, ['ocks', 'ine'], [RockColor1, RockColor2, RockColor3, RockColor4], 2)) then
          begin
            wait(100+random(50));
            Mouse(x, y, 2, 2, true);
            DoAntiRandoms;
            AntiBan;
          end;
        end;
      Until InvFull;
    end;

    Procedure DropOre;
    begin
        if FindObjCustom(x, y, ['Ore'], [RockColor1, RockColor2, RockColor3, RockColor4], 2) then
        DropAll;
    end;

    begin
    SetupSRL;
    SetupSmart;
    ActivateClient;
    wait(1000);
    DeclarePlayers;
    loginplayer;
    wait(1000+random(700));
    SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
    wait(1500+random(500));
    setrun(true);
    MakeCompass('N');
    wait(1500+random(500));
    repeat
    FindRock;
    DropOre;
    AntiBan;
    DoAntiRandoms;
    ProgressReport;
    until(false);
    end.
    Current Project: All In 1 Falador Script - 20% DONE

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding Minimap mine rock color...
    By Drakan in forum OSR Help
    Replies: 16
    Last Post: 05-08-2008, 04:31 PM
  2. First Script of Mine
    By Dargon in forum First Scripts
    Replies: 6
    Last Post: 09-10-2007, 03:31 PM
  3. Can't mine a gas rock.
    By weibs in forum News and General
    Replies: 7
    Last Post: 10-25-2006, 09:43 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
  •