SRL Archive - Help

SPS walking not working


The Divided

2012-12-15 15:27:49

Hey, little problem. Trying to get my script to walk, but it doesn't seem to want to. Here's a little breakdown of my script(only the walking).

Program Walk;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba} {$i srl/srl/misc/smartgraphics.simba}
{$i srl/srl/misc/debug.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Bank PIN
Member := true;
Active := true;
end;
end;
Var
myPath:TPointArray;
begin
SetUpSRL;
ActivateClient;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['0_2']);//SPS Areas
myPath := [Point(239, 172), Point(271, 172), Point(292, 176),
Point(292, 197), Point(288, 227), Point(285, 249), Point(288, 270),
Point(299, 287), Point(314, 307), Point(338, 327), Point(363, 337),
Point(379, 352), Point(378, 389), Point(395, 396), Point(418, 396),
Point(445, 392), Point(467, 386), Point(475, 382)];//Path
SPS_WalkPath(myPath);
end.

Using the map 0_2, as it's gonna walk from bank to altar att the moonclan island.

Any ideas why it isn't walking?

Prometheus

2012-12-15 16:12:36

Have you tried removing the extra SetupSRL?

The Divided

2012-12-15 16:15:02

Will try first thing in the morning! Used my teleport already and can only do so once a day, and im way to lazy to go back :)

Prometheus

2012-12-15 16:16:59

Haha! Well GL! If it doesn't work, then tell us :D

Wardancer

2012-12-15 16:48:38

You might need to make your own custom SPS map as the world map ones are fairly buggy so don't spend too much time scratching your head. Don't worry, it isn't as difficult as it sounds. There are quite a few excellent tutorials regarding this matter.

The Divided

2012-12-15 18:48:13

Tried all the above, nothing worked… :/

DannyRS

2012-12-15 18:58:07

From: The Divided
Tried all the above, nothing worked… :/


You should make a cut from the full surface, and make sure your map is correct by polling your position,

Your path points look like quite large numbers for a individual map tile, did you definetly make them correctly?

Edit - try calling this, and compare where you are, to where your Sps path maker puts you (note sps wont work if you have smart disabled as it cant see the graphics, and compass must be set to exact north for a accurate result,

Var Done: Boolean;

Repeat
Writeln(toStr(SPS_GetMyPos));
Until Done;

Google

2012-12-16 13:55:29


program new;
{$define smart}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i srl/srl/misc/smartgraphics.simba}

const
debug = true;

var
mypath: tpointarray;

status: string;

procedure spspaths;
begin
mypath := [point(239, 172), point(271, 172), point(292, 176),point(292, 197), point(288, 227), point(285, 249), point(288, 270),point(299, 287), point(314, 307), point(338, 327), point(363, 337),point(379, 352), point(378, 389), point(395, 396), point(418, 396),point(445, 392), point(467, 386), point(475, 382)];
end;

procedure declareplayers;
begin
howmanyplayers := 1;
numberofplayers(howmanyplayers);
currentplayer := 0;

with players[0] do
begin
name := '';
pass := '';
nick := '';
pin := '';
member := true;
active := true;
end;
end;

procedure walkpath;
begin

if debug then
writeln('location position and walking to area');

if sps_walkpath(mypath) then
status := 'walking to the area'
else begin
status :='failed walking to the area';
writeln(status + ' + time running:' +timerunning);

end;
writeln(status + ' + time running:' +timerunning);
end;

begin
spspaths;

setupsrl;

declareplayers;
loginplayer;

clicknorth(srl_angle_high);

sps_setup(runescape_surface,['0_2']);
sps_debug := true;

walkpath;

repeat
until(false)
end.

I re-wrote the above for you, where is this path going to?

Edit: Are you using this for a private server if so SPS will not work unless modified.