SRL Archive - News and General

ATPA/TPA or FindColor Functions


Heavenguard

2009-12-10 20:43:54

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?

Blumblebee

2009-12-10 20:50:32

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 ;)

Heavenguard

2009-12-10 20:52:53

Yea, I do understand that :D 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.

noidea

2009-12-10 23:00:06

From: Heavenguard
Yea, I do understand that :D 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.

marpis

2009-12-11 00:38:28

From: noidea
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.

Sex

2009-12-11 02:10:26

Yeah, but if you click on something the point would change. Most likely.

YoHoJo

2009-12-11 02:25:47

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

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!

Naum

2009-12-11 03:01:26

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

Heavenguard

2009-12-11 16:56:09

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, :D <3 u. Naum Thanks for being on to answer some of my questions, Your one of the masters of TPA's :D.

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.