benjaa
2008-12-10 18:42:14
function RadialRoadWalkOffNorth(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer) : boolean;
var
Angle : extended;
NewStart, NewEnd : integer;
begin
Angle := rs_GetCompassAngleDegrees;
NewStart := Trunc(StartRadial + Angle);
while ((NewStart) > 360) do
NewStart := NewStart - 360;
NewEnd := Trunc(EndRadial + Angle);
while ((NewEnd) > 360) do
NewEnd := NewEnd - 360;
Result := RadialRoadWalk(TheColor, NewStart, NewEnd, Radius, Xmod, Ymod);
end;Instead of changing the compass to suit the angle you input, angle is in relation to north. It takes the current angle of the compass, and adds it on then walks it.
For example, if you want to walk East, while facing North the angle will be 90. But if you're facing South, the angle will be 270.
While facing south, your compass angle is 180.
90 + 180 = 270;
Taa daa!
Please tell me what you think
Uploaded A Test
Start in Varrock East Bank. Compass in any direction. If you want, you can change the compass ONLY when a red flag is in minimap.
Tester is not 100% effective.