JLewis
2006-08-27 18:42:26
{*******************************************************************************
Procedure PowerWalk (Direction:String; Power: integer);;
Directions: Set to: 'N','E','S','W','NW','NE','SW','SE' Set Power from 1 to 8
8 being farthest away 1 being the closest
By: JLewis
Description: Walks any direction acording to power given.
*******************************************************************************}
procedure PowerWalk (Direction : string; Power : Integer);
var XX,YY,Si,Di : Integer;
begin
if ( Power > 8 ) or ( Power < 1 ) then
Exit;
XX := 648;
YY := 84;
Di := Power * 7;
Si := Power * 6;
case Direction of
'N': begin
X := XX;
Y := YY - Di;
Mouse( X, Y, 3, 3, True);
FFlag ( 10 );
end;
'NW': begin
X := XX - Si;
Y := YY - Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'W' : begin
X := XX - Di;
Y := YY;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'SW' : begin
X := XX - Si;
Y := YY + Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'S' : begin
X := XX;
Y := YY + Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'SE' : begin
X := XX + Si;
Y := YY + Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'E' : begin
X :=XX + Di;
Y :=YY;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
'NE' : begin
X := XX + Si;
Y := YY - Di;
Mouse ( X, Y, 3, 3, True );;
FFlag ( 10 );
end;
end;
end;