SRL Archive - Help

Can't Create a accurate TPA to have my life.


rj

2012-12-16 17:00:25

So, I learned how to make a TPA and for it to click on a object, It works well for my miner(with the exception of the smoking rock having to be re-written every logout) and I tried making a TPA to find the bank but I feel like just using a single color would be more accurate.. well because it has been more accurate for me. I am trying to make simba click on a bank booth but when I was ACA I can never get good colors it always shows red on spots other then the bank booth:
-BTW I see CTS is on 1 but it shows almost the same results on 2
This same thing happens to me with DTM's..
What am I doing wrong? Btw my code finding the bank booth is:
program test;
{$i srl/srl.simba}
Procedure FindTheBank;
var
tmpCTS, l, r:Integer;
BankTPA:TPointArray;
begin
MouseSpeed:=15;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.69,1.67);
if FindColorsTolerance(BankTPA, 9281961, 1, 1, 516, 337, 7) then
begin
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(BankTPA)
wait(randomrange(60, 100));
mmouse(BankTPA[r].x, BankTPA[r].y, 2, 2);
wait(randomrange(100, 150));
clickmouse2(mouse_left);
wait(randomrange(2000, 2500));
end;
end;
begin
FindTheBank;
end.

DannyRS

2012-12-16 17:07:09

use the bankers themselves, purple and easy

rj

2012-12-16 17:08:58

From: DannyRS
use the bankers themselves, purple and easy


You got my excited for a second.. then.. I right clicked the banker..

Dern L0L

DannyRS

2012-12-16 17:11:29

From: rjj95
You got my excited for a second.. then.. I right clicked the banker..


oh this is a RSPS ?

Le Jingle

2012-12-16 17:11:51

In ACA, go to the bottom right corner; Click the circle so you have '2' checked instead of 1.

Pick colors that you want to be found, and make sure to note the 'tolerance', 'best color', 'hue mod', 'sat mod' - all shown in ACA.

Then when using color information in script, ex. your snippet in main post, use that information. Also note, splitting your TPA to ATPA (basically instead of pointing out all the colors on the main screen like the snippet does at the moment, this will split all those colors into separate TPA's, aka an Array of TPointArray) and saying the distance or w+h of each ATPA bounds you want may help. To even further help, sort the resulting ATPA's from your player Point, so the closet ATPA, hopefully banker booth in front of you, is chosen. There are many more ways to narrow down too. Browsing TPA's in left column (functionlist) within simba provides many more built in functions for ATPA/TPA's.

rj

2012-12-16 17:12:02

From: DannyRS
oh this is a RSPS ?


yup lol otherwise i woulfa used uptext

DannyRS

2012-12-16 17:14:57

try a y offset on the bankers?

program test;
{$i srl/srl.simba}
Procedure FindTheBank;
var
tmpCTS, l, r:Integer;
BankTPA:TPointArray;
begin
MouseSpeed:=15;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.15, 0.46);
if FindColorsTolerance(BankTPA, 3810347, 1, 1, 516, 337, 12) then
begin
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(BankTPA)
wait(randomrange(60, 100));
mmouse((BankTPA[r].x), (BankTPA[r].y)+25, 2, 2);
wait(randomrange(100, 150));
clickmouse2(mouse_left);
wait(randomrange(2000, 2500));
end;
end;
begin
FindTheBank;
end.

rj

2012-12-16 17:15:36

From: Le Jingle
In ACA, go to the bottom right corner; Click the circle so you have '2' checked instead of 1.

Pick colors that you want to be found, and make sure to note the 'tolerance', 'best color', 'hue mod', 'sat mod' - all shown in ACA.

Then when using color information in script, ex. your snippet in main post, use that information. Also note, splitting your TPA to ATPA (basically instead of pointing out all the colors on the main screen like the snippet does at the moment, this will split all those colors into separate TPA's, aka an Array of TPointArray) and saying the distance or w+h of each ATPA bounds you want may help. To even further help, sort the resulting ATPA's from your player Point, so the closet ATPA, hopefully banker booth in front of you, is chosen. There are many more ways to narrow down too. Browsing TPA's in left column (functionlist) within simba provides many more built in functions for ATPA/TPA's.

Guess i should go learn about ATPA then because I was already doing everything that you said


@ dannyrs that would work but I want to know how to click the object correctly for future uses

riwu

2012-12-16 19:16:12

Yeah, learning TPA without extending to ATPA is not very useful. Also you are not looping through the TPA, instead you are just clicking the first point since r has default value of 0.

It may not be a good idea to loop through every point w/o splitting it too since you will be going through nearby points of the same obj, so you will need knowledge on ATPA/CTS 2 to do this accurately.

It is still possible to use the purple colored banker by having (direction-independent) offsets.

Flight

2012-12-16 19:31:00

Send me a screenshot and I'll get the best color for you.

rj

2012-12-16 23:51:24

From: Flight
Send me a screenshot and I'll get the best color for you.


Sorry for slow response time I'll try to get one to you tommorrow i'm currently during a proggy for a different script of mine. Tinypic link fine?And what do I save it as for best quality?