weezy
2010-11-26 03:28:43
procedure MoveToBox(box:TBox);
var tpt:TPoint;
ttl:TTile;
begin
repeat
ttl := Tile(RandomRange(box.x1, box.x2),RandomRange(box.y1, box.y2));
sleep(500+random(300));
until TileOnMM(ttl);
tpt := TileToMM(ttl);
Mouse(tpt.x, tpt.y, 3, 3, true);
FindNormalRandoms;
end;
procedure fWalkPath(tta:TPointArray;reverse:boolean);
var i:integer;
begin
if reverse then
begin
for i := high(tta) downto 0 do
begin
if TileOnMM(PointToTile(tta[i]) then
break;
end;
for i := i to high(tta) do
begin
MoveToBox(PointToBox(tta[i]),4);
end;
end else
begin
for i := 0 to high(tta) do
begin
if TileOnMM(PointToTile(tta)) then
break;
end;
for i := i downto 0 do
begin
MoveToBox(PointToBox(tta[i]),4);
end;
end;
R_Flag;
end;can anyone help me find whats wrong here?