Log in

View Full Version : Once again, I have another problem!



ABC!
05-27-2012, 08:04 AM
Title, says it all really, im trying to put a failsafe into place, if it cant find any toads in the loaction its at i want it to move so I try to use 'findcolorspiraltolerance', but it doesnt do anything :/



Function PickUpFrog:Boolean;

begin
repeat
FindNormalRandoms
if FindObjCustom(x, y, ['Swamp', 'toad'], [2189375], 10) then
begin
Wait(500 + random(100));
Mouse(x, y, 0, 0, false);
ChooseOption('Take');
end else
begin
writeln('Cannot find any Toads, Moving to another spot!');
x := MMCX;
y := MMCY;
if (FindColorSpiralTolerance(x, y, 208 , 1, 2, 1, 2, 7)) then
Mouse(x, y, 0, 0, True);
end;
begin
repeat
until not IsUpText('toad') or (InvFull);
end;
until(InvFull);
end;

Debug Box:
Cannot find any Toads, Moving to another spot!
Cannot find any Toads, Moving to another spot!
Cannot find any Toads, Moving to another spot!
Cannot find any Toads, Moving to another spot!
Cannot find any Toads, Moving to another spot!

nokkasiili
05-27-2012, 08:14 AM
if (FindColorSpiralTolerance(x, y, 208 , 1, 2, 1, 2, 7)) then
The area where you are searching is wrong.

Use this if you want find color from mainscreen

if (FindColorSpiralTolerance(x, y, 208 ,MSX1, MSY1, MSX2, MSY2, 7)) then
if you want find it from minimap change MS to MM

ABC!
05-27-2012, 08:20 AM
Mhm, I had it like that before, but tried it again and it did'nt work... But thanks anyway!