SRL Archive - OSR Help

TPA's


Littellj

2012-03-22 18:18:08

What do you suggest using for the colors of TPA's, a single point on the object using the color picker tool in Simba? Or using ACA to generate a color perhaps using the CTS0? Also TPA made easy… –> http://villavu.com/forum/showthread.php?t=33111

Brandon

2012-03-22 18:24:50

What? Are you trying to get the colours of every point in your TPA? If so then use GetColors(TPA: TPointArray): TIntegerArray;

It'll return you an array holding the colours for each point in your TPA.


EDIT: Use ACA.. I just re-read your question.. mis-read at first.

Tip.. you can open the .ACA file in notepad and view all the colours it has for the points you picked.

Littellj

2012-03-22 21:13:47

From: ggzz


EDIT: Use ACA.. I just re-read your question.. mis-read at first.

Tip.. you can open the .ACA file in notepad and view all the colours it has for the points you picked.


:p thanks, so what type of CTS should i use? or should i use the colors that pop up on the side when i start picking points?


Edit: Just looked at someones script, and they used CTS2 then just put that color into the FindColorsTolerance <– think thats name. Would you say this is the best way?

Brandon

2012-03-22 21:27:34

CTS 2 is more accurate than CTS 1 in SOME cases.. of course not all.. what I'm mostly interested in when I use ACA is the colours on the side.. from there u either use your own function with those colours.. OR you use the generic or a modified version of the ACA functions.

Littellj

2012-03-22 21:40:47

Edit: How does the TPA figure the X,Y coordinate? So far i know that it finds all the colors within the tolerance and prioritize's them from say 0 –> high. Does it just start at 0 and move the mouse to that and check uptext and if no uptext/wrong it moves to another match until it finds the right one or runs out of points?

This is the code im looking at btw.


program TPATutorial;
{.include SRL/SRL.scar}

var
MyTPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;

begin
x := MSCx;
y := MSCy;
FindColorsSpiralTolerance(x, y, MyTPA, 2961456, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then FindColorsSpiralTolerance(x, y, MyTPA, 8160390, MSX1, MSY1, MSX2, MSY2, 10);
for i := 0 to High(MyTPA) do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
if (IsUpTextMultiCustom(['tair', 'case'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('limb');
Wait(500+random(250));
Exit;
end;
Wait(350+random(350));
end;
end.


x[Warrior]x3500

2012-03-22 22:00:19

From: Littellj
Edit: How does the TPA figure the X,Y coordinate? So far i know that it finds all the colors within the tolerance and prioritize's them from say 0 –> high. Does it just start at 0 and move the mouse to that and check uptext and if no uptext/wrong it moves to another match until it finds the right one or runs out of points?

This is the code im looking at btw.


program TPATutorial;
{.include SRL/SRL.scar}

var
MyTPA : TPointArray;
MyPoint : TPoint;
x, y, i : Integer;

begin
x := MSCx;
y := MSCy;
FindColorsSpiralTolerance(x, y, MyTPA, 2961456, MSx1, MSy1, MSx2, MSy2, 10);
if Length(MyTPA) = 0 then FindColorsSpiralTolerance(x, y, MyTPA, 8160390, MSX1, MSY1, MSX2, MSY2, 10);
for i := 0 to High(MyTPA) do
begin
MyPoint := MyTPA[i]
MMouse (MyPoint.x, MyPoint.y, 3, 3);
if (IsUpTextMultiCustom(['tair', 'case'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('limb');
Wait(500+random(250));
Exit;
end;
Wait(350+random(350));
end;
end.



use an ATPA. cycling through a tpa can be really bot like because there can easily be 200+ points in a tpa. so your mouse will be running around the screen for a long time, if it cant find the up text in the beginning.

Brandon

2012-03-22 22:14:32

MiddleTPAEx(TPA, X, Y);
MMouse(X, Y, 0, 0);

Littellj

2012-03-22 23:40:43

yeah i understand how that one works, but just wondering how the FindColorTolerance picks which point to use.