SRL Archive - General Botting Help

Finding colors and storing the int x,y


uncfan1119

2014-10-24 23:18:46

I'm having trouble getting Simba to store thee values of x and y when using FindColorSpiralTolerance or FindColorTolerance. x and y are declared globally under var. The issue is that color is not found at 1,1. What am I doing wrong?

repeat
FindColorSpiralTolerance(x, y, 16767888, 1, 1, 400, 400, 500);
Writeln('Color was found at (' + IntToStr(x) + ',' + IntToStr(y) + ').');
until(false)

The output will read as this:
Color was found at (1,1).
Color was found at (1,1).
Color was found at (1,1).
Color was found at (1,1).
Color was found at (1,1).

The Mayor

2014-10-24 23:31:47

Because you have a 500 tolerance lol :p Any colour is gonna match.

uncfan1119

2014-10-24 23:49:00

Thanks. For some reason I thought 500 tolerance would search 500 numbers above and 500 below the color I picked. Working now :)

NKN

2014-10-25 00:41:35

From: uncfan1119
Thanks. For some reason I thought 500 tolerance would search 500 numbers above and 500 below the color I picked. Working now :)


Tolerance caps at 255, incase you wanted to know for future use. (255 matches every color.)

Olly

2014-10-25 00:44:55

From: NKN
Tolerance caps at 255, incase you wanted to know for future use. (255 matches every color.)


It's higher than that. :p

I have no clue what it is though, someone else do the math!!

riwu

2014-10-25 01:36:05

From: Olly
It's higher than that. :p

I have no clue what it is though, someone else do the math!!

442?
Tolerance b/w black (0) and white (16777215)

NKN

2014-10-25 10:53:56

From: Olly
It's higher than that. :p

I have no clue what it is though, someone else do the math!!


newfangled technology.

masterBB

2014-10-25 14:47:17

From: Olly
It's higher than that. :p

I have no clue what it is though, someone else do the math!!


max tol:
CTS_0 -> 255
CTS_1 -> sqrt(2552 * 3) = 441.673 -> 442
CTS_2 -> max(huemod, satmod) * tol == 100 -> tol = 100/max(huemod, satmod) //depends on hue and sat modifiers.