From: Flight
Eh I gave up on trying to use bitmaps on inventory item finding, I'm back to using single-lined colors, as the prove to be more stable then anything I've ever encountered. They work fine now but I think might break in the future. Now I just need to come up with a more efficient way of finding objects, in my case trees. Colors work, but the same colors are used any some many objects surrounding what you're looking for. Eg: Searching for normal trees, I still have issues tracking near-by goblins, bushes/furns on the ground, the grass color, hell even the mini-map even after I told the script NOT to search outside of the main window parameters.
I tried even making the smallest bitmap, composed of 2 or 3 pixels of the tree's 'texture', didn't work, same with making a DTM of a tree. It seems like everyone is relying on reflection now days for things like this, so it's very hard to find someone who has done accurate colors recently, I hope I'm not the only one who doesn't depend on reflection. :(
Have you tried FindObjCustom?
FindObjCustom(var cx, cy: Integer;Text: TStringArray;Color: TIntegerArray;Tol: Integer): Boolean;
So you would use something like:
procedure FindTree;
var
x, y: Integer;
begin
if FindObjCustom(x, y, ['Tre', 'ree'], [1464664, 545654, 466657], 10) then
Mouse(x, y, 2, 2, true);
end;