Results 1 to 3 of 3

Thread: Need help, One line answer

  1. #1
    Join Date
    Jun 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Need help, One line answer

    Hey guys this is my first post in here, but I have been looking around a lot.
    I am working on learning to script, and I am using the minimap to find a color on it, and move my character, but instead of searching in the right areas I have listed my mouse cursor is just moved to the 0,0 coordinates on my computer. The error is in these lines
    procedure FindStall;
    var x, y: integer;
    begin
    FindColor(x, y, 2441027, 940, 135, 947, 141);
    MoveMouse(x, y);
    ClickMouse(x, y, 1)
    end;

    It moves like the x, y are set to 0,0 and then left clicks. Should take an experienced person 30s to answer =0

  2. #2
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by RsExploit View Post
    Hey guys this is my first post in here, but I have been looking around a lot.
    I am working on learning to script, and I am using the minimap to find a color on it, and move my character, but instead of searching in the right areas I have listed my mouse cursor is just moved to the 0,0 coordinates on my computer. The error is in these lines
    procedure FindStall;
    var x, y: integer;
    begin
    FindColor(x, y, 2441027, 940, 135, 947, 141);
    MoveMouse(x, y);
    ClickMouse(x, y, 1)
    end;

    It moves like the x, y are set to 0,0 and then left clicks. Should take an experienced person 30s to answer =0
    You should use an if...then...else statement.

    If it finds the colour...then move the mouse and click....else we didn't find the colour

    Simba Code:
    procedure FindStall;
      var x, y: integer;

    begin // these are the minimap coordinates built into SRL already. MM colours change so use a tolerance, in this case 10.
      if FindColorTolerance(x, y, 2441027, MMX1, MMY1, MMX2, MMY2, 10) then
      begin      //we need a begin and end because there is more than one statement after then
        MMouse(x, y, 2, 2); //MMouse is less detectable and the 2 px of randomness in each direction
        ClickMouse2(mouse_left); //ClickMouse2 is also less detectable
      end else
        WriteLn('We didnt find the colour on the MM');
    end;



    SjoeIsCool
    Last edited by The Mayor; 06-30-2013 at 11:04 AM.

  3. #3
    Join Date
    Jun 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I would use the minimap cordinates already built in, but on the minimap in the starting location there are
    actually about 10 different spots it could click with the exact same color...

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
  •