Results 1 to 4 of 4

Thread: Can't find iron rocks

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

    Default Can't find iron rocks

    Hi guys here is the code that i put together:
    Simba Code:
    function 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 can't get it to find only iron ore, can someone tell me how to improve this or another method i can use instead.

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

  3. #3
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    In AutoColourAid, pick the dark maroon colours of the iron ore. Logout, refresh the page, login and do the same. Repeat this process for about 5 times to get an accurate ore colour. Then set your CTS to 2 and get ACA to print that function for you. Use that.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  4. #4
    Join Date
    May 2012
    Location
    Chaaaaiir
    Posts
    376
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Use TPA's and as previously mentioned.. CTS2. ACA works well, basically does it for you.

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
  •