Log in

View Full Version : SPS_WalkPath(): Waits few seconds after walking done



Gala
02-22-2012, 11:41 PM
Hey guys.

Everytime my script does a SPS_WalkPath(myPath); (successful),
it waits for 6-10 seconds before it starts the next procedure.

Is there a way to avoid this delay? It looks very bot-like when the player is just standing there for about the same time after a load. :)

- Gala

lilcmp1
02-23-2012, 01:08 AM
If I'm not mistaken it waits till the red flag disappears, 6-10 seconds seems excessive though, are you sure there is not a wait somewhere? Or is it clicking a point you can't exactly walk to? I've noticed this issue when banking in one of my scripts. It clicks on the minimap just inside the bank both so the flag stays on the screen even though I can't actually walk there. If that was the issue you could just change the point.

Gala
02-23-2012, 09:41 AM
Thanks for you answer.
No it walk exactly to the last point of the path. (so the flag disappears)
Then it seems he is stuck in de SPS_walkpath procedure, because the next step would move the mouse immedately. Is there a Setup procedure to setup SPS or something?

okokokok
02-23-2012, 09:44 AM
Could you post the piece of code? Because without that we can't really see what is wrong. If you post it, i'll take a look into it

Gala
02-23-2012, 04:40 PM
@okokokok

oh sry, I haven't even posted a snippet. Here is the function:

function WalkToYew: Boolean;
var myPath: TPointArray;
begin
if not LoggedIn then Exit;
SetScreenMouse(0, '');
SetRun(True);
SPS_Setup(RUNESCAPE_SURFACE,['10_6','10_7','11_7','11_6','9_6']);
myPath := [Point(4212, 2661), Point(4211, 2668), Point(4211, 2674), Point(4211, 2678), Point(4209, 2681), Point(4205, 2683), Point(4199, 2683), Point(4193, 2684), Point(4191, 2690), Point(4191, 2694), Point(4195, 2702), Point(4198, 2705), Point(4200, 2709), Point(4204, 2712), Point(4208, 2714), Point(4208, 2719), Point(4210, 2724), Point(4210, 2728), Point(4209, 2732), Point(4208, 2739), Point(4209, 2744), Point(4210, 2746), Point(4211, 2749), Point(4212, 2752), Point(4213, 2755), Point(4210, 2758), Point(4207, 2761), Point(4206, 2766), Point(4202, 2769), Point(4194, 2769), Point(4191, 2767), Point(4188, 2764), Point(4184, 2760), Point(4183, 2756), Point(4183, 2751), Point(4183, 2748), Point(4097, 2919), Point(4427, 2904), Point(4418, 2576), Point(4099, 2494), Point(3926, 2783), Point(4070, 2783)];
SPS_WalkPath(myPath);
Result := True;
writeln('we are here');
end;

The problem is that it waits 10 seconds before he writes "we are here".

Nebula
02-23-2012, 10:13 PM
If it's a big issue, open your SPS folder and change the code in there.

Gala
02-23-2012, 10:26 PM
@nebula
Yea but this wouldnt solve the problem for other user would it?
I am also curious what it is doing during those seconds, maybe scannen tpoints of the path or something?
Thanks for the answers it isnt a big issue i just hoped someone else had the same problem. :)