Results 1 to 15 of 15

Thread: Is DontClickColor('') possible?

  1. #1
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Is DontClickColor('') possible?

    Is it possible to write a command to not go to a certain color. Because i'm making a script and i'm using ifisuptext and 3 diffrent colors to choose with only 20 tol. But when i'm testing it always goes to my lenderhosen hat, it doesnt click it because theres no aple tree but it still moves the mouse there.. is there anyway to make it so it doesn't move the mouse to it? (without using less tol.)

    annnd another question (don't want to make a whole new thread.): It always clicks the top of the tree.. never the middle or anything and i think this would be detectable if it always clicks the very tip of the tree?





  2. #2
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Umm, FindColorSkipPointsArray? or FindColorSkipBoxArray might be useful here.
    like if it finds the colors and moves the mouse and there isnt an uptext to make a box around that point so that it doesnt search for the colour in there
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  3. #3
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay that would work.. um i'm really bad at scar so i would just use FindColorSkipBoxArray in the middle of isuptext and mouse?





  4. #4
    Join Date
    May 2007
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    eerm, what would be a really hard proc to create
    Originally Posted by YoHoJo
    I like hentai.

  5. #5
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function FindTree: Boolean; //Not sure what im lookin for
    var
      Skip: TBoxArray;
    begin
      repeat
        if FindColorSkipBoxArray(X, Y, OtherStuff Here I forgot Sorry, Skip) then
        begin
          MMouse(X, Y, 1, 1);
          Wait(500 + Random(250)); //Change wait if you want
          if IsUpText('TextToSearchFor') then
          begin
            Result := True; //Add Mouse or w\e you want in here
          end else
          begin
            SetArrayLength(Skip, GetArrayLength(Skip) + 1);
            Skip[GetArrayLength(Skip) - 1] := IntToBox(X - 25, Y - 25, X + 25, Y + 25); //Makes a 50x50 box around the X, Y Coordinates
          end;
        end;
      until(Result);
    end;

    You could even put the tolerance up or change the compass angle if it didnt find the uptext
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  6. #6
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    okay ill test.. and the other stuff here is that MSX1, MSY1, MSX2, MSY2..?

    and another new question if someone wants to help





  7. #7
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    MMouse(X, Y + Random(50), 1, 1);
    That would move further down the screen and it has a random =]
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  8. #8
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    okay i fixed that problem and i tried using the thing you posted but i'm getting so many errors.. is there any easier way?





  9. #9
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;

    {.include SRL\SRL.scar}

    const
      Colour  = 0;
      NUpText = 'Hi';

    function FindTree: Boolean; //Not sure what im lookin for
    var
      Skip: TBoxArray;
    begin
      repeat
        if FindColorSkipBoxArray(X, Y, Colour, MSX1, MSY1, MSX2, MSY2, Skip) then
        begin
          MMouse(X, Y + Random(50), 1, 1); //Moves mouse lower then it would
          Wait(500 + Random(250)); //Change wait if you want
          if IsUpText(NUpText) then
          begin
            Result := True; //Add Mouse or w\e you want in here
          end else
          begin
            SetArrayLength(Skip, GetArrayLength(Skip) + 1);
            Skip[GetArrayLength(Skip) - 1] := IntToBox(X - 25, Y - 25, X + 25, Y + 25); //Makes a 50x50 box around the X, Y Coordinates
          end;
        end;
      until(Result);
    end;

    begin
    SetUpSRL;
    FindTree;
    end.

    That works, I don't understand what you just asked sorry, Why not just not wear a lederhosen xD?
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  10. #10
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well my problem is that instead of clicking maple it clicks lederhosen hat(almost same color.) and i would probably have future problems like instead of clicking willow clicks ground ect.. anyway tryin it now and do i replace that with my whole script? or just part.. the script isnt very big

    edit: sorry for noobiness i just suck at scar ..





  11. #11
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, Don't worry, We weren't born scripters, we all started somehow,

    You could pm me your script or post it here or add me on msn if you like
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  12. #12
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You could try using FindObj instead of FindColorTolerance. It includes the IsUpText function and moves the mouse around the script until it finds the object. FindColorTolerance only moves to the closest coordinate and stays there. I think that's what your problem is.

  13. #13
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    1st question: Don't wear a lederhosen hat.. Much easier, and 20 tol is kinda alot.. I suggest starting with lower tol and making the script increase the tol if tree isn't found.

    2nd question: Pick colors from other spots too and try if that helps.

  14. #14
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    1st question: Don't wear a lederhosen hat.. Much easier, and 20 tol is kinda alot.. I suggest starting with lower tol and making the script increase the tol if tree isn't found.
    Lol, yeah just simply dont wear the lederhosen

  15. #15
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kevin helped me very much





Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •