Results 1 to 4 of 4

Thread: My power miner

  1. #1
    Join Date
    Dec 2007
    Posts
    108
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My power miner

    This is a power miner Im working on and it logs on then clicks on rock then logs out. Please someone fix

    Thanks

    SCAR Code:
    program powerminer;
    {.include SRL/SRL.scar}
    {.include SRL\SRL\Skill\Mining.scar}
     
    const
    rockcolor1= 9934755;//set the color of the rock
    rockcolor2= 8487307;//set color of rock (these aren't the real colors)
     
    var x,y,randomm: integer;
     
     
    Procedure DeclarePlayers; // this procedure is used to logg players in
    begin
         HowManyPlayers  :=1;               // Set Number of Players here.
         NumberOfPlayers(HowManyPlayers);   // Sets the Players Array Length;
         CurrentPlayer:=0;                // CurrentPlayer = Array Index
     
         Players[0].Name :='user';//USERNAME
         Players[0].Pass :='pass';//PASS
         Players[0].Nick :='ser';//3 LETTERS OF YOUR USERNAME NOT THE FIRST ONE
         Players[0].Active:=True;//PLAYER IN USE OR NOT
     
     
    end;
     
    Procedure Randoms;
    Begin
    FindTalk; //finds talkin randoms
    FindNormalRandoms; //finds normal randoms
    SolveChatRandom; //sloves chat randoms
    FindLamp('Woodcutting'); //solves lamp and then choses a skill to update
    SolvePinball; //solves pinball random
    DwarfItem; //dropes dawalf items
    If(FindFight)Then //runs away from fight
    Begin
    MakeCompass('N');
    RunTo('N', True);
    Wait(7000 +Random(3000));
    RunTo('S', True);
    End;
    End;
     
     
    procedure antiban;
    begin
     randomm := Random(4)
      case randomm of
     
     
      0:                begin
     
                        Wait(3591+(random(287)));
                        RandomRClick;
                        Wait(3591+(random(287)));
                        Randoms;
                       end;
     
      1:     begin
             Wait(3694+(random(791)));
             GameTab(random(13)+1);
             Randoms;
             Wait(3694+(random(791)));
             GameTab(4);
             end;
     
      2:                begin
                        Wait(3294+(random(873)));
                        Randoms;
                        HoverSkill('Woodcutting' ,false);
                        Wait(3294+(random(873)));
                        end;
     
      3:     begin
              Wait(3694+(random(791)));
              GameTab(random(13)+1);
              Randoms;
              Wait(3694+(random(791)));
              GameTab(4);
              end;
    end;
    end;
     
     
     
    Procedure minerock;
    begin
     
      if not LoggedIn then
      Exit;
     
        repeat
        if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2], 7) then
        begin
     
          MoveMouseSmoothEx(x,y,  20,40,45,25,20);
          FTWait(1);
          clickmouse(x,y,false);
          Wait(500+(random(150)));
     
            ChooseOption('ine')
            randoms
            antiban;
            writeln('found rock');
     
              end else
              writeln('couldnt find rock');
              randoms;
              antiban;
     
               until( InvFull )
                end;
     
                Procedure DropOres;
    var
      X, Y: Integer;
      I : Byte;
     
    begin
      if InvFull then
        for i := 2 to 28 do
          if ExistsItem(I) then
          begin
            MMouseItem(I);
            Wait(150 + random(170));
            if Pos('ore', RS_GetUpText) <> 0 then
            begin
              GetMousePos(X, Y);
              Mouse(X, Y, 0, 0, False);
              ChooseOption('rop');
              FTWait(1 + random(1));
            end;
          end;
    end;
     
    begin
    SetupSRL;
      DeclarePlayers;
        LoginPlayer;
          repeat
            minerock;
              dropores;
                until(false);
                 end.

  2. #2
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Fixed. It was something wrong with SolvePinball.. SolvePinball is only called during FindNormalRandoms, AFTER it figures out we are at the pinball random. Here's the fixed script, fixed standards also:
    SCAR Code:
    program PowerMiner;
    {.include SRL/SRL.scar}
    {.include SRL\SRL\Skill\Mining.scar}

    const
    RockColor1= 4813212;//set the color of the rock
    RockColor2= 4088198;//set color of rock (these aren't the real colors)

    var
      x, y, Randomm: Integer;


    procedure DeclarePlayers; // this procedure is used to logg players in
    begin
      HowManyPlayers  :=1;               // Set Number of Players here.
      NumberOfPlayers(HowManyPlayers);   // Sets the Players Array Length;
      CurrentPlayer:=0;                // CurrentPlayer = Array Index

      Players[0].Name :='user';//USERNAME
      Players[0].Pass :='pass';//PASS
      Players[0].Nick :='ser';//3 LETTERS OF YOUR USERNAME NOT THE FIRST ONE
      Players[0].Active:=True;//PLAYER IN USE OR NOT
    end;

    procedure Randoms;
    begin
      FindTalk; //finds talkin randoms
      FindNormalRandoms; //finds normal randoms
      SolveChatRandom; //sloves chat randoms
      FindLamp('Woodcutting'); //solves lamp and then choses a skill to update
      DwarfItem; //dropes dawalf items
      if (FindFight) then //runs away from fight
      begin
        MakeCompass('N');
        RunTo('N', True);
        Wait(7000 +Random(3000));
        RunTo('S', True);
      end;
    end;


    procedure antiban;
    begin
      randomm := Random(4)
      case randomm of
        0 : begin
              Wait(3591+(random(287)));
              RandomRClick;
              Wait(3591+(random(287)));
              Randoms;
            end;

        1 : begin
              Wait(3694+(random(791)));
              GameTab(random(13)+1);
              Randoms;
              Wait(3694+(random(791)));
              GameTab(4);
            end;

        2 : begin
              Wait(3294+(random(873)));
              Randoms;
              HoverSkill('Woodcutting' ,false);
              Wait(3294+(random(873)));
            end;

        3 : begin
              Wait(3694+(random(791)));
              GameTab(random(13)+1);
              Randoms;
              Wait(3694+(random(791)));
              GameTab(4);
            end;
      end;
    end;



    procedure minerock;
    begin
      if not LoggedIn then Exit;

      repeat
      if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2], 7) then
      begin
        MMouse(x, y, 2, 2); //Use MMouse instead.
        FTWait(1);
        GetMousePos(x, y);
        Mouse(x, y, 2, 2, False);
        Wait(500+(random(150)));
        ChooseOption('ine')
        randoms;
        antiban;
        writeln('found rock');

      end else
        writeln('couldnt find rock');
        randoms;
        antiban;

      until( InvFull )
    end;

    procedure DropOres;
    var
      X, Y: Integer;
      I : Byte;
    begin
      if InvFull then
        for i := 2 to 28 do
          if ExistsItem(I) then
          begin
            MMouseItem(I);
            Wait(150 + random(170));
            if Pos('ore', RS_GetUpText) <> 0 then
            begin
              GetMousePos(X, Y);
              Mouse(X, Y, 0, 0, False);
              ChooseOption('rop');
              FTWait(1 + random(1));
            end;
          end;
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      repeat
        minerock;
        dropores;
      until(false);
    end.

  3. #3
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You forgot to add a 4th case for randomm := Random(4) by the way.

  4. #4
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No he didnt tenfold. When Random(4) is called it selects a random number from 0 to 3. He did it correctly.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. power miner
    By loliker123 in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 08-28-2008, 09:12 PM
  2. Power Miner help
    By Harkonnen in forum OSR Help
    Replies: 6
    Last Post: 07-14-2008, 02:12 AM
  3. I need help with my power miner
    By dallas574 in forum OSR Help
    Replies: 3
    Last Post: 04-27-2008, 04:26 PM
  4. Power miner??????
    By dewituwont in forum OSR Help
    Replies: 4
    Last Post: 06-18-2007, 03:34 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
  •