Log in

View Full Version : FindObjCustom Problem



ownedlikenoob
06-20-2011, 03:57 AM
Begin
repeat
If(FindObjCustom(x, y, ['Take','ke Li','e Lim','Limpwurt'], [7181217,7905970,7642284,8762566], 3)) or
(FindObjCustom(x, y, ['Take','ke Co','e Coi','Coins'], [1883881,1883367,1886712,1883881], 3)) then
Begin
Mouse(x,y,0,0,False);
Wait(300);
end;
if(FindBitmapToleranceIn(takelimps, X, Y, 0, 0, 515, 336, 30)) or
(FindBitmapToleranceIn(takecoins, X, Y, 0, 0, 515, 336, 30)) then
Begin
Mouse(x,y,0,0,True);
WriteLn('Found item, looting');
end;
until(Not(FindObjCustom(x, y, ['Take','ke Li','e Lim','Limpwurt'], [7181217,7905970,7642284,8762566], 3))) and
(Not(FindObjCustom(x, y, ['Take','ke Co','e Coi','Coins'], [1883881,1883367,1886712,1883881], 3)));
end;

It returns this: Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.

What is going on? Been trying to figure this out for an hour now...

Coh3n
06-20-2011, 05:16 AM
That has nothing to do with what you've done, it just means FindObjCustom is looking for the object outside the client window for whatever reason.

Smarter Child
06-21-2011, 12:32 AM
Remember for the bitmap part, you can use:



MIX1, MIY1, MIX2, MIY2) //the Inventory coordinates
MSX1, MSY2, MSX2, MSY2) //The Main screen coordinates


Note : Just to warn you, you may want to free your bitmaps.

FreeBitmap(Bmp: LongInt);

I know this doesn't answer your question, just thought I'd point that out ;)