SRL Positioning System
Status: Working as of December 20th, 2012
Introduction:
SRL Positioning System (a.k.a. SPS) is a 100% color positioning system that allows for easy and accurate color walking. SPS was originally developed by
marpis, and has since been developed by the SRL community. The original SPS thread can be found
here, and the new SPS source can be found
here.
Table of Contents:
- Introduction
- Table of Contents
- Features
- Supported Maps/Surfaces
- Tools/Scripting Aids
- Download and Installation
- Development
- Testing
- Adding SPS to a Script
- Scripting Hints/Tips
- SPS Global Variables
- Credits
- Conclusion
Features:
- 100% color.
- Works without SMART.
- It is very, very simple to use.
- The mathematics behind SPS can be found here.
Supported Maps/Surfaces:
There are A LOT of supported maps. All maps can be found in the
SPS/img/ directory, or are viewable online
here.
Tools/Scripting Aids:
- SPS Pathmaker application developed by m34tcode. Download here.
- Includes a tool to automatically create the RS surface world map (in SPS/tools/).
- Automatic updater.
Download & Installation:
- Close any instances of Simba you have open.
- SPS is included with the SRL updater, so if you've installed SRL, you should already have an SPS heading in your Simba. If you don't have this heading, follow this short tutorial.
- To install manually, download SPS from here, and extract it to Simba/Includes/. Make sure you rename the folder to SPS.
- Open the new SPS folder and copy the sps.dll file that's in SPS/plugins/.
- Paste that file in Simba/Plugins/.
- Done!
Development:
Since SPS is hosted on github, anyone can fork it, change whatever they want, and send a pull request. If you're interested in helping out, please post on this thread.

