Results 1 to 7 of 7

Thread: Find color from center?

  1. #1
    Join Date
    Apr 2007
    Location
    Rimmington
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Question Find color from center?

    Hey all

    im looking for a way to search from the center off the screen outwards for a color and having no luck finding it =[

    any ideas guys?

    looking to find a color that is close to the player if not the looking further away in a square radius

    thanks
    Learning To Code - So Excuse the n00b questions!

  2. #2
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    findcolorspiraltolerance

    Oh Hai Dar

  3. #3
    Join Date
    Apr 2007
    Location
    Rimmington
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Question

    Simba Code:
    if(FindColorSpiralTolerance(X, Y, color, 270, 9, 450, 250, 10)) then

    at the moment but it still seams to click anywhere it wants
    Learning To Code - So Excuse the n00b questions!

  4. #4
    Join Date
    May 2008
    Location
    ;)
    Posts
    576
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by NoUserName View Post
    Simba Code:
    if(FindColorSpiralTolerance(X, Y, color, 270, 9, 450, 250, 10)) then

    at the moment but it still seams to click anywhere it wants
    You mean, not from the point closest to the center?

    Also, try findColorsSpiralTolerance. That lets you specify where to start searching from, though you'd need to store the results in a TPA, then click at TPA[0].x,TPA[0].y

    eg:

    Simba Code:
    findcolorsspiraltolerance(MSc1,MSc2,TPA,color,MSx1,MSy1,MSx2,MSy2,10);
    if length(TPA) > 0 then
    mouse(TPA[0].x,TPA[0].y,5,5,mouse_left);

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

    Default

    I believe doing

    Simba Code:
    X:=MSCX;
    Y:=MSCY;
    if(FindColorSpiralTolerance(X, Y, color, 270, 9, 450, 250, 10)) then
    Mouse(X, Y, 5, 5, True);

    will search from center outwards.
    Ahhh good memories, I remember doing that little 'trick' back in the good ol' days!
    Last edited by YoHoJo; 05-23-2012 at 10:13 AM.

  6. #6
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    I believe doing

    Simba Code:
    X:=MSCX;
    Y:=MCCY;
    if(FindColorSpiralTolerance(X, Y, color, 270, 9, 450, 250, 10)) then
    Mouse(X, Y, 5, 5, True);

    will search from center outwards.
    Ahhh good memories, I remember doing that little 'trick' back in the good ol' days!
    Minor corrections. Mainscreen center is MSCX, MSCY
    Current activity: Recovering from vacation
    - Nulla pars vitae vacare officio potest -
    SRL membership? Can I buy that?
    Scripts - AGS - SWF - WAR - EMS - W100S-EM
    If you need scripting help, you can pm me. Remember, if you need help you have to ask for it properly though

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

    Default

    Fixed em thanks, just quickly typed out that example .

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
  •