Results 1 to 13 of 13

Thread: Need help with Color

  1. #1
    Join Date
    Dec 2006
    Location
    Florida
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with Color

    I need help with my mining script. No matter what i do it wont find the coal color.
    Code:
    Procedure MinetheCoal;
    var
    x,y:integer;
    begin
      Tries:=0;
      Mouse(262,185 ,1 ,1 ,true);
      repeat
        if not FindColortolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 10) then
        begin
          wait(100+random(400));
          Tries:= Tries + 1;
        end else break;
      until (Tries = 20)
      if Tries = 20 then
      begin
        Writeln('cant find ore')
        terminatescript;
      end;
      repeat
        if FindColorTolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 7) then
        begin
          wait(500+random(1000));
          Mouse(x, y, 4, 4,true);
          wait(8000+random(7000));
        end;
      until (InvFull);
    end;

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

    Default

    Try using this color: 2703167

  3. #3
    Join Date
    Dec 2006
    Location
    Florida
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no the color didnt work but now it says
    File access error
    SRL Compiled in 10 msec
    cant find ore
    Successfully executed

    I don't know what file access error means

  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  5. #5
    Join Date
    Dec 2006
    Location
    Florida
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i thought the break ended the repeat loop, and that still isn't the problem because i am getting the message "cant find more ore" which means the procedure keeps going until tries equals twenty, so it isnt finding the color at all regardless of the break.

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

    Default

    He has that shut..

  7. #7
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

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

    Default

    I took that color straight out of a script that i know works perfectly for coal..

  9. #9
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Wait is the color you're trying to find in a small space? Sometimes if you have RS at different angles the color can vary a bit. Try picking a color at the highest angle possible and make sure you run the script with that color with the highest angle

  10. #10
    Join Date
    Dec 2006
    Location
    Florida
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I dont know what does it means for it to be shut, but im doing it at the dwarven mines at the three coal ore in the back where the level 14 scorps is not the 32. I tried with over 10 colors i picked myself and the one posted here, I have tried it with signed and unsigned applets, and with low and high resolution. I don't know why it won't work.

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

    Default

    Quote Originally Posted by 13om13e12 View Post
    Code:
    Procedure MinetheCoal;
    var
    x,y:integer;
    begin
      Tries:=0;
      Mouse(262,185 ,1 ,1 ,true);
      repeat
        if not FindColortolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 10) then
        begin
          wait(100+random(400));
          Tries:= Tries + 1;
        end else break;
      until (Tries = 20)
      if Tries = 20 then
      begin
        Writeln('cant find ore')
        terminatescript;
      end;
      repeat
        if FindColorTolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 7) then
        begin
          wait(500+random(1000));
          Mouse(x, y, 4, 4,true);
          wait(8000+random(7000));
        end;
      until (InvFull);
    end;
    It's end else break;
    If it finds the color, it breaks which causes it to terminatescript;
    Oh and you need to set your Tries in your var section along with x and y.

    Try this:
    Code:
    Procedure MinetheCoal;
    var x, y, Tries : integer;
    
    begin
      Tries:=0;
      Mouse(262,185 ,1 ,1 ,true);
      repeat
    
        if FindColorTolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 7) then
        begin
          Tries := 0;
          wait(500+random(1000));
          Mouse(x, y, 4, 4,true);
          wait(8000+random(7000));
        end
      
        else if not FindColortolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 10) then
        begin
        repeat
          wait(100+random(400));
          Tries:= Tries + 1;
      until((Tries = 20) or (FindColortolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 10)));
      end;
      
      if(Tries = 20)then
      begin
        Writeln('cant find ore');
        terminatescript;
      end;
      
      until (InvFull);
    end;

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

    Default

    The break doesnt cause it to terminate the script though tenfold.. Break means break out of a loop. In this case, break out of that repeat loop that he has.

  13. #13
    Join Date
    Jun 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 13om13e12 View Post
    no the color didnt work but now it says
    File access error
    SRL Compiled in 10 msec
    cant find ore
    Successfully executed

    I don't know what file access error means

    First pick your own color of the rocks, then it cant find the color I guess or you're not around the rocks so it stops

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 07-31-2007, 07:23 PM
  2. Useing grass color as road color??????
    By ronny.m.p in forum OSR Help
    Replies: 7
    Last Post: 04-28-2007, 09:42 PM
  3. its not looking for a color.....
    By acevampire in forum OSR Help
    Replies: 7
    Last Post: 03-19-2007, 09:43 PM
  4. [COLOR="Red"]UPDATE![/COLOR] [2|14|07]
    By StK Squenc in forum RS has been updated.
    Replies: 4
    Last Post: 03-05-2007, 10: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
  •