Results 1 to 6 of 6

Thread: how do i make simba click a color ?

  1. #1
    Join Date
    Dec 2011
    Posts
    571
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default how do i make simba click a color ?

    see im tryng to make a better alcher and i want to know how to make it click randomly the color =)
    i dont want it to click same spot becouse that easy ban
    created my mr[s]

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Simba Code:
    If FindColorTolerance(x,y,blabla) then
      Mouse(x,y,5,5,true); //where 5,5 is the random offset for x and y coordinates respectively.
    I suggest u head to the beginners' tutorial section and read up more first.

  3. #3
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'd suggest using a dtm to find the high alch button, then using mouse with randomness once you find it. Look for yohojos dtm tut, it's really easy to learn and follow!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  4. #4
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    function FindColorTolerance(var x, y: Integer; col, x1, y1, x2, y2, tol: Integer): Boolean;

    FindColorTolerance returns true if a colour within the given tolerance range tol of the given colour col is found in the box defined by x1, y1, x2, y2. Only the first point is returned in x and y. It searches from the top left to the bottom right and will stop after matching a point.

    Simba Code:
    If FindColorTolerance(x, y, Color here, MIX1, MIY1, MIX2, MIY2, tolerance) then
      Mouse(x, y, 2, 2, true);

    This would left click the first alch color found in the inventory box. Use simba's color picking tool to choose the color, set the tolerance to 6-12.

    of course you would have to learn to define variables.

    You do that like this at the beginning of the script, after you include SRL.

    Simba Code:
    program ScriptName;
    {$i SRL\SRL.simba}

    var
      x, y: Integer;

    This means that you can use x and y to store any number, which in this case you are storing the x+y coordinates of the color found.
    Last edited by Nebula; 08-10-2012 at 02:34 PM.

  5. #5
    Join Date
    Dec 2011
    Posts
    571
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    program alchpro;
    {$i SRL\SRL.simba}

    var
    x, y: Integer;
    begin
    If FindColorTolerance(x, y, 900849, MIX1, MIY1, MIX2, MIY2,6) then
    Mouse(791,393, 2, 2, true);
    end.
    when i press plzy it moves the mouse very slowly what did i do wrong?
    created my mr[s]

  6. #6
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Put setupSRL after your begin, before everything else.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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
  •