ahh, findcolorspiraltolerance, my favorite!
So, To start off with, findcolorspiraltolerance will find a color that you name, and assign its co-ordinates to X and Y. For example, you can use
begin
if findcolorspiraltolerance(x, y, color, MSX1, MSY1, MSX2, MSY2, 5) then
Mouse(x, y, 5, 5, 1)
end;
This would find the color of your choice anywhere on the main screen, with a color tolerance of 5 (always set a bit of tolerance, jagex changes colors alot), then assign the point where it found the color to x, y.
Next, it would Move the mouse to x, y, which we have just assigned to the point where we found our color, randomness of 5 (the mouse will move within 5 pixels of x, y) then click on it.
One last thing though, before you ever use variables, such as x, y, you must assign them as global or local variables. If you are going to use x, y as your color throughout the script, assign it as a global variable. To do This, Simply write this in under Program (programname) at the top.
Program (programname);
var
x, y:integer; // these variables are global, they can be used at any point in your script
begin
blah blah blah
end.
What this tells us is x and y are integers, and now we can assign x and y to any integers at any point in the script. However, If you want x and y to only be used in one procedure, you can list it as a local variable. To name a local variable, you write
var
x, y:integer;
But you write this under your procedure name, as follows.
Procedure (Procedure name);
var
x, y:integer //These variables are local, they will only be used in this one procedure
begin
end;
Hope I've cleared any confusion with findcolorspiraltolerance, if not, let me know! :D
E: Reading over your question again, I dont think I've answered it, lol
If your looking for a color, and you know exactly where its going to be (anything static) then you can narrow down your area to search for the color. Above I used
findcolorspiraltolerance(x, y, color, MSX1, MSY1, MSX2, MSY2, 5)
This searches anywhere on the main screen, however lets say you know it will be in the bottom left quadrant of your screen. You can then drag the crosshair to your runescape screen, and pick the top left point of your search area, then the bottom right point of your search area. Now at the botom of your simba, in the debug box, you will have something like this
Picked color 723722 at (333, 222
Picked color 777777 at (111, 5)
Now enter these co-ordinates into the findcolorspiraltolerance function, and it will only search in that area. For the points I Picked, I would enter
findcolorspiraltolerance(x, y, mycolor, 333, 222, 111, 5, 5)
Any more questions?