Results 1 to 8 of 8

Thread: FindObj help

  1. #1
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindObj help

    I'm trying to get a procedure for mining a rock to work however when it gets to finding the rock it only does it in the upper left hand corner of the screen.

    My procedure:
    SCAR Code:
    procedure MineRock;
    var x,y: Integer;
    begin
      Status('Mining Rock');
      repeat
      if(FindObj(x,y,'ine',RockColor,5))then
      begin
        Mouse(x,y,1,1,true);
      end;
      until(InventoryFull);
    end;

    Anything I should be doing differently?

  2. #2
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    285
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Maybe try:
    SCAR Code:
    if(FindObj(x,y,'ine',RockColor,5))then
      begin
        GetMousePos(x, y);
        Mouse(x,y,1,1,true);
      end;
    Huehuehuehuehue

  3. #3
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well it no longer moves the mouse back and forth in the upper left hand corner, but it just sits there now. Does that mean it cant find the color?

  4. #4
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    285
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Most likely yes, did you drag the crosshair?
    Huehuehuehuehue

  5. #5
    Join Date
    Jun 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, I did. It works now, I just added a couple more colors that it should check for and it worked rather well. Thanks for the help, and giving me the idea of adding more colors.

  6. #6
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Perhaps use FindObjOre, FindObj is broken i think in 3.7.
    Administrator's Warning:


  7. #7
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    or the rockcolor is wrong thats happened to me does it hover isuptext

  8. #8
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindObj Uses FindMSColor, which in SRL 3.7 is using edge points of the mini map O_o.

    Just update your SRL...

    http://forum.scar-scripts.com/news-a...r-updates.html

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. findobj problem
    By qcrist in forum OSR Help
    Replies: 14
    Last Post: 10-30-2007, 08:31 PM
  2. FindObj help
    By daddyproboot in forum OSR Help
    Replies: 6
    Last Post: 08-17-2007, 03:48 PM
  3. findobj?
    By omgh4x0rz in forum OSR Help
    Replies: 15
    Last Post: 02-10-2007, 12: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
  •