Results 1 to 8 of 8

Thread: [Project RS06] Simple Power Miner v0.1

  1. #1
    Join Date
    Apr 2008
    Posts
    88
    Mentioned
    2 Post(s)
    Quoted
    24 Post(s)

    Default [Project RS06] Simple Power Miner v0.1

    Breaking down from my current project I'm working on "East Varrock Miner and Banker" I coded a Power Miner.

    Simply it mines the ore you choose, drops when its a full inventory and repeats. If the bot is being attacked, it runs away.

    I find this script a little more risky than anything though, because it makes it pretty obvious you're botting when the bot just drops the ore and keeps mining. This is just to skill up mining.

    Simba Code:
    program SimplePowerMiner;
    {$I SRL/SRL.Simba}
    {$I P06Include/P06Include.Simba}

    //        **Simple Power Miner 0.1**
    //          By Sneakdella
    //      Mines, Drops and repeats
    //
    //
    // Version 0.1 contains - Mining the rock
    //                        dropping the inventory except slot one
    //                        choosing the rock you want to mine
    //                        Runs Away When Attackted

    // ********* SETUP ***********
    const
    ROCK_COLOR = 1910335 ; // Set the rock color with the color picker and enter it.

    var
    X, Y: Integer; // Don't touch this

    Procedure P06_DeclarePlayer;
    Begin
      P06_PlayerName:='username';
      P06_PlayerPass:='password';
    End;
    // ********* END OF SETUP ******
    // DON'T TOUCH ANY OF THE BELOW AND MINE AWAY MY FRIENDS!

    procedure MineOre;
    begin
    if P06_InvEmpty then;
      begin repeat
        if findcolortolerance(X,Y,ROCK_COLOR,0,0,515,338,5) then
          begin
               MMouse(X,Y,5,5);
               If (P06_IsUpTextMultiCustom(['Mine Rock','ine Rock', 'ne rock'])) Then
               ClickMouse2(mouse_left);
               wait(7000 +random(200));
          end;
            until (P06_InvFull);
          end;
       end;
    Procedure DropOre;
    begin
      P06_DropAllExcept([0]);
    end;
    procedure AntiRandom;
    begin
      if findcolortolerance(X,Y,65280, 245, 130, 285, 195,5) then
      begin
        writeln('Attacker detected.');
        mouse(675,125,3,3,true);
        wait(12000+random(5000));
        mouse(617,8,3,3,true);
        writeln('Ran away from attacker.');
      end;
    end;

    begin
      P06_DeclarePlayer;
      SetupP06Include;
      ActivateClient;
      If (Not P06_LoggedIn) Then
        begin repeat
          P06_LogInPlayer;
        until P06_LoggedIn;
        end;
      repeat
        MineOre;
        DropOre;
      until false;
    end.

  2. #2
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Nice! How do you detect if you're in combat/being attacked? And is it efficient?

  3. #3
    Join Date
    Apr 2008
    Posts
    88
    Mentioned
    2 Post(s)
    Quoted
    24 Post(s)

    Default

    I was like half asleep last night when I wrote this, I think I had it detect the green bar that comes above your head. If you're in a crowded area this would be a problem but you'd want to be smart with this bot and have it somewhere not that populated anyways so It's not a big deal.

  4. #4
    Join Date
    Feb 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Aslong as you start it in the right spot and tweak the wait time right... This got me 10 levels but then I died. It had to of ran over an hour.

  5. #5
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Think you forgot to mention to users that you need P06 Include installed to run this

    Good job, I can see your learning fast

    Very minor thing, but you should not need to repeat the login procedure from the include, if you just call it once when not logged in, it should repeat it'self until you are logged in does not really matter tho, just something I noticed looking through

    Also are you searching the whole screen for the rocks? If you are this would work too and looks neater:

    Simba Code:
    If FindColorTolerance(X,Y,ROCK_COLOR,P06_MSX1,P06_MSY1,P06_MSX2,P06_MSY2,5) Then


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  6. #6
    Join Date
    Apr 2008
    Posts
    88
    Mentioned
    2 Post(s)
    Quoted
    24 Post(s)

    Default

    So the MSX1, MSY1 P06 Include functions allow the mouse to search around your character? I need to add that in, that would be way batter

    EDIT: Yes I'm learning fast > thank you for all your help. Especially just starting out. I learned during the blizzard here in New England a couple days ago so it was a perfect time to sit there and learn some programming rather than trying to go out in 2 feet of snow with my friends. I favor the warmth.

    Also built another script last night on the PTR. Did you see my Falador Coal Miner?
    Last edited by Sneakdella; 02-11-2013 at 05:24 PM.

  7. #7
    Join Date
    Feb 2013
    Posts
    74
    Mentioned
    1 Post(s)
    Quoted
    30 Post(s)

    Default

    Best power mining script so far, after changing the speed. One major bug that needs to be fixed though is that after the script drops all of the ore, the ore on the ground is the same color as the rocks. As a result the bot will hover over the dropped iron most of the time, and only click on one rock. Resulting in very slow, insufficient Xp.

  8. #8
    Join Date
    Apr 2008
    Posts
    88
    Mentioned
    2 Post(s)
    Quoted
    24 Post(s)

    Default

    Quote Originally Posted by voltag00 View Post
    Best power mining script so far, after changing the speed. One major bug that needs to be fixed though is that after the script drops all of the ore, the ore on the ground is the same color as the rocks. As a result the bot will hover over the dropped iron most of the time, and only click on one rock. Resulting in very slow, insufficient Xp.
    I will get on that asap. I havent had time this week so far to do anything.

    I promise <3

Thread Information

Users Browsing this Thread

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

Posting Permissions

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