SRL Archive - OSR Help

Why makecompass and angle commands not working?


rsbots2013

2013-05-24 03:11:51

Why is MakeCompass and SetAngle not working?

program new;

//{.include srl/srl.scar}
{$I SRL/SRL.Simba}

var
LogBalance1, LogBalance2, LogBalance3, LogBalance4, LogBalance5, LogBalance6, LogBalance7, LogBalance8 : integer;

Procedure LoadColor;
begin

LogBalance1 := 605282;
LogBalance2 := 604509;
LogBalance3 := 605798;
LogBalance4 := 602190;
LogBalance5 := 606571;
LogBalance6 := 603480;
LogBalance7 := 603219;
LogBalance8 := 601162;

end;

procedure CrossLogBalance;

var
x, y : integer;
aFound : extended;

begin

if FindColorSpiralTolerance( x, y, LogBalance1, 180, 160, 327, 226, 1) or
FindColorSpiralTolerance( x, y, LogBalance2, 180, 160, 327, 226, 1) or
FindColorSpiralTolerance( x, y, LogBalance3, 180, 160, 327, 226, 1) or
FindColorSpiralTolerance( x, y, LogBalance4, 180, 160, 327, 226, 1) or
FindColorSpiralTolerance( x, y, LogBalance5, 180, 160, 327, 226, 1) or
FindColorSpiralTolerance( x, y, LogBalance6, 180, 160, 327, 226, 1) or
FindColorSpiralTolerance( x, y, LogBalance7, 180, 160, 327, 226, 1) or
FindColorSpiralTolerance( x, y, LogBalance8, 180, 160, 327, 226, 1) then
begin
writeln('Found Log Balance');
Mouse( x, y, 1, 1, True);
end else
Writeln('DTM not found...');

end;

begin
LoadColor;
SetAngle(SRL_ANGLE_HIGH);
MouseSpeed:= 20;
MakeCompass('n');
CrossLogBalance;
end.

The Mayor

2013-05-24 03:30:29

Do you have to SetupSRL first?


begin
SetupSRL //this
LoadColor;
SetAngle(SRL_ANGLE_HIGH);
MouseSpeed:= 20;
MakeCompass('n');
CrossLogBalance;
end.

rsbots2013

2013-05-24 03:46:16

next post

rsbots2013

2013-05-24 03:53:35

Dude it's still not working. It skips the Compass and angle part and goes onto looking for colors :s
From: The Mayor
Do you have to SetupSRL first?


begin
SetupSRL //this
LoadColor;
SetAngle(SRL_ANGLE_HIGH);
MouseSpeed:= 20;
MakeCompass('n');
CrossLogBalance;
end.