SRL Archive - OSR Help

Using BlindWalk - How to look less robotic?


Cage

2013-10-01 13:03:16

Hey there! I currently using blindwalk from the minireflection include. How do I go about making my character walk to the next flag before he reaches the current so my walking looks more human and less robotic? Thanks!

This is what I currently have.



procedure Walking;
begin
Writeln('Point' + ToStr(R_GetTileGlobal));
blindwalk(Point(2776 + random(1), 3128 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2787 + random(1), 3125 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2797 + random(1), 3120 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2810 + random(1), 3121 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2818 + random(1), 3114 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2819 + random(1), 3104 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2828 + random(1), 3098 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2835 + random(1), 3089 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2843 + random(1), 3081 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2849 + random(1), 3072 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2851 + random(1), 3059 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2852 + random(1), 3044 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2861 + random(1), 3039 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2865 + random(1), 3029 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
blindwalk(Point(2867 + random(1), 3021 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();

end;








Hoodz

2013-10-01 13:09:49

 procedure walking;
begin
blindwalk(Point(2867 + random(1), 3021 + random(1)));
sleep(100 + random(200));
FindNormalRandoms();
end;

it finds automatic a way so you only have to use the last tile.

if it get stuck always at the same point i suggest to add a blindwalk point at the point where it gets stuck. from there you blindwalk to your last point

Cage

2013-10-01 13:24:09

Much appreciated. How do I go about making it click before it reaches the flag? Because as it stands, it's very start stoppy. :)

Hoodz

2013-10-01 13:35:06

From: Cage
Much appreciated. How do I go about making it click before it reaches the flag? Because as it stands, it's very start stoppy. :)


works good for me. just only use blindwalk once, not for every tile. use instead walkpath([]) if you want to walk with those tiles

Cage

2013-10-01 13:41:51

From: hoodz
works good for me. just only use blindwalk once, not for every tile. use instead walkpath([]) if you want to walk with those tiles


Alright, ill give it a shot. Thanks! By the way.. great job on the reflection include. :)

Hoodz

2013-10-01 13:58:19

From: Cage
Alright, ill give it a shot. Thanks! By the way.. great job on the reflection include. :)


i didnt made the functions, i just put the most needed functions in a include and an auto updater for the hooks
i manually update the hooks :)

Flight

2013-10-01 19:52:06

Since in that include blindWalk() basically makes a random TPA between your current location and destination, then passes that TPA to walkPath() then you'd want to modify walkPath() as it handles the actual walking. You'll find some "FFlags()" in there and that's what you will change. FFlag waits until you're within a certain distance from the flag on the MM before clicking the next walking tile. For example:

FFlag(0);
^ This will wait until you've arrived exactly at the flag (0 distance);

FFlag(5);
^ And this will wait until you've arrived 5 pixels (presumed to be 5 tiles) from the flag, before clicking the next tile in the path.

Cage

2013-10-01 21:55:56

From: Flight
Since in that include blindWalk() basically makes a random TPA between your current location and destination, then passes that TPA to walkPath() then you'd want to modify walkPath() as it handles the actual walking. You'll find some "FFlags()" in there and that's what you will change. FFlag waits until you're within a certain distance from the flag on the MM before clicking the next walking tile. For example:

FFlag(0);
^ This will wait until you've arrived exactly at the flag (0 distance);

FFlag(5);
^ And this will wait until you've arrived 5 pixels (presumed to be 5 tiles) from the flag, before clicking the next tile in the path.


Thanks, that was a big help!