The trick is indeed to use multiple method to get things done. There are a couple of common methods of finding objects:
- Scanning for its color.
- Scanning for a Colored Area.
- Scanning for a Bitmap of an Object.
- Scanning for a Bitmap Mask.
- Scanning for a Deformed Bitmap.
- Scanning using DTM's.
1. Scanning for a Color.
Needed for fast moving objects, like Goblins and Chickens.
Use:
FindColor,
FindColorTolerance, ,
FindColorSpiral,
FindColorSpiralTolerance.
2. Scanning for a Colored Area.
Used for slower moving objects, like cows. But can also be used for furnaces, doors, etc.
Use:
FindColoredAreaTolerance,
FindColorsSpiralTolerance.
3. Scanning for a Bitmap.
This is only useful for Inventory and MiniMap. RS-Items are static objects. Their color and shape are fixed.
Use:
FindBitmapIn,
FindBitmapToleranceIn,
RotateBitmap.
4. Scanning for a Deformed Bitmap.
This is one the most interesting functions in Scar, but rather underestimated by the majority of Scripters. Deformed Bitmaps are scanned using their
shape as opposed to their
color. Its a unique function and very powerful. You can use it to find trees, banks, npcs, agility objects etc. I always use slices of bitmaps as Deformed Bitmaps. (8 x 1) or (1x 17) . Its perfomance is rather sluggish (lags) but it is a stable way for finding objects.
Use:
FindDeformedBitmapToleranceIn( FindDeformedBitmapToleranceRotationIn5. Scanning using DTM's.
DTM's are collections of colored pixels with a fixed color/place relation, not unlike like a spiderweb. They are useful for anything really, as long as the colors are more or less stable and the relation 100% fixed, like Bitmaps.
They are rather cumbersome to create and you really need a slow mouse to set the anchorpoints right.
Use:
FindDTM.