Naike
2008-05-20 16:13:21
Don't you think minimap is really annoying when it wont go north?
When MakeCompass(N) only make it go 330 not 360 and it messes up everything?
Well heres your solution ;)
RadialWalkDegrees!!
Minusing the StartRadial&EndRadial with the angle to get it just perfect!
Note, needs GetMinimapDegrees to work.
I also know that they could be one function but i need GetMinimapDegrees for my next Procedure/Function.
Test walker with the functions.. Should go from Lumby to Varrock middle without major Failsafes!! best of all, IN ANY MINIMAP ANGLE!!! ( Made this when i started with this two Functions but known bugs is the switch from RoadColor to VarrockRoadColor goes wrong and it exits, Logout.)
Enjoy..
Enjoy!!, Note : Hole thing will be released to Junior members 25/5/08 !
When MakeCompass(N) only make it go 330 not 360 and it messes up everything?
Well heres your solution ;)
RadialWalkDegrees!!
Minusing the StartRadial&EndRadial with the angle to get it just perfect!
Note, needs GetMinimapDegrees to work.
I also know that they could be one function but i need GetMinimapDegrees for my next Procedure/Function.
{*************************************************************************************************
Function GetMinimapDegrees(GetAngleFrom : Boolean): Integer;
By: N1ke!
Description: Gets the minimap angle in degrees. True = Clockwise , False = Not Clockwise
*************************************************************************************************}
Function GetMMDegrees(Clockwise : boolean): Integer;
Var Angle : extended;
Begin
If(Not(LoggedIn))Then Exit;
Angle := (rs_GetCompassAngleDegrees);
If ClockWise = True then Angle := 360 - Angle;
Result := Round(Angle);
End;
{*************************************************************************************************
Function RadialWalkDegrees(Color: Integer; StartRadial, EndRadial: Integer; Radius: Integer): Boolean;
By: N1ke!
Description:
*************************************************************************************************}
Function RadialWalkDegrees(Color: Integer; StartRadial, EndRadial: Integer; Radius: Integer): Boolean;
Var
M1n, M4x, D3grees: Integer;
begin
If(Not(LoggedIn))Then Exit;
D3grees := GetMMDegrees(True);
M1n := StartRadial - D3grees;
M4x := EndRadial - D3grees;
If M1n < 0 then
begin
M1n := M1n + 360;
M4x := M4x + 360;
StartRadial := StartRadial + 360;
EndRadial := EndRadial + 360;
end;
Result := RadialWalk(Color, M1n, M4x, Radius, 0, 0);
End;Test walker with the functions.. Should go from Lumby to Varrock middle without major Failsafes!! best of all, IN ANY MINIMAP ANGLE!!! ( Made this when i started with this two Functions but known bugs is the switch from RoadColor to VarrockRoadColor goes wrong and it exits, Logout.)
Enjoy..
program new;
{.include SRL/SRL.scar}
{*************************************************************************************************
Function GetMinimapDegrees(GetAngleFrom : Boolean): Integer;
By: N1ke!
Description: Gets the minimap angle in degrees. True = Clockwise , False = Not Clockwise
*************************************************************************************************}
Function GetMMDegrees(Clockwise : boolean): Integer;
Var Angle : extended;
Begin
If(Not(LoggedIn))Then Exit;
Angle := (rs_GetCompassAngleDegrees);
If ClockWise = True then Angle := 360 - Angle;
Result := Round(Angle);
End;
{*************************************************************************************************
Function RadialWalkDegrees(Color: Integer; StartRadial, EndRadial: Integer; Radius: Integer): Boolean;
By: N1ke!
Description:
*************************************************************************************************}
Function RadialWalkDegrees(Color: Integer; StartRadial, EndRadial: Integer; Radius: Integer): Boolean;
Var
M1n, M4x, D3grees: Integer;
begin
If(Not(LoggedIn))Then Exit;
D3grees := GetMMDegrees(True);
M1n := StartRadial - D3grees;
M4x := EndRadial - D3grees;
If M1n < 0 then
begin
M1n := M1n + 360;
M4x := M4x + 360;
StartRadial := StartRadial + 360;
EndRadial := EndRadial + 360;
end;
Result := RadialWalk(Color, M1n, M4x, Radius, 0, 0);
End;
Function LumbrigeToVarrock(Run: Boolean):Boolean;
var Temp, x, y : integer; Col0r : String;
begin
If(Not(LoggedIn))Then Exit;
If Run then
begin
Temp := GetMMLevels('run', Col0r);
If Temp > RandomRange(25, 55) then SetRun(true);
end;
If not RadialWalkDegrees(FindRoadColor, 85, 95, 45)then Exit;
If not RadialWalkDegrees(FindRoadColor, 70, 95, 45)then Exit;
Temp := FindWaterColor;
If FindColor(x, y, Temp, MMX1, MMY1, MMX2, MMY2)then Wait(2) else Exit;
If not RadialWalkDegrees(FindRoadColor, 45, 90, 60)then Exit;
If not RadialWalkDegrees(FindRoadColor, 70, 120, 43)then Exit;
If not RadialWalkDegrees(FindRoadColor, 330, 390, 60)then Exit;
If not RadialWalkDegrees(FindRoadColor, 290, 360, 60)then Exit;
Temp := FindWaterColor;
If FindColor(x, y, Temp, MMX1, MMY1, MMX2, MMY2)then Wait(2) else Exit;
If not RadialWalkDegrees(FindRoadColor, 310, 390, 60)then Exit;
If not RadialWalkDegrees(FindRoadColor, 290, 360, 60)then Exit;
If not RadialWalkDegrees(FindRoadColor, 310, 390, 40)then Exit;
If not RadialWalkDegrees(FindRoadColor, 310, 390, 60)then Exit;
If not RadialWalkDegrees(FindRoadColor, 360, 420, 60)then Exit;
If not RadialWalkDegrees(FindRoadColor, 360, 420, 60)then Exit;
If not RadialWalkDegrees(FindRoadColor, 380, 450, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 320, 360, 50)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 255, 330, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 255, 330, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 255, 330, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 320, 400, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 270, 360, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 280, 360, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 330, 450, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 330, 390, 60)then Exit;
If not RadialWalkDegrees(FindVarrockRoadColor, 330, 390, 60)then Exit;
If FindSymbol(x, y, 'Water')then
begin
Mouse(X, y, 0, 0, True);
FFlag(10);
Writeln('Your in varrock middle.');
Result := True;
end else
begin
Writeln('Didnt find water on last part.');
Writeln('Still near varrock middle.');
Result := True;
end;
end;
begin
SetupSRL;
Wait(2000);
If Not LumbrigeToVarrock(True)then Logout else DoEmote(RandomRange(1, 37));
End.Enjoy!!, Note : Hole thing will be released to Junior members 25/5/08 !