Results 1 to 4 of 4

Thread: Issue with Color Finding?

  1. #1
    Join Date
    Dec 2007
    Location
    Canada
    Posts
    187
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Issue with Color Finding?

    ** Problem Resolved **

    I want to start off by saying it has been awhile since I have been to SRL, but I am glad the community is still going strong.

    Anyways, I feel like getting back in to scripting and getting better at it, but I am having issues getting color finding procedures to work, mainly FindColorTolerance/ FindColor, I am attempting to write a simple powerminer to freshen my memory on scripting but it seems like Simba can't find colors on the RS client. here is a chunk of code I wrote up to drop iron

    Simba Code:
    program PowerMiner;
    //{$i srl/srl/misc/smart.scar}
    {$i srl/srl.scar}

    var
    x, y: integer;

    Procedure DIO;

    begin
      if not (FindColorTolerance(x, y, 1581111, MIX1, MIY1, MIX2, MIY2, 10)) then
      begin
        Writeln('Could not find ore');
        exit;
      end;
      repeat
      if(FindColorTolerance(x, y, 1581111, MIX1, MIY1, MIX2, MIY2, 10)) then
       begin
         Writeln('Found ore in inventory');
         Mouse(x, y, 8, 8, false);
         wait(500 + random(500));
         ChooseOption('rop');
         wait(1000 + random(1000));
       end;
      until not(FindColorTolerance(x, y, 1581111, MIX1, MIY1, MIX2, MIY2, 10));
    end;





    begin
      SetupSRL;
      ClearDebug;
      ActivateClient;
      DIO;
    end.

    I'm sure it is some obvious error I am making, I have tried searching for help but nothing was coming up, any help on this matter would be greatly appreciated.

    EDIT 1: @ Flight: I haven't tried DTM's etc for item finding, I was just trying to put together something simple, and I haven't tried having my variables local in the procedure, didn't think that would make a difference but I shall try it out <-- this didn't make a difference. Also if it's any help I'm running Simba on a windows 7 OS

    EDIT 2: @ euphemism: yea I dragged the cross-hair over top of RS in my browser (Google Chrome)

    EDIT 3: Figured out the issue, booted up smart and used that as my client, color finding seemed to work, not sure why it wasn't working on Google Chrome, anyways, thanks for the help guys, it's appreciated
    Last edited by insanomano; 10-29-2011 at 07:03 AM.
    I'm baaaack

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Have you tried DTM/Bitmaps for item-finding? Also, I wonder if it would make a difference if X/Y were defined locally within your procedure.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Did you make the RS client the target client?
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    I heard a post earlier about color alternating some between the RS client and SMART. But that would have to mean the difference is higher than your tolerance of 10. In any case, glad you figured it out.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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