SRL Archive - SRL Bugs

ClickNorth bug


Er1k

2012-01-13 21:45:53

ClickNorth in SRL5 does not check whether the compass is within 5 degrees from North and always clicks north first before setting the angle. This should be fixed by adding the check from SRL4 back to the function.

For instance it would look like this:


procedure ClickNorth(AngleHigh: Integer);
begin
if InRange(Round(rs_GetCompassAngleDegrees), 5, 355) then //from srl4
if (Random(4) = 1) then
begin
Mouse(542, 24, 15, 15, mouse_right);
WaitOptionMulti(['ace', 'orth'], 1200);
end else
Mouse(542, 24, 15, 15, mouse_left);
SetAngle(AngleHigh);
end;

Thanks devs!

Narcle

2012-01-13 22:32:35

The scripter should check for this themselves. Some require to ClickNorth for other reasons.

E:
I for one would have a problem with that check, as I use a similar check that's more precise.

Er1k

2012-01-13 22:45:53

That being said, do you mean the removal of the check is intended in SRL5? If so, I am not aware of this from SRL5 updates/announcement when I updated to SRL5. Would be nice to warn scripter of this change, as the current function actually slows down scripts that do not intend to reset the compass everytime it calls clickNorth, as in SRL4.

Narcle

2012-01-13 22:48:27

I did not know it was removed. There was problems with compass prior and might have been removed due too that.

Coh3n

2012-01-16 16:14:52

Yeah, we must have missed it in the update thread. Sorry about that, but I agree with Narcle. The compass check should be in the script, not the function.