Something like this? Didn't test, probably a more efficient way as well.
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function WalkToPath(Path: TPointArray): Boolean;
By: Nicbaz + Some of Zeph
Description: Loads the path you select then walks it.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function WalkToPath(Path: TPointArray): Boolean;
var
I: integer;
Last, II, Dist: Integer;
P: TPoint;
DoTile: Integer;
begin
case random(3) of
1: SetRun(true);
end;
P := GetMyPos;
Last := 1 shl 20;
for II := 0 to High(Path) do
begin
Dist := Distance(P.x, P.y, Path[II].x, Path[II].y);
if (Dist > Last) then Continue;
Last := Dist;
DoTile := II;
end;
if (not(WalkToTile(Path[DoTile], 1, 10))) then
begin
WriteLn('Too far from Path to start walking...');
Result:= False;
Exit;
end else
for I := DoTile + 1 to High(Path) do
begin
if not (WalkToTile(Path[i],1 , 3)) then
begin
Exit;
Result:= False;
end else
begin
Flag;
end;
end;
Result := True;
FindNormalRandoms;
End;
Function GetPath(where : string) : TPointArray;
begin
case where of
'LumbyToVarrock':
begin
Result := [Point(3230, 3217), Point(3236, 3224), Point(3252, 3224),
Point(3260, 3238), Point(3253, 3251), Point(3248, 3266),
Point(3241, 3280), Point(3239, 3293), Point(3240, 3305),
Point(3250, 3316), Point(3263, 3324), Point(3268, 3331),
Point(3256, 3334), Point(3241, 3335), Point(3228, 3338),
Point(3226, 3352), Point(3217, 3361), Point(3214, 3375),
Point(3212, 3389), Point(3212, 3405), Point(3211, 3420),
Point(3212, 3425)];
end;
'LumbyToFally':
begin
Result := [Point(3231, 3217), Point(3226, 3232), Point(3220, 3246),
Point(3216, 3261), Point(3213, 3277), Point(3198, 3278),
Point(3184, 3286), Point(3169, 3286), Point(3153, 3292),
Point(3139, 3294), Point(3123, 3296), Point(3108, 3294),
Point(3093, 3289), Point(3078, 3284), Point(3067, 3275),
Point(3051, 3276), Point(3035, 3275), Point(3019, 3276),
Point(3009, 3288), Point(3006, 3303), Point(3007, 3318),
Point(3006, 3333), Point(3008, 3348), Point(3011, 3355)];
end;
'LumbyToDraynor':
begin
Result := [Point(3219, 3216), Point(3234, 3217), Point(3232, 3228),
Point(3222, 3236), Point(3206, 3236), Point(3192, 3235),
Point(3178, 3234), Point(3163, 3231), Point(3146, 3229),
Point(3129, 3228), Point(3113, 3232), Point(3099, 3241),
Point(3093, 3241)];
end;
'DraynorToFally':
begin
Result := [Point(3082, 3248), Point(3080, 3263), Point(3071, 3273),
Point(3057, 3274), Point(3041, 3275), Point(3026, 3276),
Point(3010, 3278), Point(3008, 3293), Point(3008, 3308),
Point(3007, 3323), Point(3007, 3338), Point(3007, 3351),
Point(3011, 3354)];
end;
'DraynorToVarrock':
begin
Result := [Point(3099, 3249), Point(3104, 3259), Point(3106, 3273),
Point(3108, 3288), Point(3118, 3296), Point(3132, 3294),
Point(3145, 3292), Point(3159, 3288), Point(3173, 3285),
Point(3188, 3282), Point(3202, 3278), Point(3215, 3269),
Point(3222, 3259), Point(3238, 3260), Point(3245, 3273),
Point(3238, 3285), Point(3240, 3299), Point(3247, 3312),
Point(3259, 3321), Point(3268, 3331), Point(3254, 3334),
Point(3239, 3336), Point(3226, 3340), Point(3224, 3356),
Point(3214, 3369), Point(3212, 3384), Point(3211, 3399),
Point(3211, 3414), Point(3212, 3426)];
end;
'DraynorToLumby':
begin
Result := [Point(3099, 3249), Point(3105, 3238), Point(3110, 3225),
Point(3126, 3225), Point(3140, 3230), Point(3155, 3233),
Point(3170, 3237), Point(3185, 3241), Point(3199, 3246),
Point(3215, 3246), Point(3224, 3235), Point(3231, 3223),
Point(3222, 3216)];
end;
'FallyToDraynor':
begin
Result := [Point(2976, 3378), Point(2989, 3370), Point(3000, 3361),
Point(3004, 3347), Point(3008, 3332), Point(3008, 3316),
Point(3007, 3301), Point(3008, 3287), Point(3014, 3275),
Point(3027, 3268), Point(3043, 3269), Point(3058, 3274),
Point(3073, 3268), Point(3080, 3254), Point(3080, 3248)];
end;
'FallyToVarrok':
begin
Result := [Point(2965, 3392), Point(2965, 3406), Point(2977, 3415),
Point(2987, 3422), Point(2999, 3432), Point(3014, 3428),
Point(3029, 3426), Point(3041, 3417), Point(3054, 3410),
Point(3068, 3416), Point(3082, 3414), Point(3094, 3421),
Point(3109, 3420), Point(3123, 3415), Point(3139, 3416),
Point(3154, 3417), Point(3167, 3425), Point(3182, 3428),
Point(3198, 3428), Point(3211, 3428)];
end;
'FallyToLumby':
begin
Result := [Point(2974, 3378), Point(2987, 3372), Point(3001, 3363),
Point(3005, 3350), Point(3007, 3335), Point(3008, 3321),
Point(3009, 3307), Point(3011, 3292), Point(3013, 3277),
Point(3028, 3275), Point(3044, 3275), Point(3059, 3276),
Point(3074, 3277), Point(3088, 3282), Point(3104, 3281),
Point(3105, 3265), Point(3105, 3250), Point(3107, 3235),
Point(3119, 3226), Point(3134, 3226), Point(3149, 3228),
Point(3164, 3232), Point(3178, 3236), Point(3194, 3236),
Point(3210, 3236), Point(3225, 3232), Point(3232, 3219),
Point(3222, 3216)];
end;
'VarrockToFally':
begin
Result := [Point(3204, 3429), Point(3188, 3428), Point(3174, 3428),
Point(3162, 3419), Point(3148, 3416), Point(3132, 3416),
Point(3117, 3419), Point(3109, 3420), Point(3094, 3419),
Point(3082, 3414), Point(3069, 3417), Point(3054, 3413),
Point(3040, 3421), Point(3030, 3427), Point(3015, 3430),
Point(3000, 3431), Point(2988, 3427), Point(2986, 3413),
Point(2977, 3404), Point(2967, 3393), Point(2964, 3380)];
end;
'VarrokToDraynor':
begin
Result := [Point(3212, 3417), Point(3212, 3402), Point(3212, 3389),
Point(3213, 3375), Point(3219, 3363), Point(3227, 3353),
Point(3227, 3338), Point(3241, 3336), Point(3255, 3332),
Point(3267, 3330), Point(3256, 3321), Point(3246, 3311),
Point(3239, 3298), Point(3239, 3283), Point(3246, 3269),
Point(3242, 3261), Point(3227, 3260), Point(3219, 3250),
Point(3205, 3245), Point(3190, 3243), Point(3176, 3240),
Point(3161, 3234), Point(3147, 3230), Point(3134, 3226),
Point(3118, 3226), Point(3105, 3233), Point(3101, 3243),
Point(3088, 3247), Point(3080, 3249)];
end;
'VarrockToLumby':
begin
Result := [Point(3212, 3417), Point(3212, 3402), Point(3212, 3389),
Point(3213, 3375), Point(3219, 3363), Point(3227, 3353),
Point(3227, 3338), Point(3241, 3336), Point(3255, 3332),
Point(3267, 3330), Point(3256, 3321), Point(3246, 3311),
Point(3239, 3298), Point(3239, 3283), Point(3247, 3272),
Point(3249, 3259), Point(3255, 3246), Point(3260, 3232),
Point(3252, 3224), Point(3239, 3224), Point(3236, 3217),
Point(3221, 3217)];
end;
'LumbyToAlkarid':
begin
Result := [Point(3224, 3217), Point(3235, 3219), Point(3237, 3225),
Point(3251, 3224), Point(3259, 3233), Point(3256, 3245),
Point(3249, 3257), Point(3246, 3271), Point(3240, 3281),
Point(3239, 3293), Point(3240, 3305), Point(3248, 3313),
Point(3258, 3322), Point(3268, 3330), Point(3277, 3332),
Point(3283, 3322), Point(3278, 3314), Point(3277, 3303),
Point(3274, 3291), Point(3275, 3279), Point(3273, 3267),
Point(3276, 3256), Point(3273, 3243), Point(3271, 3229),
Point(3272, 3218), Point(3272, 3205), Point(3267, 3194),
Point(3266, 3185), Point(3266, 3174), Point(3270, 3166)];
end;
'AlkaridToDryanor':
begin
Result := [Point(3274, 3167), Point(3280, 3178), Point(3283, 3191),
Point(3274, 3196), Point(3271, 3206), Point(3270, 3218),
Point(3272, 3229), Point(3274, 3243), Point(3273, 3253),
Point(3273, 3264), Point(3272, 3278), Point(3272, 3291),
Point(3276, 3302), Point(3280, 3315), Point(3281, 3325),
Point(3272, 3331), Point(3263, 3324), Point(3252, 3319),
Point(3247, 3311), Point(3239, 3302), Point(3239, 3289),
Point(3242, 3276), Point(3247, 3269), Point(3251, 3259),
Point(3254, 3249), Point(3259, 3242), Point(3260, 3229),
Point(3252, 3224), Point(3237, 3223), Point(3234, 3216),
Point(3222, 3217)];
end;
end;
End;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function Walk(Where: string): boolean;
By: Nicbaz
Description: Loads the path you select then walks it.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function R_CityWalk(Where: array of string): boolean;
Var
I : Integer;
Begin
For I := 0 To High(Where) Do
Result := WalkToPath(GetPath(Where[I]));
end;
~Sandstorm