All About Colors
By Tickyy
What is Color Finding?
Color finding in simba is used mainly for finding the object/item/thing on the selected client, in this case for example RuneScape. There are many different functions that use color finding, but this tutorial will only go over the basics.
Color Picking
The first things is, color picking, without a color we won't need a function or anything else, so first we need to pick the color for the item we are looking for.
That's the color picking tool that i am talking about, after clicking on it , you'll notice some numbers will change just after you move your mouse, Exactly like this:
Those changing numbers are the position of the selected client and the color, so basically this isn't just a color picker, this is also a great tool to find out the coordinates of the position! But let's get to the point, so if that position is the color you are looking for... click on it, and you'll see something on the debug box!
So basically, just as you can see it says "Picked colour: 16711680" so... that's the color and "at (814, 447)" is the position! That's it! You just found the color you wanted, but if you're going to use it for scripting i am going further for basic color finding
Variable Index
x - the x coordinate of the color
y - the y coordinate of the color
color - the color you are searching for
xs, ys - the x and y coordinates of the point on the RS screen to start searching for the color (the top left corner)
xe, ye - the x and y coordinates of the point on the RS screen to stop searching for the color (the bottom right corner)
tol - the tolerance of the color to search for. The higher the tolerance, the wider the range of colors it will search for. This is only used in the FindColor functions that use the tol variable.
Color finding.
Well lets start with...
FindColor(x, y, color, xs, ys, xe, ye)
One of the simplest color finding functions out there. It searches for one color with no tolerance and records the color position at x and y. Not recommended using for RuneScape. Since they are trying to stop color boting so they change colors from time to time, even while logged in!
FindColorSpiral(x, y, color, xs, ys, xe, ye)
This works much like FindColor, except instead of searching from left to right it searches in a spiral. Differences: a little bit faster, but you barely can see it, so no big deal.
FindColorTolerance(x, y, color, xs, ys, xe, ye, tol)
This is one of the best color finding functions, simply because it has tolerance. This way, you will most often find a color you are searching for. For those who have never used tolerance, should try to increase slowly the number of the tolerance if it can't find the object, starting with 4-5 is good, if it still fails at finding try to increase it! That will change the range of the color
FindColorSpiralTolerance(x, y, color, xs, ys, xe, ye, tol)
The same in Spiral search.
Now an example using them! But first there are few srl coordinates that i'm gonna show you
Code:
Minimap = MMX1, MMY1, MMX2, MMY2.
MainScreen = MSX1, MSY1, MSX2, MSY2.
Inventory = MIX1, MIY1, MIX2, MIY2.
Simba Code:
if(FindColorSpiralTolerance(x, y, 2324621, MMX1, MMY1, MMX2, MMY2, 5))then
begin
Mouse(x, y, 5, 5, true); //If found will Left-Click on the x, y coordinates with a randomness between 5 pixel
end
End Note - If sometimes the script just starts to lag for some reason just add a wait in the repeating loop.