SRL Archive - OSR Help

Problem with SPS path creator


jman1208

2012-07-06 21:00:21

I am getting no errors from the script but i cannot get walking when i use the surface 7_7 but when i use 6_7, and 6_6 it works (walks) fine until it gets to the area of the map where 7_7 is and then stops and gives me this after waiting a good 10 seconds

(i'm making a simple flax picker)


The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, 6]


Procedure walktofield;
begin;
If (not LoggedIn) Then
Exit;
FindNormalRandoms;
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');
SetupSRL;
Writeln('Walking to Field')
SPS_Setup(RUNESCAPE_SURFACE, ['7_7','6_7','6_6','7_6']);
myPath := [Point(2737, 2677), Point(2737, 2689), Point(2737, 2700),
Point(2740, 2715), Point(2741, 2731),
Point(2741, 2748), Point(2741, 2768), Point(2742, 2782), Point(2746, 2800),
Point(2747, 2820), Point(2753, 2842), Point(2756, 2858),
Point(2767, 2884), Point(2802, 2871)];
SPS_WalkPath(mypath);
Writeln('Arrived at the field')
Wait(5000);
end;

Brandon

2012-07-06 21:03:19

Try making the path manually rather than using the path creator. Usually fixes the problem for me. Not sure that the path creator works for SPS 2.x+

jman1208

2012-07-06 21:12:13

okay i will try that thanks, i think it may be a problem with the map because when i take out 7_7 it works fine until it gets to that point like i previously stated

Brandon

2012-07-06 21:15:50

You do not need to setup sps in every function. Do it once at the very start and that's it. Otherwise you're going to find yourself lagging from loading the same bitmaps over and over:


Procedure WalkToField;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
Writeln('Walking to Field');
myPath := [Point(2737, 2677), Point(2737, 2689), Point(2737, 2700), Point(2740, 2715), Point(2741, 2731), Point(2741, 2748), Point(2741, 2768), Point(2742, 2782), Point(2746, 2800), Point(2747, 2820), Point(2753, 2842), Point(2756, 2858), Point(2767, 2884), Point(2802, 2871)];
SPS_WalkPath(mypath);
Writeln('Arrived at the field') Wait(5000);
end;

begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['7_7', '6_7', '6_6', '7_6']);

SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');

WalkToField;
end.

Mat

2012-07-06 21:25:17


SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');
in stead of that
use

ClickNorth(SRL_Angle_High);
Mat

jman1208

2012-07-06 21:34:44

From: Brandon
You do not need to setup sps in every function. Do it once at the very start and that's it. Otherwise you're going to find yourself lagging from loading the same bitmaps over and over:


Procedure WalkToField;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
Writeln('Walking to Field');
myPath := [Point(2737, 2677), Point(2737, 2689), Point(2737, 2700), Point(2740, 2715), Point(2741, 2731), Point(2741, 2748), Point(2741, 2768), Point(2742, 2782), Point(2746, 2800), Point(2747, 2820), Point(2753, 2842), Point(2756, 2858), Point(2767, 2884), Point(2802, 2871)];
SPS_WalkPath(mypath);
Writeln('Arrived at the field') Wait(5000);
end;

begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['7_7', '6_7', '6_6', '7_6']);

SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');

WalkToField;
end.


Ok thanks for that tip i added it and it still wont work and now im getting this
The following bitmaps were not freed: [3]


From: Mat

SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');
in stead of that
use

ClickNorth(SRL_Angle_High);
Mat


Thanks for that i added it but it still won't work, it works without 7_7 and 7_6 but only goes halfway till it gets into the 7_7 area. Ive been trying to get this to work for over an hour :\ its my first script and i really want to get better at scripting so any help is greatly appreciated!

Sir Ducksworthy

2012-07-07 01:07:26

Btw you can open the maps in paint and use the coordinates it displays on the bottom left of the window, since they are actually the coordinates Sps will be using ;) that's what I done when making the map for soul wars.. it just takes a little longer it's better than grabbing your coordinates in game and writeln();'ing them.