Results 1 to 3 of 3

Thread: Better method for finding rocks?

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default Better method for finding rocks?

    Hi guys, I've made an IronMiner that works fairly well. I made my own drop procedure, urn support the only problem I'm having is finding the Ore. I use the FindObject function in ACA but because the colour of the iron is basically identical to the rock in the walls it colours the whole patch in (yes i am using cts 2 :P)
    What do you guys recommend i use to find the rocks other than ACA? Also if you could, could you give me a link to the thread?

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    http://villavu.com/vb/showthread.php?t=85107

    It's a bit advanced and I don't feel like breaking it down as it's part of my includes for my members scripts but it works like this:

    Find the Colour of the rock itself. that's the brown part of the rock using ACA.
    Search the brown rock to Find the Colour of the Iron veins within the brown rock.

    That's it. So... Create a TPA of the brown rock, search it for the iron veins. Check Uptext. Mine Rock.
    Last edited by Brandon; 07-07-2012 at 07:47 AM.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    http://villavu.com/vb/showthread.php?t=85107

    It's a bit advanced and I don't feel like breaking it down as it's part of my includes for my members scripts but it works like this:

    Find the Colour of the rock itself. that's the brown part of the rock using ACA.
    Search the brown rock to Find the Colour of the Iron veins within the brown rock.

    That's it. So... Create a TPA of the brown rock, search it for the iron veins. Check Uptext. Mine Rock.
    This is basically what I've done here's the code:
    Simba Code:
    unction FindIron: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.05, 0.17);

      FindColorsSpiralTolerance(MMCX, MMCY, arP, 2175062, MMX1, MMY1, MMX2, MMY2, 10);
      if (Length(arp) = 0) then
      begin
        Writeln('Hmm..No rocks available pesky bots!');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 2.01) and (X <= 10.15) and (Y >= 1.67) and (Y <= 8.16) and (Z >= 0.86) and (Z <= 3.75) then
        begin
         Result := arC[i];
         Writeln('FindIron=' + IntToStr(arC[i]));
         Break;
            end;
          end;
        end;
    function MineOre: Boolean;
      var x, y, PlusOne, MineCount :integer;
        begin
          PlusOne:=InvCount+1;
          If FindObj(x, y, 'ron', FindIron, 1) or FindObj(x, y, 'ine', FindIron, 1) or FindObj(x, y, 'Ore', FindIron, 20) or WaitupText('ine ron', FindIron) then
          begin
            Mouse(x, y,3,3,true);
            WaitOption('Mine Iron',500+randomrange(300,500));
            writeln('Mining an Iron');
            end;

              repeat
                wait(4050+randomrange(1500,2000));
                until not IsUpText('ron') or (InvFull);

    case random(1) of
        1:   Mouse(X, Y, 5, 5, True);

        2:   begin
              Mouse(X, X, 5, 5, False);
              WaitOption('Mine Iron', 500+randomrange(300,500));


        end;
    end;


        repeat

        Marktime(MineCount);
        Antiban;
        Wait(200)
        If Invcount=Plusone then
        Writeln('We got some ore');
        Until(InvCount=PlusOne) or (TimeFromMark(MineCount) >5560)

        end;

    I'm using it in the falador mines and the color of the iron is the same as the walls. That's the problem its moving mouse all over the screen.

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
  •