Results 1 to 9 of 9

Thread: ATPA/TPA or FindColor Functions

  1. #1
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default ATPA/TPA or FindColor Functions

    Ahhh, I accidentally forgot to finish the Title of the Thread >.> sorry.
    ATPA/TPA or FindColor Functions

    I have been learning TPA's only for today. I even made my own Chop n Drop and Mine n Drop scripts. Tpa's are easy once you practice them in different ways.

    Im amazed at the power that a TPointArray can do. It makes things so much easier, but, things do get a bit unorganized if not done correctly. It also (for me) takes up much much more focus then other ways. Points can be used in countless ways, but, i do have a question.

    Even though TPA's are so flexible and can be used to your advantage, do you think its sometimes just simpler to use Functions like FindColorSpiralTolerance then to make an array of points? Just a general question :P Im just a curious boy.

    What do you guys usually do?
    Last edited by Heavenguard; 12-11-2009 at 01:47 AM.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    using FindColorsSpiralTolerance() allows you to get multiple points, thus if a certain point doesnt comply to the given uptext/other parameters then you have X Amount of other points to check. You can also split, sort, invert, interchange, etc all the points. Lots of flexibility

  3. #3
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yea, I do understand that thats actually what I used with mine, but, if I was to do a repeat .. until or For..to..do loop with a FindColorSpiralTolerance function, wouldn't it really do the same thing.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  4. #4
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Heavenguard View Post
    Yea, I do understand that thats actually what I used with mine, but, if I was to do a repeat .. until or For..to..do loop with a FindColorSpiralTolerance function, wouldn't it really do the same thing.
    Well, if you do a repeat until.. thing, it may find the same point A LOT. Thats what happened on my first SRL script.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  5. #5
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    Well, if you do a repeat until.. thing, it may find the same point A LOT. Thats what happened on my first SRL script.
    It will always find the same point if nothing changes on screen.

  6. #6
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah, but if you click on something the point would change. Most likely.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

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

    Default

    I actually ran into this situation today!
    TPAs and ATPAs are best for things that don't move (trees/rocks/NOT NPCs basically).
    When you store points on a TPA or ATPA they are 'kept in place'. This is great for things that don't move.

    But if you make a TPA ATPA of an NPC/something that movies the points are stored of where they are at the time of the creation of the TPA/ATPA, and by the time you start moving your mouse to them, they have probably moved. So your mouse will just spaz around moving to the places where they object was and be inaccurate.

    This happened to me today when I was making a skeleton fighter =D.
    Instead I ACAed the skeletons and did something like

    SCAR Code:
    For I:=0 to 10 Do
    X:=Random(MSCX)
    Y:=Random(MSCY)
    SetColorMods
    SetColerToleranceSpeed
    If FindColorSpiralTolerance(stuff) Then
    Mmouse(x,y,0,0)
    If IsUpText('sex') Then
    Mouse(x,y,0,0,True)
    Break;

    And that worked much better for things that movie. But if you are working with things that don't move, TPAs ATPAs are by far one of the best methods!

    Man Oh Man <3 You Heavenguard! You are my favorite!

  8. #8
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    I'm on today from 5GMT - 11GMT, so if you want to ask questions, you can

  9. #9
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks, Lol YoHoJo that explained a lot to me, It was all common sense, but now that you explained it It stuck to my head how TPointArrays would work, <3 u. Naum Thanks for being on to answer some of my questions, Your one of the masters of TPA's .

    Thanks everybody, TPA := My Best Friend for now On. Till in a couple of Months its AutoFighting Season, then FindColorSpiralTolerance will be something to look up to.

    Man Oh Man <3 You Heavenguard! You are my favorite!
    Really? Oh man i <3 u 2 dude!!!! I <3 everyone here to the bottom of my heart, you guys are my family.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

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
  •