PDA

View Full Version : Rotate Check



Kevin
06-20-2013, 06:31 PM
Just another little snippet of code that you can use when looking for a specified object or area that might be hidden by any person and/or object. I personally use this to enter a variety of caves.


function RotateCheck(check: function(): boolean; angleOfRotation: integer): boolean;
var
i: integer;
begin
i:= angleOfRotation-30;
SetAngle(SRL_ANGLE_LOW);
while (i<=(angleOfRotation+30))do
begin
MakeCompass(i);
wait(randomRange(200,350));
if(Check())then
begin
Result:= True;
wait(randomRange(300,450));
Exit;
end;
i:=i+30;
end;
end;


The basic call scenario would be as such:

if(RotateCheck(@EnterAgilityTunnel, 90))then//This will lower the screen and pivot the screen in a range around the 90 degree mark (east I think) to find said tunnel even if other objects/people might be in the way.
//then you entered the tunnel