SRL Archive - General Botting Help

Whats the best and/or simple way to make whats inside IF random?


rsbots2013

2013-04-04 20:51:05

If FindColorSpiralTolerance(x, y, Color, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color2, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color3, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color4, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color5, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color6, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color7, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color8, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color9, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color10, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color11, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color12, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color13, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color14, 179, 196, 372, 288, 20) then

Haxz

2013-04-04 21:02:14

Maybe like this?


var
x, y: Integer;
Colors: TIntegerArray;

begin
Colors := [Color1, color2, color3.....];
for i := 0 to High(Colors) do
begin
if FindColorSpiralTolerance(x, y, Colors[i], 179, 196, 372, 288, 20) then
dosomething;
end;
end;

I think you can do it for tolerance as well.

rsbots2013

2013-04-04 21:27:51

Could you explain

"for i := 0 to High(Colors) do
begin
if FindColorSpiralTolerance(x, y, Colors, 179, 196, 372, 288, 20) then
dosomething; "

am I suppose to do something where 'i' is? at both spots?

I'm able to compile and run the bot correctly. But it's still seems to be clicking the same color.

Right now I got my script looking like this


var
x, y: Integer;
Colors: TIntegerArray;

Colors := [Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9, Color10, Color11, Color12, Color13, Color14];
for i := 0 to High(Colors) do

If FindColorSpiralTolerance(x, y, Color, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color2, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color3, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color4, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color5, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color6, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color7, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color8, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color9, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color10, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color11, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color12, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color13, 179, 196, 372, 288, 20) or
FindColorSpiralTolerance(x, y, Color14, 179, 196, 372, 288, 20) then