Originally Posted by
jstemper
that would just move to different indexes of the atpa
Simba Code:
ATPA := FloodFillTPA(TPA); //not sure if this line of code is need as im just now looking into areolib documentation =s
ATPA := ClusterTPA(TPA, 15); //this should work as i did find it in the documentation.
and the second line would just override the first line
Note this is for jstemper only.not for user of this script
ahh i didnt know what flood fill does as it is part of the aerolib. and as for moving the index of the atpa i know that =s
here is my example code from srl-6 which allows for picking stalls, just adjust for the aerolib
small snippet without checks and so on.
Simba Code:
procedure FindStalls(whichstall:integer);
var
StallTpa: TPointArray;
StallAtpa: T2DPointArray;
begin
if FindColorsTolerance(StallTpa, 4227760, intToBox (4, 47, 524, 386), 0, colorSetting(2,0, 0)) then
begin
StallAtpa := ClusterTPA(StallTpa, 15);
mouse(middletpa(StallAtpa(whichstall)),MOUSE_RIGHT);
if OptionExists('Steal from') then RSPSChooseOption('Steal from');
end;
end;
note: the text finding bit is part of my include, not part of srl-6
logic here is getting the color of the top of each stall{or the main color of each stall},not the items of the stall, so that will be the stall tpa.
so after you cluster tpa by 15,prob could lower it due to the stalls be closer together , the stall atpa would have a stall in each index.
so by simply changing the index of the stall atpa it will choose the correct stall.
as for the other checks you would have to work those out
Then then give the user the option to do reg thieving or from big stall,
so the code would be similar to this code from before
Simba Code:
var
StallNum:integer;
procedure RegularStall(whichstall:integer); //stall should start from 0 from left to right if the below code works
var
TPA: TPointArray;
ATPA: T2DPointArray;
tCol : TColEx;
begin
tCol.create(211620, 0, 0.00, 0.0);
if (not tCol.findAllIn(AREA_MS, TPA)) then
begin
randomCompass();
exit;
end;
ATPA := ClusterTPA(TPA, 5); //this should work as i did find it in the documentation.
HumanMMouse((ATPA[whichstall].MidPnt), 0, 0);
if (waitUptext('teal fro', 250)) then
fastClick(Mouse_Left);
end;
procedure main(action:integer); //might have to adjust for aerolib but should work
begin
case action of
1 :RegularStall(StallNum);
2 :ClickBigStall;
end;
end;
begin
StallNum:= 3;
main(1);
end.