jackren1986 Posted March 10, 2012 Share Posted March 10, 2012 How to get the coordinates of the teleporter, his hair the color of nearby similar colors, help ... Quote Link to comment Share on other sites More sharing options...
sjesper Posted March 11, 2012 Share Posted March 11, 2012 Hmm. If i got that right you need to use FindColorTolerance. Who/what is this 'teleporter'? Quote Link to comment Share on other sites More sharing options...
jackren1986 Posted March 12, 2012 Author Share Posted March 12, 2012 T := GetSystemTime + RR(2000, 3500); repeat ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.12, 0.21); FindColorsTolerance(TPA, 10461353, MSX1, MSY1, MSX2, MSY2, 15); //10461353 8289923 9342876 SetColorSpeed2Modifiers(0.2, 0.2); ColorToleranceSpeed(1); if (Length(TPA) < 1) then Exit; ATPA := TPAToATPA(TPA, 15); SortATPASize(ATPA, True); H := High(ATPA); for I := 0 to H do if (Length(ATPA) > 35) then begin TPADimensions(ATPA, Width, Height); if (InRange(Width, 5, 20)) then if (InRange(Height, 5, 20)) then begin P := MiddleTPA(ATPA); ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.12, 0.41); FindColorsTolerance(TPA, 4873832, P.X - 20, P.Y - 20, P.X + 20, P.Y + 10, 20); //4873832 725541 SetColorSpeed2Modifiers(0.2, 0.2); ColorToleranceSpeed(1); if (Length(TPA) < 31) then Continue; MMouse(P.X, P.Y, 0, 0); if (not (IsUpTextMulti(['alk-to', 'to A', 'ubury']))) then Continue; Mouse(P.X, P.Y, 0, 0, False); Wait(200); Mouse(P.X, P.Y + 62, 0, 0, True); Result := True; Exit; end; end; until (GetSystemTime > T); Quote Link to comment Share on other sites More sharing options...
sjesper Posted March 12, 2012 Share Posted March 12, 2012 T := GetSystemTime + RR(2000, 3500); repeat ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.12, 0.21); FindColorsTolerance(TPA, 10461353, MSX1, MSY1, MSX2, MSY2, 15); //10461353 8289923 9342876 SetColorSpeed2Modifiers(0.2, 0.2); ColorToleranceSpeed(1); if (Length(TPA) < 1) then Exit; ATPA := TPAToATPA(TPA, 15); SortATPASize(ATPA, True); H := High(ATPA); for I := 0 to H do if (Length(ATPA) > 35) then begin TPADimensions(ATPA, Width, Height); if (InRange(Width, 5, 20)) then if (InRange(Height, 5, 20)) then begin P := MiddleTPA(ATPA); ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.12, 0.41); FindColorsTolerance(TPA, 4873832, P.X - 20, P.Y - 20, P.X + 20, P.Y + 10, 20); //4873832 725541 SetColorSpeed2Modifiers(0.2, 0.2); ColorToleranceSpeed(1); if (Length(TPA) < 31) then Continue; MMouse(P.X, P.Y, 0, 0); if (not (IsUpTextMulti(['alk-to', 'to A', 'ubury']))) then Continue; Mouse(P.X, P.Y, 0, 0, False); Wait(200); Mouse(P.X, P.Y + 62, 0, 0, True); Result := True; Exit; end; end; until (GetSystemTime > T); Well that code is from the OSI Essence Minder. It find Aubury and return the coordinates as a TPoint. In the procedure "Teleport" it clicks Aubury and wait for the mine to apear. I can't see whats wrong? Quote Link to comment Share on other sites More sharing options...