Results 1 to 3 of 3

Thread: A quick question...

  1. #1
    Join Date
    Aug 2006
    Location
    London
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    A quick question...

    Hi everyone,

    I'm trying to make a powerminer (for practice), here's what I have so far:
    SCAR Code:
    program LeetPowerMiner;
    {.include srl/srl.scar}

    const

     RockColour        = 4615834;       //The rock colour
     IsPickaxeEquipped = False; //If the pickaxe is equipped then True.

    var
     RockX : Integer;
     RockY : Integer;

    procedure FindAndMineRock;
    begin
     if(findcolorspiral(RockX, RockY, RockColour, 276, 172, 516, 338))then
      begin
      MMouse(RockX, RockY, random(10)+5, random(10)+5);
      wait(random(100)+500);
      if(IsUpText('Mine'))then
       begin
       Mouse(RockX, RockY, 1, 1, True);
       end
       repeat
       cleardebug;
       writeln('Waiting for ore to go...')
       until(findcolor(RockX, RockY, 4539722, 1, 1, 516, 339));
      end
    end;

    begin
     ClearDebug;
     SetupSRL;
     wait(3000);
     FindAndMineRock;
     wait(1000);
     FindAndMineRock;
    end.

    As a quick test I made it do the 'FindAndMineRock' Procedure twice... But it'll only do it once...

    I'm pretty sure it's because the variables RockX and RockY stay the same... If anyone could tell me how to fix this (or how to clear the variables) I'd really appreciate any help

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    for clearing variable.. do you mean?

    RockX:= 0;

    :S

    And.. Just use Coords for bigger than that :P

    ( it will do it only once because it still finds that your last color when it begins your Mining proc again)

  3. #3
    Join Date
    Sep 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's looking twice, I think, but not finding it the second time. You want to use tolerances on that FindColorSpiral and maybe IsUpText. FindObj would be great, if you got it to work, which I can't.


    Wow. I've been away quite a while. Real life, yea, way unpredictable. Sorry, y'all, if I've caused any inconvenience.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Just a quick question? Did I say quick?
    By SeanJohn in forum OSR Help
    Replies: 3
    Last Post: 01-28-2009, 12:03 AM
  2. Quick question
    By GinFoxface in forum OSR Help
    Replies: 2
    Last Post: 04-07-2007, 04:25 AM
  3. Quick Question
    By mage of begu in forum OSR Help
    Replies: 10
    Last Post: 01-12-2007, 10:48 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
  •