IROC-Z
2014-12-05 00:09:51
I am looking to implement a nest/geode finder into an ivy script. This is what I have so far:
I put it in the script in the ivy script and I watched two nests come and go.
I changed where it is in the script because it may have not been looking for it when it should be. Any suggestions on how the findNest function looks would be great!
function findNest(): boolean;
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn then
exit;
if chatbox.findAnyText(['falls out of the iv']) then
begin
if findColorsSpiralTolerance(x, y, TPA, 3099216, mainScreen.getBounds(), 7, colorSetting(2, 0.34, 1.21)) //Bird's Nest color
or
findColorsSpiralTolerance(x, y, TPA, 15774489, mainScreen.getBounds(), 10, colorSetting(2, 0.02, 1.23)) //Geode Color
then
begin
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0,250);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA)
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['Take Bird']) or isMouseOverText(['Take Crystal'], 1000} then
begin
fastClick(MOUSE_LEFT);
break;
end;
end;
end;
end else
exit;
I put it in the script in the ivy script and I watched two nests come and go.
I changed where it is in the script because it may have not been looking for it when it should be. Any suggestions on how the findNest function looks would be great!