Results 1 to 6 of 6

Thread: script doesn't keep searching for the color.

  1. #1
    Join Date
    Aug 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default script doesn't keep searching for the color.

    SCAR Code:
    program fish;
    var
       x: integer;
       y: integer;

    begin
    //This clicks the bait.
           MoveMouse(500, 600);
           wait(1000)
              ClickMouse(500, 600, False);
              writeln('bait did it')
              wait(2000)
    //This clicks the rod.
           MoveMouse(470, 600);
           wait(1000)
              ClickMouse(470, 600, False);
              writeln('rod did it')
    //searching for fish icon on top of head
                if(FindColorTolerance(x, y, 16513019, 0, 0, 0, 0, 4))then
                begin
                MoveMouse(475, 605);
                   wait(1000)
                   ClickMouse(475, 605, True);
                   writeln('script done')
                   end;
    end.

    Thats the script. It doesn't find the color. Sorry it doesn't meet the standards. This is not for Runescape. This is what happens when executed

    "bait did it
    rod did it
    Successfully executed"

    what am I doing wrong? What am I doing right?
    I think im going to have more questions later.
    Please if you feel there are better ways to script this please don't hesitate to correct. It is for a game called Metin2

    First it goes and clicks a button on screen
    then clicks another button
    then an icon appears at the top of the character's head when the fish is caught and Scar is supposed to go back and click the second button again.
    If you read the script I think its easier to understand.
    Thanks.

  2. #2
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hi,
    SCAR Code:
    if(FindColorTolerance(x, y, 16513019, 0, 0, 0, 0, 4)
    is searching within an area of nothing.. 0,0,0,0, have to be changed to represent the corordinates of the box in which you are searching for a colour, i.e. : 3,3,69,72 or watever.
    No Signature Assigned.

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    You dont want to use procedures such as
    MoveMouse
    and ClickMouse on runescape as they will get you banned fast.
    Try using srl procedures such as Mouse and MMouse instead, they are very humanlike and wont get you banned

  4. #4
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Also you mite wanna change the color finding into a loop to search for it few times (If it is something that moves)

    @ YoHoJo -
    Please if you feel there are better ways to script this please don't hesitate to correct. It is for a game called Metin2


    Althougth them SRL functs , you should still use them because the game proably has anti marco as well as runescape

  5. #5
    Join Date
    Aug 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Ok I put the coords in. Now how do I make it loop? Where do I put the repeat, and Until(false) thing. Thanks again

  6. #6
    Join Date
    Jan 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program fish;
    var
       x: integer;
       y: integer;
    i:integer;
    found : boolean;
     
    begin
    //This clicks the bait.
           MoveMouse(500, 600);
           wait(1000)
              ClickMouse(500, 600, False);
              writeln('bait did it')
              wait(2000)
    //This clicks the rod.
           MoveMouse(470, 600);
           wait(1000)
              ClickMouse(470, 600, False);
              writeln('rod did it')
    //searching for fish icon on top of head
                i:=0;
                repeat
                if(FindColorTolerance(x, y, 16513019, 0, 0, 0, 0, 4))then
                begin
                MoveMouse(475, 605);
                   wait(1000)
                   ClickMouse(475, 605, True);
                   writeln('script done');
                   found := true
                   end else i:=i+1;
                until (found) or (i>5);
    end.
    hope this helps, change the 5 in the repeat loop to any number u like depending on how many times u want it to loop. btw u think u need srl functions?- i mean u reckon the game yr playing will have anti-macro?

    edit:changed for loop to repeat otherwise it would click every time regardless of whether it had found the color the previous attempt. (sry bout standards)

    edit2: u mite want to change the end else slightly so that it actually does something in addition to exiting the loop, shud the script fail to find the colour.
    No Signature Assigned.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. need help with the color finding part of my script!
    By poolikemax in forum OSR Help
    Replies: 2
    Last Post: 02-07-2008, 09:28 AM
  2. need help with a color script
    By Blairmcl in forum OSR Help
    Replies: 3
    Last Post: 11-30-2007, 03:48 PM
  3. Searching for Auto Script Writing script
    By Flyboy in forum News and General
    Replies: 10
    Last Post: 11-24-2007, 11:19 PM
  4. Replies: 6
    Last Post: 03-22-2007, 12:30 AM

Posting Permissions

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