Results 1 to 21 of 21

Thread: Clicking..

  1. #1
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Clicking..

    I need to know something little ..

    It has to do this:

    1) Click at a point on the MM
    2) If it didn't find the object it was looking for then
    3) It needs to click thesame symbol on the MM, but that symbol needs to be atleast, lets say, 10 pixels away (a second symbol)

    How would I do that?

    EDIT: I released my script here!!
    Srl simply rocks.

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    Procedure Main;
    If(not(findColorTolerance(x,y,color,434,234,424,234,10)))then
    main;
    If(FindColorTolerance(x,y,color,342,234,234,234,10))then
    Mouse(x,y,2,2,true)
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Mouse(x1,y1,0,0,true);
    if (not(FindTheShit)) then
    begin
      x1:=x1+10;// this moves the x coord 10 east
      y1:=y1+10;//this moves the y coord 10 south... adjust as necessary
      Mouse(x1,y1,0,0,true);
    end;

    Edit: you can also use the feature built into Mouse which will click a specified random number of pixels away. If you wanted to click 10 random pixels you can do. Mouse(x,y,10,10,true), but that won't be a minimum of 10. Just a random 0-10.

  4. #4
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    10 pixels away from what? if he doesn't find the color then he cant have 10 pixels away from any thing
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  5. #5
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I just found out that FFlag(10); also works, not?
    Srl simply rocks.

  6. #6
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    FFlag(10) will wait until you're 10 pixels away from the flag.
    Hup Holland Hup!

  7. #7
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by dan cardin View Post
    10 pixels away from what? if he doesn't find the color then he cant have 10 pixels away from any thing
    It moves 10 pixels from the last coord, which in this case would be where he clicked on the MM first. And that is what he wanted... right?

  8. #8
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How will I paste it into this code then?

    SCAR Code:
    if (FindSymbol(x, y, '')) then
            begin
              Wait(300 + Random(32));
              Mouse(x, y, 3, 3, True);
              Wait(3000 + Random(1000));
            end;

    There are 2 symbols .. I want it to go to the other symbol if it didn't find what it was looking for at this one ...
    Srl simply rocks.

  9. #9
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    SCAR Code:
    if (FindSymbol(x, y, '')) then
    begin //If it did find the symbol
      Wait(300 + Random(32));
      Mouse(x, y, 3, 3, True);
      Wait(3000 + Random(1000));
    end else //If it didn't find the first symbol, it will switch to this.
    if (FindSymbol(x, y, '')) then
    begin
      Wait(300 + Random(32));
      Mouse(x, y, 3, 3, True);
      Wait(3000 + Random(1000));
    end;
    Hup Holland Hup!

  10. #10
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by omgh4x0rz View Post
    SCAR Code:
    Mouse(x1,y1,0,0,true);
    if (not(FindTheShit)) then
    begin
      x1:=x1+10;// this moves the x coord 10 east /// Always + 10 = not nice :S
      y1:=y1+10;//this moves the y coord 10 south... adjust as necessary
      Mouse(x1,y1,0,0,true);
    end;

    Edit: you can also use the feature built into Mouse which will click a specified random number of pixels away. If you wanted to click 10 random pixels you can do. Mouse(x,y,10,10,true), but that won't be a minimum of 10. Just a random 0-10.
    I just wanna say that if u do that always it's too repeteative.

  11. #11
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @Nielsie, yea, but it are 2 tesame symbols.. What to do?

    Btw, gratz on SRL Developer cup
    Srl simply rocks.

  12. #12
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Use FindSymbolIn or FindSymbols. (SRL 3.7 needed)
    Hup Holland Hup!

  13. #13
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    Use FindSymbolIn or FindSymbols. (SRL 3.7 needed)
    Please tell me their is another way

    SRL 3.7 doesn't work correct with my script .. Can't I use another way? .. Please? ..
    Srl simply rocks.

  14. #14
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Any help?
    Srl simply rocks.

  15. #15
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Get the color of the symbol using GetSymbColor and then do FindColor with the coords of where you need it.
    Hup Holland Hup!

  16. #16
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I only can use the coords of the minimap, and that symbol can be anywhere of the minimap .. Isn't there a way to find thesame symbol, but not at thesame place? ..
    Srl simply rocks.

  17. #17
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Not sure what you mean..
    You mean that you want too look for the color, but not in a certain area?
    If it's that then I suggest you take a look at FindColorSkipBox.
    Hup Holland Hup!

  18. #18
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm, no, not really .. you don't understand..

    I have, lets say, two bank symbol in my minimap. Now when it doesn't find a bank at the first symbol, it needs to click on the other banksymbol to get a bank there.. You understand?
    Srl simply rocks.

  19. #19
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am almost doen with my script, this is one of the 2 errors I need to solve
    Srl simply rocks.

  20. #20
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    If you click on the first symbol and walk to it. You can still look for the other symbol by searching the whole MM for the color except the bit where you're standing. Or use RadialWalk with a full MM scan. That will scan from outside-in.

    SCAR Code:
    RadialWalk(SymbolColor, 0, 360, 70, 1, 1);
    Flag;
    //This will scan the MM in a circle outside-in. If it found the color, it will click on it =]
    Hup Holland Hup!

  21. #21
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think that will solve my problem Testing it now

    You allready are my hero,, What can i say more..
    Srl simply rocks.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with clicking?
    By Kyle Undefined in forum OSR Help
    Replies: 20
    Last Post: 11-12-2008, 07:17 AM
  2. clicking on an npc
    By patman16 in forum OSR Help
    Replies: 3
    Last Post: 07-29-2008, 03:19 PM
  3. Dmt clicking help
    By MetalancA in forum OSR Help
    Replies: 7
    Last Post: 06-11-2008, 04:06 AM
  4. Not Clicking :(
    By skilld u in forum OSR Help
    Replies: 23
    Last Post: 06-09-2008, 10:20 PM
  5. Clicking
    By axel23 in forum OSR Help
    Replies: 3
    Last Post: 04-17-2007, 06:58 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
  •