Testing:
MSI does and always will use SPS it's primary walking method. There are also test files included with the SPS repository if you want to test that way. They can be found in the
SPS/test/ directory.
Adding SPS to a Script:
First thing you should do is download a SPS pathmaker tool. There are a few different versions out there, all of which will get the job done. It makes creating SPS paths very, very easy.
- Load the SPS library and include sps.simba in your script:
Simba Code:
program spsTest;
{$i srl/srl.simba}
{$i sps/sps.simba} // has to be included after SRL
- Call SPS_Setup (this needs to be called each time you want to change surfaces)
Simba Code:
procedure SPS_Setup(surface: integer; areas: TStringArray);
- Surface: One of the supported surface constants:
Progress Report:
RUNESCAPE_OTHER
RUNESCAPE_SURFACE
- Areas: Go to your SPS/img/ folder and open the sub folder of the surface you're walking on.
- Find the map pieces of where you're walking and add them to the array.
- For example, the areas for Varrock east mine would just be ['12_7'], or the area for the Essence Mine would be ['essence_mine'].
- NOTE: It is highly recommended that if you'll be walking close to the edge of an area, that you include the area beside the edge you'll be walking on. This ensures a more accurate calculation.
- So, calling SPS_Setup should look something like this:
Simba Code:
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
// or, for the Essence Mine...[/B][/COLOR]
SPS_Setup(RUNESCAPE_OTHER, ['essence_mine']);
- Create a path using the Pathmaker tool.
- Call SPS_WalkPath or SPS_BlindWalk when you want the script to walk.
- View the test file in the repository here.
- IMORTANT: If you're changing surfaces (i.e. from Runescape surface to the Essence mine) you have to call SPS_Setup again!
- If you want to call a procedure while the player is walking (i.e. antiban or antirandoms), you can do this:
Simba Code:
program new;
{$i srl/srl.simba}
{$i sps/sps.simba}
procedure antiban();
begin
// your antiban code here[/B][/COLOR]
end;
begin
activateClient();
clearDebug();
setupSRL();
// so it will call the 'antiban' procedure while walking
SRL_Procs[SRL_Antiban] := @antiban;
SPS_Setup(RUNESCAPE_SURFACE, ['10_7', '11_7']);
Writeln(toStr(SPS_WindWalk(point(4353, 3025))));
end.
Scripting Hints/Tips:
If you're having a small problem getting SPS to work exactly like you want, these tips and hints may help you out.
- SPS can be VERY slow if you have several SPS areas loaded at once. For this reason, you can split the maps up so only 1 or 2 are loaded at a time. Simply walk a few points in a path, then call SPS_Setup again.
Example (keep in mind these are NOT actual points/areas; they're just used for the example):
Simba Code:
// if you want to walk from GE bank to VW bank to VE bank
begin
// setup SPS to walk to VW bank
GEToVWB := [ Point(1234, 5678), Point(8765, 4321) ];
SPS_Setup(RUNESCAPE_SURFACE, ['11_7']);
SPS_WalkPath(GEToVWB);
// setup SPS again to walk to VE bank
VWBToVEB := [ Point(9876, 6789), Point(4321, 1234) ];
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
SPS_WalkPath(VWBToVEB);
end.
- The same concept can be used to change maps. For example, if you're walking from Falador east bank into the Dwarven mines you can use code that looks something like this:
Simba Code:
begin
FEBToLadders := [ Point(1234, 5678), Point(8765, 4321) ];
SPS_Setup(RUNESCAPE_SURFACE, ['11_7']);
SPS_WalkPath(FEBToLadders);
LaddersToMine := [ Point(9876, 6789), Point(4321, 1234) ];
SPS_Setup(RUNESCAPE_OTHER, ['dwarven_mine']);
SPS_WalkPath(LaddersToMine);
end.
- If you're walking to a point that's near the edge of an SPS area, also include the adjacent area when you call SPS_Setup. This will significantly increase accuracy. For example, if you're walking to Varrock East Bank (from anywhere) you should include areas 11_7 and 12_7.
- Using SPS_WalkPath will be slightly faster than using SPS_BlindWalk because SPS_GetMyPos is called more often. However, SPS_BlindWalk is more human like in my opinion because the walking path is randomly generated.
SPS Global Variables:
There are a few SPS global variables that can be set to customize how SPS works. Keep in mind that these variables should be set AFTER you call SPS_Setup.
- SPS_Debug: boolean; Disabled by default. Setting to true will show SPS debugging in the Simba debug box.
- SPS_MultiMouse: boolean; Enabled by default. This variable simulates human mouse clicking when walking the path. It will click the next point multiple times (randomly, of course).
- SPS_Tolerance: extended; Set to 600 by default. The higher the number, the higher the tolerance when comparing minimap colors to SPS area colors.
- SPS_MatchesPercent: extended; Set to 0.35 by default. SPS compares small boxes of the minimap compared to small boxes on the SPS areas. A percentage of matches is returned. This variable is the minimum matches. If this percent isn't reached, SPS_GetMyPos will return (-1, -1).
- SPS_Accuracy: integer; Set to 4 by default. SPS areas and the minimap are split into boxes with side length of SPS_Accuracy. The smaller the number, the more boxes are created, and the more comparisons are made, making it more accurate. More comparisons take more time, so making this variable lower, will decrease the speed of SPS_GetMyPos; however, if you use SPS_BlinkWalk, it probably won't be noticeable.
People have reported some areas not working very well for them. If this happens, I recommend setting SPS_Accuracy to 3.
- SPS_AnyAngle: boolean; Set to false by default. Setting this to true will allow SPS to work at ANY compass angle.
- SPS_ClickNorth: boolean; Set to false by default. Setting this to true will call SRL's ClickNorth to point the compass north, rather than rotating the camera.
Credits:
- marpis for the original SPS development.
- Wizzup** and mastaraymond of helping with the plugin.
- Smidqe for continually updating the world map and map pieces.
- Dgby714 for some cleaning up and plugin optimization.
- Nava2 for increasing the speed significantly.
- mika for the Dominion Tower implementation.
- Someone (please tell me who you are, I can't remember, sorry
) for the Runecrafting Altar maps. - Hero for most of the dungeon map.
- J J and Ollybest for making SPS work at any compass angle.
Conclusion:
SPS has been included in MSI for a very long time now and it's proven to work quite well. It is a very easy way to include color walking in your scripts. It can also be used for player location. The possibilites are literally endless.
Lastly, I want to say thank you to anyone who has contributed and to anyone who will contribute in the future. SPS is, without a doubt, the future of color walking.
Cheers,
Coh3n