Results 1 to 7 of 7

Thread: TPAs & Tolerance

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default TPAs & Tolerance

    Hey, I'm asking a slightly confusing question so let me explain.

    When you search for colors using TPAs/ATPAs, you store them in arrays. Most of the time you use tolerance. That means a wide variety of colors can be found.

    How can you find the color that was found at TPA(i)?

  2. #2
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Or GetColors(tpa);

    but... if you don't call them directly after the TPA finding functions you may find that runescape has redrawn the screen and you'll be grabbing wrong pixels. I've run into this countless of times.

    Simba has a special feature to counter this. Two functions: Freeze & UnFreeze. See http://docs.villavu.com/simba/script...ow.html#freeze



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thank you, both of you.
    Quote Originally Posted by Wizzup? View Post
    Or GetColors(tpa);

    but... if you don't call them directly after the TPA finding functions you may find that runescape has redrawn the screen and you'll be grabbing wrong pixels. I've run into this countless of times.

    Simba has a special feature to counter this. Two functions: Freeze & UnFreeze. See http://docs.villavu.com/simba/script...ow.html#freeze
    Freeze seems really useful, but for my situation it's most likely not needed.

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    Thank you, both of you.

    Freeze seems really useful, but for my situation it's most likely not needed.
    Freeze is also VERY MUCH a speed boost for multiple searches over the same frame.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Freeze is also VERY MUCH a speed boost for multiple searches over the same frame.
    Yes, for things that don't move often, but Freeze wouldn't work too well with constantly moving chickens.

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    Yes, for things that don't move often, but Freeze wouldn't work too well with constantly moving chickens.
    I don't really want to hammer on using Freeze, but I just want to say that Freeze is really fast. Essentially, it takes less time than a single FindColor() over the entire client. So it really shouldn't add any overhead if you do:

    Simba Code:
    Freeze;
    FindColorsTolerance(...);
    tpatricks();
    GetColors(tpa);
    UnFreeze;



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

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
  •