Results 1 to 3 of 3

Thread: Whats wrong with my color finding?

  1. #1
    Join Date
    Nov 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Whats wrong with my color finding?

    This is my script. It gives me an error on the first color finding line. Can someone tell me what's wrong with it?

    SCAR Code:
    program PowerRock;
                      {//_____________Zennext's PowerRock_______________//}
    const loads = 2;  {// How many loads you want script to do          //}
    const cord1 = 16; {// The first inventory slot to drop (Only change //}
                      {// if you have more items in you inventory that  //}
                      {// you dont want to drop) Slots are like this:   //}
                      {// 1  2  3  4                                    //}
                      {// 5  6  7  8                                    //}
                      {// 9  10 11 12 etc.                              //}
    const cord2 = 28; {// The second inventory slot to drop             //}
    const color = 3758716; {// The color of the rock you want to mine        //}
    const twait = 15; {// Wait time in seconds for mining a rock        //}
                      {// This should change depending on your Mining.  //}

    var
    i: integer;

    procedure RockMine; {// This mines ores untill the inventory is full //}
    begin
      repeat
        if(FindColorTolerance(x, y, color, 0, 0, 700, 500, 4))then
        begin
          Mouse(x, y, 0, 0, true);
          Wait(twait * 1000 - 200);
        end
        Wait(200);
      until(InvFull)
      i:= i + 1
    end;

    procedure Signature; {// Writes my signature :D //}
    begin
      ClearDebug;
      writeln('Z'); wait(100)
      writeln('Ze'); wait(100)
      writeln('Zen'); wait(100)
      writeln('Zenn'); wait(100)
      writeln('Zenne'); wait(100)
      writeln('Zennex'); wait(100)
      writeln('Zennext'); wait(100)
      writeln('Zennext'''); wait(100)
      writeln('Zennext''s'); wait(100)
      writeln('Zennext''s '); wait(100)
      writeln('Zennext''s P'); wait(100)
      writeln('Zennext''s Po'); wait(100)
      writeln('Zennext''s Pow'); wait(100)
      writeln('Zennext''s Powe'); wait(100)
      writeln('Zennext''s Power'); wait(100)
      writeln('Zennext''s PowerR'); wait(100)
      writeln('Zennext''s PowerRo'); wait(100)
      writeln('Zennext''s PowerRoc'); wait(100)
      writeln('Zennext''s PowerRock'); wait(1000)
      writeln(''); wait(100)
      writeln(''); wait(100)
    writeln('   ______  Script by Zennnext      _   ');
    writeln('  |___  /  [url]www.srl-forums.com[/url]     | |  ');
    writeln('     / / ___ _ __  _ __   _____  _| |_ ');
    writeln('    / / / _ \ ''_ \| ''_ \ / _ \ \/ / __|');
    writeln('   / /_|  __/ | | | | | |  __/>  <| |_ ');
    writeln('  /_____\___|_| |_|_| |_|\___/_/\_\\__|');
      wait(3000 + random(750));
    end;

    begin {// Main scripts //}
    Signature;
      repeat
      RockMine;
      DropTo(cord1, cord2)
      until( i: >= loads)
    end.

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program PowerRock;
    {.include SRL\SRL.scar}
                      {//_____________Zennext's PowerRock_______________//}
    const loads = 2;  {// How many loads you want script to do          //}
    const cord1 = 16; {// The first inventory slot to drop (Only change //}
                      {// if you have more items in you inventory that  //}
                      {// you dont want to drop) Slots are like this:   //}
                      {// 1  2  3  4                                    //}
                      {// 5  6  7  8                                    //}
                      {// 9  10 11 12 etc.                              //}
    const cord2 = 28; {// The second inventory slot to drop             //}
    const color = 3758716; {// The color of the rock you want to mine        //}
    const twait = 15; {// Wait time in seconds for mining a rock        //}
                      {// This should change depending on your Mining.  //}

    var
    x,y,i: integer;

    procedure RockMine; {// This mines ores untill the inventory is full //}
    begin
      repeat
        if(FindColorTolerance(x, y, color, 0, 0, 700, 500, 4))then
        begin
          Mouse(x, y, 0, 0, true);
          Wait(twait * 1000 - 200);
        end
        Wait(200);
      until(InvFull)
      i:= i + 1
    end;

    procedure Signature; {// Writes my signature :D //}
    begin
      ClearDebug;
      writeln('Z'); wait(100)
      writeln('Ze'); wait(100)
      writeln('Zen'); wait(100)
      writeln('Zenn'); wait(100)
      writeln('Zenne'); wait(100)
      writeln('Zennex'); wait(100)
      writeln('Zennext'); wait(100)
      writeln('Zennext'''); wait(100)
      writeln('Zennext''s'); wait(100)
      writeln('Zennext''s '); wait(100)
      writeln('Zennext''s P'); wait(100)
      writeln('Zennext''s Po'); wait(100)
      writeln('Zennext''s Pow'); wait(100)
      writeln('Zennext''s Powe'); wait(100)
      writeln('Zennext''s Power'); wait(100)
      writeln('Zennext''s PowerR'); wait(100)
      writeln('Zennext''s PowerRo'); wait(100)
      writeln('Zennext''s PowerRoc'); wait(100)
      writeln('Zennext''s PowerRock'); wait(1000)
      writeln(''); wait(100)
      writeln(''); wait(100)
    writeln('   ______  Script by Zennnext      _   ');
    writeln('  |___  /  <a href="http://www.srl-forums.com" target="_blank">www.srl-forums.com</a>     | |  ');
    writeln('     / / ___ _ __  _ __   _____  _| |_ ');
    writeln('    / / / _ \ ''_ \| ''_ \ / _ \ \/ / __|');
    writeln('   / /_|  __/ | | | | | |  __/>  <| |_ ');
    writeln('  /_____\___|_| |_|_| |_|\___/_/\_\\__|');
      wait(3000 + random(750));
    end;

    begin {// Main scripts //}
      SetupSRL;
      Signature;
      repeat
        RockMine;
        DropToPosition(cord1, cord2)
      until(i >= loads)
    end.

    Try that.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Nov 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, SO OBVIOUS! Can't believe I forgot that... THANK YOU!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Whats wrong?
    By essex_jay in forum OSR Help
    Replies: 5
    Last Post: 02-22-2008, 06:35 PM
  2. Replies: 8
    Last Post: 03-23-2007, 04:20 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
  •