n3ss3s
2007-08-03 12:04:53
In this tutorial, I will teach you how to use tolerance in your scripts.
Rune essence. That is a good example since it has many different gray colors.
Ever thought about something like this : "Ahh, now I've picked the color from rune essence.. Oh noes! What about if the compass rotates and we lose our gray color?! That would be end of our script! "
Lets make an example:
Using that, to find different colors of the "same" color, using FindColor you would need to write useless lines.
FindColorTolerance searches for color from an "area" - Tolerance.
That would search for a color which is a color from
980 (1000 - 20 (20 is the tolerance)) to 1020 (1000 + 20(20 is the tolerance)).
Doesnt that sound a lot better than looking for one color?
If you didnt already know, the colors in runescape change a bit like every 15 minutes or when you login and out.
Now, if we would be first looking for the color 1000 which would be found on that moment, but after some time it would maybe be 1002 and you could find that with FindColorTolerance(x, y, 1000, MSX1, MSY1, MSX2, MSY2, 20).
Comments and ask for more if you didnt get something.
Why I write tuts about simple and easy things like this or antirandoms and so on, is because thats what you need to learn first to use the cooler things.
Rune essence. That is a good example since it has many different gray colors.
Ever thought about something like this : "Ahh, now I've picked the color from rune essence.. Oh noes! What about if the compass rotates and we lose our gray color?! That would be end of our script! "
Lets make an example:
FindColor(x, y, Color, MSX1, MSY1, MSX2, MSY2)FindColor searches for one color.Using that, to find different colors of the "same" color, using FindColor you would need to write useless lines.
FindColorTolerance(x, y, Color, MSX1, MSY1, MSX2, MSY2, ToleranceFindColorTolerance searches for color from an "area" - Tolerance.
FindColorTolerance(x, y, 1000, MSX1, MSY1, MSX2, MSY2, 20That would search for a color which is a color from
980 (1000 - 20 (20 is the tolerance)) to 1020 (1000 + 20(20 is the tolerance)).
Doesnt that sound a lot better than looking for one color?
If you didnt already know, the colors in runescape change a bit like every 15 minutes or when you login and out.
Now, if we would be first looking for the color 1000 which would be found on that moment, but after some time it would maybe be 1002 and you could find that with FindColorTolerance(x, y, 1000, MSX1, MSY1, MSX2, MSY2, 20).
Comments and ask for more if you didnt get something.
Why I write tuts about simple and easy things like this or antirandoms and so on, is because thats what you need to learn first to use the cooler things.