Results 1 to 7 of 7

Thread: script issues

  1. #1
    Join Date
    Jul 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default script issues

    my script should work but it doesn't so can someone help me (i fill in errors in script)
    SCAR Code:
    procedure walktofurnace;
    begin
    FindColor(x,y,brownrock,645,5,720,85);
    x:=x+10;
    y:=y-10;
    wait(1000);
    //right now its supposed to click on x y but it just goes to the rs boarder and starts to freak out
    //p.s.the color is already found
    mmouse(x,y,3,3);
    cmouse(x,y,3,3,true);
    wait(7000+random(500));
    x:=x+5;
    y:=y-20;
    mmouse(x,y,3,3);
    cmouse(x,y,3,3,true);
    wait(7000+random(500));
    end;
    "your always where you supposed to be"

  2. #2
    Join Date
    Feb 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It finds a color on the minimap for me, and clicks it, like it's susposed to.

    Dont take offence to this, but;
    Make sure you selected the right color, and make sure that the script is searching a spot that has the color in it.


    When I searched for a color that wasnt on the screen, it moved my mouse to the very top left of the screen, which sounds like the same problem you have.

    But when it found a color, it clicked it just like it was susposed to.


    I'd also reccomend making the FindColor into an IF. That way, if it does not find the color, then it will not click anything, and it wont go crazy.

    ex:
    anything bolded I added;

    procedure walktofurnace;
    begin
    IF(FindColor(x,y,brownrock,645,5,720,85))Then begin;
    --
    -- (incert rest of script)
    --
    --
    wait(7000+random(500));
    end;end;

  3. #3
    Join Date
    Mar 2006
    Location
    United States, -7:00 GMT
    Posts
    1,790
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    procedure WalkToFurnace;
    begin
      if(FindColor(x, y, BrownRock, 645, 5, 720, 85))then
      begin
        x := x + 10;
        y := y + 10;
        wait(1000);
        MMouse(x, y, 3, 3);
        Mouse(x, y, 1, 1, True);
        wait(7000+random(1000));
      end;
    end;

    And you COULD replace 645, 5, 720, 85 with MSX1, MSY1, MSX2, MSY2, those are the coordinates of the actual screen, not the minimap, text, or inventory though. Hope that solves it.

    hakuna matata ;)

  4. #4
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    FindColorTolerance
    FindMSColorTol
    FindObj

    There's just a short list of the large array of color finders.

    FindMSColorTol seems like what you need. It's just like FindColor except:

    It's already keyed in to only check the MainScreen.

    You can add a tolerance integer to the end of it.

    Edit:

    MMouse = Move the mouse.

    Mouse = Moves and clicks the mouse.

  5. #5
    Join Date
    Jul 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no the brown rock is on the mini map but the trees are the same color so i need to set a custom box

    as for the if statement good idea
    "your always where you supposed to be"

  6. #6
    Join Date
    Feb 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your going to have to set up the search box very carefully, so that it finds only your rock color, everytime. This will be hard, because the map tends to roatate sometimes by its self... I always ran into the same problem when I make Map Walking procedures that way.

    SRL might have other ways around it, but I'm new to SRL and dont know too much of it's contents.

    I'd suggest looking for another, seperate color on the minimap that you can click, instead of the rock. One that is not the same color as any thing else.

  7. #7
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Maybe search for the color, then when it's found, search a 10x10 box around it for another color that's near the rock
    Interested in C# and Electrical Engineering? This might interest you.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Im Having issues...
    By Goodpeople in forum OSR Help
    Replies: 10
    Last Post: 01-15-2009, 03:04 PM
  2. Hmm DTM issues
    By yorkshireknight in forum OSR Help
    Replies: 7
    Last Post: 03-02-2007, 02:11 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
  •