Torrent of Flame
2009-01-26 14:14:40
function WalkingPointsAll(where: string; whatpath: string): TPointArray;
begin
case Lowercase(where) of
'pathtohighpoint': begin
case Lowercase(whatpath) of
'leftstairs': begin
SetLength(Result, 7);
Result[0] := Point(3214, 3217);
Result[1] := Point(3213, 3210);
Result[2] := Point(3206, 3210);
Result[3] := Point(3206, 3209);
Result[4] := Point(3206, 3213);
Result[5] := Point(3206, 3218);
Result[6] := Point(3208, 3223);
end;
'rightstairs': begin
SetLength(Result, 3);
Result[0] := Point(3215, 3220);
Result[1] := Point(3212, 3228);
Result[2] := Point(3206, 3228);
end;
end;
end;
end;
end;
procedure ClimbToHighestPoint;
var TP, TP2: TPoint;
begin
if not (LoggedIn) then
Exit;
Path := WalkingPointsAll('pathtohighpoint',{random of right or left stairs} );
for i := 0 to 3 do
begin
WalkToTile(Path[i], 2, 1);
end;
How can I get it so that the it picks the left stairs route or the right stairs route at random?
Thanks :)