SRL Archive - Reflection Help

WalkPath extreme lag


trojan

2011-03-29 04:03:35

I was using the ratinator an ardougne miner the other day, and when walking was needed (the WalkPath function was called) the script would click to the first tile then completely lag up, I think this is due to being stuck in a loop that has no waits. I manually added a few random waits into each loop and this fixed the problem however, every time a reflection update comes out this goes back to the old code.
I have also read about this on a few threads how come waits aren't added for good?

Thanks

HarryJames

2011-03-29 04:12:56

Thinking about it, surely it's a good thing that it goes back to 'factory settings' every update, as there might be a fix/update for WalkPath?

Either that, or you make your own include (literally just making a new SIMBA script, and putting in that function, then including it per script) or just manually update (or make a script :D).

i luffs yeww

2011-03-29 04:15:17

Not really what he's asking, Harry. :p

Anyway. A lot of time waits can make things very.. bot-like. A few minimum waits could be added I'm sure, though. And they could be dynamic (based on how far the next tile is or whatever). Not sure why they aren't yet..

HarryJames

2011-03-29 04:24:32

I have no problem with it, and I have a script that runs from Edgeville bank to level 43 wildy (and it's working rather flawlessly :3). That's not even from my work either, it's from a load of TTiles I have and I just chuck them into WalkPath.

trojan

2011-03-29 05:47:55

hmmm :/ is it not extremely inefficient though to not have waits? this would mean that the script is permanently using the processor and surely it's not bot like if the waits are completely random?

Wait(Random(100));

or am I missing something here?

Home

2011-03-29 06:59:59

I know that this doesn't help that much.
But mabey create your own walkpath?
Search in forums, there are several ones. Well mostly i do use my own or r_WebWalk <3

~Home

Flight

2011-03-29 07:17:34

At first I would have believed you but I found this is something to do with Runescape itself. Trust me when I say this. I was on my main (btw 100% legit, never botted) killing waterfiends for some crimson charms (on the main Runescape client) and I got hit with the same thing. It's like it gives you a 5-10 lag on everything you do, and then all of a sudden either snaps back to regular timing or disconnects you from the game, yes?

I can assure all of you, this is a Runescape issue and has nothing to do with Simba/Smart. It is fairly new though, I've not had this happen to me until just recently, it kinda has my suspicions up, so I highly recommend everyone be on their toes for a while.

Edit: Launch a normal browser and play legit for a while and I promise, maybe not at first or even for a matter of hours, but I promise you you'll run through the same lag even on the normal Runescape client.

Floor66

2011-03-29 09:19:03

There has been a thread about this.
During that thread, I wrote my own and it doesn't lag me:


function f_WalkPath(Path : TTileArray; Invert : Boolean): Boolean;
var
i, j, dest, currTile, m : Integer;
t : TTile;
p : TPoint;
moved, nextOnMM : Boolean;
begin
if (not LoggedIn) or R_FindRandoms then
Exit;
if Invert then
InvertPath(Path);
dest := High(Path);
Result := TileOnMS(Path[dest], 0);
if Result then
Exit;
for i := dest downto 0 do
begin
R_FindRandoms;
if TileOnMM(Path[i]) then
begin
currTile := i;
Break;
end else
currTile := -1;
Wait(10 + Random(50));
end;
if currTile = -1 then
begin
Write('None of the tiles in the path were found!');
Exit;
end;
for i := currTile to dest do
begin
R_FindRandoms;
moved := False;
Result := TileOnMS(Path[dest], 0);
if Result then
Break;
if not nextOnMM then
begin
for j := dest downto (currTile + 1) do
begin
R_FindRandoms;
if TileOnMM(Path[j]) then
begin
currTile := j;
Break;
end else
currTile := -1;
Wait(10 + Random(50));
end;
if currTile = -1 then
begin
Write('None of the tiles in the path were found!');
Exit;
end;
end;
t := RandomizeTile(Path[currTile], 1, 1);
p := TileToMM(t);
Mouse(p.x, p.y, 2, 2, True);
if not WaitToMove(500 + Random(500)) then
begin
MarkTime(m);
while TimeFromMark(m) <= 5000 do
begin
if R_FindRandoms then
begin
f_WalkPath(Path, Invert);
Exit;
end;
if WaitToMove(500 + Random(150)) then
begin
moved := True;
Break;
end;
Wait(10 + Random(50));
end;
if not moved then
Write('We didn''t move!');
end;
nextOnMM := False;
while (GetSpeed > 0) and (not nextOnMM) and (not Result) do
begin
Result := TileOnMS(Path[dest], 0);
R_FindRandoms;
for j := dest downto (currTile + 1) do
begin
R_FindRandoms;
if TileOnMM(Path[j]) then
begin
currTile := j;
nextOnMM := True;
Break;
end;
Wait(10 + Random(50));
end;
Wait(10 + Random(50));
end;
end;
Result := TileOnMS(Path[dest], 0);
if not Result then
Result := WalkToTile(Path[dest], 1, 0);
end;

If you use it, please credit accordingly.

trojan

2011-03-29 12:59:52

I know, but the thing that I don't understand is that if there has been a thread made, how come it hasn't been changed in reflection? I don't understand why it wouldn't have waits in?

This isn't to do with runescape though :S, it's to do with a loop that waits for your character to get near the flag, your character can't get near the flag because the loop has no waits and doesn't allow runescape to have any of your CPU… Its for your script btw flight ;)

Flight

2011-03-29 20:11:03

I simply used WalkPath in reflection.

if not WaitToMove(3000)then
begin
MarkTime(t);
while(TimeFromMark(t) < 7000)do
if(WaitToMove(1000))then break;
if(TimeFromMark(t) >= 7000)then
begin
Writeln('***Didn''t move for 10 seconds. Exiting***');
next := false;
break;
end;
end;
Looks like it waiting to me. :/

trojan

2011-04-01 10:12:34

hmmm :/ dunno what the problem is, cos each time there is an update, I have to add Wait(Random(10)); to each loop… :/

Floor66

2011-04-01 10:18:16

From: Flight
I simply used WalkPath in reflection.

if not WaitToMove(3000)then
begin
MarkTime(t);
while(TimeFromMark(t) < 7000)do
if(WaitToMove(1000))then break;
if(TimeFromMark(t) >= 7000)then
begin
Writeln('***Didn''t move for 10 seconds. Exiting***');
next := false;
break;
end;
end;
Looks like it waiting to me. :/


That's not the kind of waiting we mean. The kind we mean is like a 10ms wait in every single loop.