woo hoo
2015-04-21 15:51:50
program new;
{$i AeroLib/AeroLib.Simba}
procedure bank
var
BankTPA: TPointArray;
BankATPA: T2DPointArray;
begin
if cs_FindColorsTolerance(BankTPA, 'COLORHERE', 15, IntToBox(MSX1, MSY1, MSX2, MSY2), cs_ToColorSettings(2, 0.28, 1.26)) then
BankATPA := FloodFillTPA(BankTPA);
FilterTPAsBetween(BankATPA, 1, 800);
SortATPAFromMidPoint(BankATPA, Point(259, 170));
terminatescript;
end;
begin
initAL();
bank
end;I'm trying to make a banking procedure which finds the color and makes a tbox around the chest. Sometimes another player comes near with a similar color to the bank which results in a larger than desired tbox. What can I add or edit to filter out protruding similar colors?
The image attached shows roughly what appears in the debug; the red tbox is what happens when there is a nearby similar color and the black tbox is what is desired.