Bad Boy JH
2010-06-01 23:09:52
Right, This walking procedure Keeps stuffing up…
This is in Karamja, if the WalkTo Variable (ToStiles) is True, It walks from the fishing Dock to Stiles, if false, it walks from stiles, back to the dock. However, it keeps stuffing up and stopping half way.
function LoadPath: TPointArray;
begin
SetLength(Result, 8);
Result[0] := Point(2845, 3140);
Result[1] := Point(2856, 3147);
Result[2] := Point(2867, 3153);
Result[3] := Point(2877, 3159);
Result[4] := Point(2889, 3164);
Result[5] := Point(2899, 3169);
Result[6] := Point(2911, 3172);
Result[7] := Point(2921, 3177);
end;
Function WalkTo(ToStiles:Boolean):Boolean;
var
I, Mark:integer;
TPA:TPointArray;
begin
TPA := LoadPath;
if ToStiles then
InvertTPA(TPA);
for i := 1 to high(TPA) do
begin
MarkTime(Mark);
while (TimeFromMark(Mark) <= 10000) do
begin
if TileOnMM(PointToTile(TPA[i])) then Break;
Wait(250);
end;
Wait(RandomRange(500, 1000));
if not WalkToTile(PointToTile(TPA[i]), 2, 2) then Exit;
end;
Result := True;
end; This is in Karamja, if the WalkTo Variable (ToStiles) is True, It walks from the fishing Dock to Stiles, if false, it walks from stiles, back to the dock. However, it keeps stuffing up and stopping half way.