SRL Archive - OSR Help

Walking Problem


Mikkoz99

2013-04-05 18:16:01

I have tried to make DTMs, SPS and some others but I get errors.
I want to make SPS because it looks like the best one.
Here's my code:

program IronMiner;
{$i sps/sps-osr.simba}
{$i srl-osr/srl.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Type in your login-name
Players[0].Pass := ''; //Password
Players[0].Nick := ''; //Your player name shown in-game. Not the first characters of words! eg. 'Bob' = 'ob'
Players[0].Pin := ''; //Bank PIN
Players[0].Active:=True; //Ignore this
end;



procedure WalkTo;
var
PointWalkTime:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['12_7']);
myPath := [Point(4990, 3187), Point(5002, 3161), Point(4994, 3129),
Point(4992, 3091), Point(4995, 3067), Point(4985, 3035), Point(4975, 3003), Point(4965, 2983), Point(4937, 2965), Point(4907, 2971), Point(4882, 2971),
Point(4858, 2966), Point(4842, 2972), Point(4841, 2998)];
end;


begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
SPS_Setup;
WalkTo;
end.
and I get this error:

[Error] C:\Simba\Includes\sps/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
Compiling failed.

and

[Error] (25:3): Unknown identifier 'myPath' at line 24
Compiling failed.

I have SPS latest
oh and I'm trying to make it for old school rs.

NKN

2013-04-05 18:24:06

For the first one.
You're running sps-osr.simba, not your script.

For the second, rename myPath to PointWalkTime

Mikkoz99

2013-04-05 18:27:48

Thanks for the help, but
When I run the script, it opens sps-osr.simba in a new tab and I get the error

[Error] C:\Simba\Includes\sps/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
Compiling failed.

and script doesn't load.

Sjoe

2013-04-05 18:27:50


program IronMiner;
{$i sps/sps-osr.simba}
{$i srl-osr/srl.simba}


call srl include first

program IronMiner;
{$i srl-osr/srl.simba}
{$i sps/sps-osr.simba}

Mikkoz99

2013-04-05 18:31:07

Thanks.
Now it says:

[Hint] C:\Simba\Includes\sps/sps-osr.simba(480:3): Variable 'Z' never used at line 479
[Hint] C:\Simba\Includes\sps/sps-osr.simba(482:3): Variable 'DEGREEFIX' never used at line 481
[Hint] C:\Simba\Includes\sps/sps-osr.simba(483:3): Variable 'FINDPOINT' never used at line 482
Compiled successfully in 312 ms.
SRL Compiled in 0 msec
Successfully executed.

So I will try to add smart and run it.

Sjoe

2013-04-05 18:36:18

From: Mikkoz99
Thanks.
Now it says:

So I will try to add smart and run it.


Those are just hints, ignore it.
U gotta call the walking function though.


procedure WalkTo;
var
PointWalkTime:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['12_7']);
PointWalkTime := [Point(4990, 3187), Point(5002, 3161), Point(4994, 3129),
Point(4992, 3091), Point(4995, 3067), Point(4985, 3035), Point(4975, 3003), Point(4965, 2983), Point(4937, 2965), Point(4907, 2971), Point(4882, 2971),
Point(4858, 2966), Point(4842, 2972), Point(4841, 2998)];

SPS_WalkPath(PointWalkTime); // this will make it walk.
end;

Mikkoz99

2013-04-05 18:40:33

Hmm it still doesn't do anything
The script is running but it does nothing.?

procedure WalkTo;
var
PointWalkTime:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['12_7']);
PointWalkTime := [Point(4990, 3187), Point(5002, 3161), Point(4994, 3129),
Point(4992, 3091), Point(4995, 3067), Point(4985, 3035), Point(4975, 3003), Point(4965, 2983), Point(4937, 2965), Point(4907, 2971), Point(4882, 2971),
Point(4858, 2966), Point(4842, 2972), Point(4841, 2998)];

SPS_WalkPath(PointWalkTime); // this will make it walk.
end;

Mikkoz99

2013-04-05 19:03:54

GOT IT TO WALK. Don't know how, but

procedure WalkTo;
var
PointWalkTime:TPointArray; // not an integer;
begin
MakeCompass('N');
SPS_Setup(RUNESCAPE_SURFACE,['12_7']); // call this once in your mainloop (unless u have multiple paths
PointWalkTime := [Point(4975, 3196), Point(4994, 3181), Point(5006, 3164), Point(4999, 3142), Point(4995, 3117), Point(4993, 3089), Point(4990, 3056), Point(4976, 3016), Point(4964, 2973), Point(4920, 2967), Point(4880, 2969), Point(4848, 2971), Point(4843, 2997)];
SPS_WalkPath(PointWalkTime);
end;
Thanks very much for helping!!! Soon I can release this :D:D