SRL Archive - Reflection Help

Walking in reflection


Smarter Child

2011-06-24 17:48:03

I am just curious about the walking functions people are using in their ref scripts, is WalkPath reliable, or should I just use an array of tiles with WalkToTile, etc.

I haven't been around for a looooooong time, and last time I was here, I think WalkPath was one of the best functions.

Correct me if I am wrong or feel free to add your suggestions, share your functions :p

I feel like a nub again :redface:

Flight

2011-06-24 21:21:30

The way I do it is have WalkPath as the primary walking procedure, and r_webwalk (blind walk) as the back up. I would put in area-checkers that check where you are based on what stage of the script you are currently doing, and that tells you which way to go from your current location. So if you get disconnected/random event while walking, the area check would find out and blindly walk to the next stage destination.

KingKong

2011-06-24 22:50:10

From: Smarter Child
I am just curious about the walking functions people are using in their ref scripts, is WalkPath reliable, or should I just use an array of tiles with WalkToTile, etc.

I haven't been around for a looooooong time, and last time I was here, I think WalkPath was one of the best functions.

Correct me if I am wrong or feel free to add your suggestions, share your functions :p

I feel like a nub again :redface:


Walkpath is still the best if you pick the tiles properly, the only problem is in case if theres a random event, though that never happened to me.

Awkwardsaw

2011-06-24 22:59:20

this is my function. it's suposed to click the next tile as soon as it's on the minimap. With this you can start the function in the middle of the path. It's reliable, and I use it in all my reflection scripts

function a_WalkPath(path : TTileArray) : Boolean;
var
i, c : Integer;
tp, ntp : TPoint;
begin
if RunEnergy(50) then setrun(true);
if MeNearTile(path[high(path)], 5) then
begin

result := true;
exit;
end;
for i := 0 to high(path) do
begin
tp := TileToMM(path[i]);
if i < high(path) then
begin
ntp := TileToMM(path[i + 1]);
if MeNearTile(tile(ntp.x, ntp.y), 1) then
continue;
end;
if not rs_OnMinimap(tp.x, tp.y) then
begin
A_Debug('tile not on map: ' + inttostr(i));
continue;
end;
mouse(tp.x, tp.y, 5, 5, true);
if i < high(path) then
begin
ntp := TileToMM(path[i + 1]);
while not rs_OnMinimap(ntp.x, ntp.y) do
begin
ntp := TileToMM(path[i + 1]);
wait(100 + random(50));
r_findrandoms;
inc(c);
if c > 300 then
begin
result := false;
exit;
end;
if not ismoving then continue;
end;
end else
r_flag;
end;
result := true;
a_debug('At location!');
end;

Drakan

2011-06-24 23:13:39

From: Awkwardsaw
this is my function. it's suposed to click the next tile as soon as it's on the minimap. With this you can start the function in the middle of the path. It's reliable, and I use it in all my reflection scripts


Thats how WalkPath works IIRC :) Anyway afaik WalkPath still works great!

Awkwardsaw

2011-06-24 23:28:01

From: drags111
Thats how WalkPath works IIRC :) Anyway afaik WalkPath still works great!


last time i used walkpath(right when reflection came out again) it stopped when it got to the tile, and couldnt start in the middle of path. I've been using mine ever since(it also allowed me to customise it per script) ;)

Drakan

2011-06-25 00:12:46

Well I just tested it and it started in the mid of path and doesnt stop :S

Awkwardsaw

2011-06-25 00:18:34

From: drags111
Well I just tested it and it started in the mid of path and doesnt stop :S


like i said, when reflection just came out ;) i haven't even used it since

Smarter Child

2011-06-25 00:43:19

Been experimenting with ref walking and yeah I found WalkPath to be very reliable

@awkwardsaw - Thanks for the function. If walkpath ever fails me I'll be sure to use yours + cred

Jakkle

2011-06-25 07:16:03

When I use to use walkpath I liked the walking and how if you are in the middle of the path it doesn't go to the start tile but goes to the closest tile to the players location and heads to the end point. After using it for a while tho Rogeruk and I realized there was alot of cpu useage (Memory leaks).
So my question: does no1 get memory leaks when using walkpath anymore ?

Flight

2011-06-25 07:59:31

Drags was saying they fixed a hefty amount of memory leaks. I wonder how the new WalkPath will work…

Smarter Child

2011-06-25 16:13:56

I've been using WalkPath at the moment, and I haven't got any memory leaks/issues so far. In fact, the walking has been near flawless, and I hardly needed to fail safe it :)

Jakkle

2011-06-25 23:12:52

From: Smarter Child
I've been using WalkPath at the moment, and I haven't got any memory leaks/issues so far. In fact, the walking has been near flawless, and I hardly needed to fail safe it :)


Well if thats the case I will try it out again :)

Smarter Child

2011-06-26 21:56:39

From: whacko999
Well if thats the case I will try it out again :)


I've noticed my simba is crashing after about 4-5 hours, I think they're memory leaks :confused:

Rich

2011-06-27 03:16:13

From: Smarter Child
I've noticed my simba is crashing after about 4-5 hours, I think they're memory leaks :confused:
Like already said, in R2 a hefty amount of leaks have been fixed.

Jakkle

2011-06-28 11:25:01

From: Smarter Child
I've noticed my simba is crashing after about 4-5 hours, I think they're memory leaks :confused:


Yup thats what happened to me every so many hours. Got confused a bit and thought it was simba its self. Then Rogeruk pointed out that the cpu was going crazy when walking in to the trees and back, at no other point was it doing that to the cpu. Its a good idea to get a cpu, ram and heat widget on your desktop :D

Flight

2011-06-28 11:38:42

From: whacko999
Yup thats what happened to me every so many hours. Got confused a bit and thought it was simba its self. Then Rogeruk pointed out that the cpu was going crazy when walking in to the trees and back, at no other point was it doing that to the cpu. Its a good idea to get a cpu, ram and heat widget on your desktop :D


That's how I was monitoring Simba on my previous laptop. It sure was a killer using WalkPath, and everyone who had used my scripts agreed on that. This is why I've been looking into BlindWalking. But in any case, I'm holding my breath on Reflection 2. ;)

Jakkle

2011-06-28 11:53:17

From: Flight
That's how I was monitoring Simba on my previous laptop. It sure was a killer using WalkPath, and everyone who had used my scripts agreed on that. This is why I've been looking into BlindWalking. But in any case, I'm holding my breath on Reflection 2. ;)


It's more of the matter of when it comes out :rolleyes: So don't hold your breath for to long you might die :eek: :P I'm sure it will be amazing when it comes out like getting a new toy :spot: haha, can't wait :D

Smarter Child

2011-06-28 16:10:34

I found a work around for me, in ubuntu I gave gave Simba a greater memory priority and it hasn't crashed since.