Using SPS
or: How I Learned to Stop Worrying and Love BlindWalk
In this tutorial, I am going to teach you how I use SPS to walk anywhere. I am going to give two examples, one from the live game and one from the Old School version.
Example # 1:
Let's say that I want to walk to the crafting wheel in Burthorpe from the bank chest and back. A quick scroll through the Surface folder will show me that there's a very nice map piece that includes both of our points of interest:
We want to move specifically between these two points:
But of course, it is not possible to move in a straight path between these points, because there is a ditch around the banking area, and there are smithing furnaces between the wheel and the bank. So, you would most likely follow a path like this:
And here is what I do to walk this path:
First, add the necessary setup lines:
Simba Code:
Procedure Setup;
Begin
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
SetupSRL; //You need to setup srl before anything else
SPS_Setup(runescape_surface,['8_6']); //the map we used is in the surface folder, and is named 8_6
SPS_AnyAngle := True; //I want to use this map with a different angle, so I set it true
SPS_Debug := True; //this will debug everything SPS is doing
DeclarePlayers;
LoginPlayer;
MakeCompass('S'); //this will work because any angle is set to true
SetAngle(SRL_Angle_high); //high angle
End;
This is our Setup procedure. This will be called as the script starts.
Now, to the actual walking.
I like using BlindWalk with SPS instead of paths. BlindWalk lets you walk between two points that are not necessarily visible in the minimap at the same time. Blindwalk is useful because it generates the path
as it walks, preventing your script from failing just because a point is not visible.
BlindWalk is useful for walking between two points that lie on a straight path, without obstacles. Here is how I would use BlindWalk to walk to a point that is not visible in the minimap:
Simba Code:
procedure RandomWalk;
begin
repeat
Wait(600);
until (SPS_Blindwalk(Point(500, 500)));
WaitNotMoving(False);
end;
I am making it loop until the blindwalk function returns True, which only happens if SPS_GetMyPos's result at the end of the path is (00,500) in this case.
If you have SPS_Debug set to true, this is the sort of Debug you would see while this function runs:
Progress Report:
[00:00:30]: Rotating map took 0 ms.
[00:00:31]: SPS_GetMyPos: Finished in 625 ms. Result = (3366, 2482)
[00:00:31]: Rotating map took 0 ms.
[00:00:31]: SPS_GetMyPos: Finished in 640 ms. Result = (3366, 2482)
[00:00:36]: Rotating map took 0 ms.
[00:00:37]: SPS_GetMyPos: Finished in 610 ms. Result = (3386, 2518)//different coordinate- it has moved!
[00:00:37]: Rotating map took 16 ms.
[00:00:38]: SPS_GetMyPos: Finished in 610 ms. Result = (3386, 2522)
[00:00:41]: Rotating map took 0 ms.
[00:00:42]: SPS_GetMyPos: Finished in 610 ms. Result = (3354, 2546)//the debug stops here because the final point is reached
(notice: I copied this off while my script was running, so this is debug from an actual path. It also has timestamps, unrelated)
But, of course, we want to walk a real path! TO walk a path, you first need to have points on the path. What I do is, with my character logged in and at the location I want to walk at, I call SPS_GetMyPos. IF you have set debug to true, then this will tell you your character's coordinates in the debug box.
So, after copying off the Setup procedure I have above you could run this as your mainloop:
Simba Code:
begin
Setup;
SPS_GetMyPos;
end;
And get the coordinates in your debug box. This should be pretty accurate in all angles, coordinates may vary by 4-5 points so you can't land at an exact tile, but it's good enough.
A good path should have points (nodes) at locations that you can walk straight inbetween. Here's where I would pick my nodes for the Burthorpe area:
The large red dots are my starting/ending points, and the blue points are my nodes. While making my script I collected the following points for my path:
By the chest: (3354, 2486)
First node away from chest: (3390, 2518)
Second note, closer to the wheels: (3365, 2518)
By the wheels: (3334, 2586)
After a long phase of testing I decided that the second node is unnecesary and decreases the xp/h, so I did not use it :P It is included in this tutorial anyway, you better be safe when first making the script.
Here is the procedure that walks from he chest to the wheel:
Simba Code:
procedure WalktoOven;
begin
repeat
Wait(600);
until (SPS_Blindwalk(Point(3390, 2518))); //first (and only) node
repeat
Wait(600);
until (SPS_Blindwalk(Point(3334, 2586))); //coordinates of the wheels
WaitNotMoving(False);
end;
And here is the one that walks back:
Simba Code:
procedure WalktoBank;
begin
repeat
Wait(600);
until (SPS_Blindwalk(Point(3390, 2518)));
repeat
Wait(600);
until (SPS_Blindwalk(Point(3354, 2486)));
WaitNotMoving(False);
end;
For the chest, I did not get the coordinate right next to the chest, because that could make me walk all the way around the ditch. Instead, I am using a point that is a bit away from the chest, but still inside the ditch.
Anyway, this should be enough to let you walk this distance.
Example # 2:
ASuuming you have read the previous example, this one will be for OSRS and I will use a custom map.
I use
this SPS for OSRS.
I want to walk to Port Sarim from Draynor for a law crafter. First, I make a custom map: (you can find a tutorial for this easily. For this map, I merged sections from the SPS I linked you above)
Then, I gather points. For this path, I have 5 points, because there are things to be avoided. Here is the procedure I made:
Simba Code:
procedure Mainland1;
begin
SPS_Setup(runescape_surface, ['sarimdraynor']); //I put the file in the 07surface folder per the requirements of the SPS I am using. sarimdraynor is the name of the file
repeat
Wait(600);
until (SPS_Blindwalk(Point(192,148))); //center of draynor square I believe
repeat
Wait(600);
until (SPS_Blindwalk(Point(148,60))); //the "corner", south east of the cabbage patch, I take a sharp turn here and head south
repeat
Wait(600);
until (SPS_Blindwalk(Point(120,104))); //some spot on the docks that falls on a straight line from the "corner"
repeat
Wait(600);
until (SPS_Blindwalk(Point(88,204))); //the part of the docks with the entrana monks
end;
You can test this path if you want, I have used it for many hours without problems. Not to mention that I am giving a quarter of a law runner away for free