SRL Positioning System (OFFICIAL THREAD)
Coh3n
2011-08-26 18:36:55
SRL Positioning System
Status: Working for RS3 as of July 5th, 2014. SPS does not work for OSR.
Introduction:[INDENT]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.[/INDENT]
Table of Contents:- Introduction
- Table of Contents
- Features
- Download and Installation
- Development
- Adding SPS to a Script
- Credits
- Conclusion
Features:- 100% color.
- Works without SMART.
- It is very, very simple to use.
- The mathematics behind SPS can be found here.
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:[INDENT]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. :)[/INDENT]
Adding SPS to a Script:[INDENT]@The Mayer; has written a fantastic RS3 scripting tutorial
here. The section on SPS is "Section 6, Sub-Tutorial 1". Again, SPS does not currently work for OSR.[/INDENT]
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 :o) 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:[INDENT]I have seen SPS used in a lot of scripts and has always proven to work quite well. If you have any issues getting it to work, don't be afraid to ask. :)
Lastly, I want to say thank you to anyone who has contributed and to anyone who will contribute in the future. With this project, we are able to provide a reliable walking method to keep SRL 100% color.[/INDENT]
Cheers,
Coh3n
Gu3st...
2011-08-27 10:31:55
Is the map updated? If not it wont work in some areas
kanah
2011-08-27 10:39:22
SPS sounds amazing!!! Developing a walking path is by far the hardest part of developing an all color script.
Coh3n
2011-08-27 11:36:12
From: Zyt3x
Is the map updated? If not it wont work in some areas
Yes it has.
From: Smidqe
I've updated it and it's currently waiting to be pushed.
Only thing that I found that wasn't working correctly was SPS_GetMyPos, it doesn't give accurate location. This will affect MSI.
It works for me? I tested it in a few locations before making this thread.
From: Home
Path maker tool :)
http://villavu.com/forum/showthread.php?t=62360
~Home
Thank you. :)
Coh3n
2011-08-27 11:39:42
From: Smidqe
Huh? I tested with account in Varrock East bank, it gave locations that were far away :confused:
You may have been using the SPS area that doesn't work. Look at the entire map, when you updated just the F2P area, it's like a lighter box around the whole F2P area. There are two areas with VEB, one worked for me, one didn't.
We really need a script to just create the entire map. Would make that all easier.
marpis
2011-09-21 04:02:17
Prepare yourselves for an SPS worldwalking system in 3 weeks ;)
I know just the technique. I get my laptop here in the army next weekend (hopefully) and I'll start writing the base whenever I have time.
Marpis will be back in the game! Temporarily, at least.
From: marpis
Prepare yourselves for an SPS worldwalking system in 3 weeks ;)
I know just the technique. I get my laptop here in the army next weekend (hopefully) and I'll start writing the base whenever I have time.
Marpis will be back in the game! Temporarily, at least.
Great to hear :)!
Koska on TJ0? : ) Aamujaa!
~Home
marpis
2011-09-21 07:59:19
From: Home
Great to hear :)!
Koska on TJ0? : ) Aamujaa!
~Home
Tammikuun 6. pääsee pois :)
Itse et varmaan ole armeijas vielä käynytkään, älä niitä aamuja huutele!
From: marpis
Tammikuun 6. pääsee pois :)
Itse et varmaan ole armeijas vielä käynytkään, älä niitä aamuja huutele!
Ehei. Käyty on :) Olin PSTK:ssa Säkylässä.
Mutta jaksamisia sinne!
~Home
Coh3n
2011-09-21 13:08:35
From: marpis
Prepare yourselves for an SPS worldwalking system in 3 weeks ;)
I know just the technique. I get my laptop here in the army next weekend (hopefully) and I'll start writing the base whenever I have time.
Marpis will be back in the game! Temporarily, at least.
Awesome! :)
Coh3n
2011-09-29 17:49:39
UPDATED ~ Essence mine added:
Cohen Adair (4):
Updated sps.simba to work with dungeons (involves a slightly different setup)
Essence mine now works + added an easy setup for other dungeons
Added a Constant field to TSPSSurface
Added a Tolerance field to TSPSSurface
With this update there is a different setup involved (old one will still work, it will just use the Runescape Surface as the defauly surface), so there shouldn't be any scripts that break because of this.
Updating the first post now.
sf411
2011-09-29 17:55:07
Looks like tomorrow will be a fun coding day, it sure has been a long week..
Coh3n
2011-09-29 21:09:32
From: sf411
Looks like tomorrow will be a fun coding day, it sure has been a long week..
I also just found out that the entire Essence mine map is dynamic. Basically if you look at the top left corner of
this map, that top left corner could be at the top right, bottom right or bottom left. It changes every time you enter the mine. Obviously, the same goes for the rest of the corners.
This
shouldn't run in to issues since they're basically the same shape, but if it does, I can make 4 different images so the top left corner appears in all four corners (like a rotation images).
Also sf411, make sure you keep that list I sent you in a PM, it'll be a good reference. Let me know how it goes, and PM me for any help. :)
Coh3n
2011-10-10 21:30:39
Made an update today that tremendously sped up SPS_GetMyPos. The ClickNorth call was causing it to wait an extra 1500-2000ms (setAngle in SRL waits no matter what the current angle is at).
Sir R. M8gic1an
2011-10-22 07:15:48
Can we get an extension to download SPS? would be awesome.
~RM
Nava2
2011-10-22 10:22:31
I feel like a system for this should be implemented that uses a "delta" of sorts to work with the images. They are already very large, and its hard to ship that many easily. Thus, having a system that would update each image when it needs to be, rather than the entire bulk would be ideal.
This is not the easiest system to implement, but I think doing a grrep/regex of commit information would return which files are needed, then the update package could be updated as well. I can look into this as well, but it would involve someone hosting /two/ packages. One of the system in its entirety, and the other of deltas.
Coh3n
2011-10-22 10:33:48
From: Sir R. M8gic1an
Can we get an extension to download SPS? would be awesome.
~RM
It's planned for the near future.
From: Nava2
I feel like a system for this should be implemented that uses a "delta" of sorts to work with the images. They are already very large, and its hard to ship that many easily. Thus, having a system that would update each image when it needs to be, rather than the entire bulk would be ideal.
This is not the easiest system to implement, but I think doing a grrep/regex of commit information would return which files are needed, then the update package could be updated as well. I can look into this as well, but it would involve someone hosting /two/ packages. One of the system in its entirety, and the other of deltas.
That would be ideal, yes, but Wizzup? said the size isn't a big deal.
Nava2
2011-10-22 10:36:35
From: Coh3n
It's planned for the near future.
That would be ideal, yes, but Wizzup? said the size isn't a big deal.
It is for people downloading.. :/
From: Coh3n
That would be ideal, yes, but Wizzup? said the size isn't a big deal.
He is getting a new server with crazy bandwith so…
Ok, gotta admit this looks like something pretty god damn amazing.
Daniel
2011-10-26 00:04:51
From: Yago
He is getting a new server with crazy bandwith so…
Not everyone lives in the Europe.
Wizzup?
2011-10-26 07:47:48
From: Daniel
Not everyone lives in the Europe.
I'm sure we can think of something. :)
Perhaps even incremental updates, depending on the way SPS needs to be updated.
moparisthebest
2011-10-26 13:04:35
Two ways would be good, if server bandwidth is a concern, why not distribute it via bittorrent?
But if you want to just download changes from a HTTP server, then this is the way to go:
http://zsync.moria.org.uk/
Wizzup?
2011-10-26 13:31:04
From: moparisthebest
Two ways would be good, if server bandwidth is a concern, why not distribute it via bittorrent?
But if you want to just download changes from a HTTP server, then this is the way to go:
http://zsync.moria.org.uk/
RSync is nice yes, but you'd need a client implementation?
Nava2
2011-10-26 13:40:48
From: Wizzup?
RSync is nice yes, but you'd need a client implementation?
Its zsync, rather than rsync. :) Check the link!
Wizzup?
2011-10-26 13:42:50
From: Nava2
Its zsync, rather than rsync. :) Check the link!
http://zsync.moria.org.uk/clientSimba will need at least C headers + a library to bind against.
Coh3n
2011-10-26 18:16:29
Wizzup?, 99% of the time only a file or two will be updated in SPS. It's only when the world map is updated that images will change. There will also be new images added once in a while (but only a few at a time).
Camaro'
2011-10-28 17:31:30
From: Coh3n
Wizzup?, 99% of the time only a file or two will be updated in SPS. It's only when the world map is updated that images will change. There will also be new images added once in a while (but only a few at a time).
Uhm, how can I get SPS_PosToMM to not return (-1, -1) :redface:
Is my area (9_8) is outdated, if it is, how can I update the image my self? (9_8) is Fally East bank to the cow pen.
Edit: It isn't walking correctly so let me go about trying to fix this :)
Edit2: Yeah, I tried to make another 9_8 image but about the same problem happened when I tried walking. It clicked one click a little more west than the position and didn't try to continue on the path.
Coh3n
2011-10-28 18:07:01
Try using 9_7 and 9_8 as SPS areas since the bank is right on the edge of 9_8.
Camaro'
2011-10-28 18:09:37
Genius. It worked for one click but it got the access violation error so let me do some restarts to get rid of that and I will edit my post when I get more information.
Edit: Worked great! :)
Coh3n
2011-10-28 18:10:55
Okay. I also added a link to Wolygon's SPS Pathmaker in the "Adding to a script" section in case you didn't know about it already. :)
Camaro'
2011-10-28 18:14:35
That pathmaker really helps. Thanks.
Edit: PosToMM Still doesn't work.
mastaraymond
2011-10-28 18:37:34
Looks groovy, is there a 'technical' description of how this thing exactly works somewhere?
On the error note, it probably/might occur inside the Plugin.
Try changing
function SPS_FindMapInMapEx(out fx, fy: integer; LargeMap: T4DIntegerArray; SmallMap: T3DIntegerArray; tol: extended): integer; register;
to
function SPS_FindMapInMapEx(var fx, fy: integer; LargeMap: T4DIntegerArray; SmallMap: T3DIntegerArray; tol: extended): integer; register;
Since FPC might do some fancy stuff on the out-keyword.
Furthermore, I would suggest passing all those array's (in the plugin) as variables:
1) There might be issues with the fact that plugins do not have 'shared' mem, like SCAR does.
2) It makes the function faster, yay!
Coh3n
2011-10-28 18:50:12
I'll look into it when I can, thanks Ray. As for a technical solution, I'll try to get one from marpis (or Nava has he's done a bit of work) as he's the one who actually wrote it. I haven't done any work inside the plugin.
mastaraymond
2011-10-28 18:52:18
From: Coh3n
I'll look into it when I can, thanks Ray. As for a technical solution, I'll try to get one from marpis (or Nava has he's done a bit of work) as he's the one who actually wrote it. I haven't done any work inside the plugin.
I'm more interested in how SPS works in general.. It compares a screenshot of the minimap with the total map, or something like that?
Coh3n
2011-10-28 18:56:55
From: mastaraymond
I'm more interested in how SPS works in general.. It compares a screenshot of the minimap with the total map, or something like that?
I recently learned that it doesn't use the giant world map at all. Apparently it compares the part of the minimap seen in game to the map pieces (aka SPS Areas), and goes from there.
Now that it's being used a lot more though, we do need to figure out the Access Violation (hoping your out/var thing works), plus it behaves a little weird sometimes. For example, I've had SPS_GetMyPos work perfectly for a while, then for whatever reason it will return a point that is no where near where the player actually is, which causes the walking to fail.
I'm hoping once we can get the world map updated, it will be fixed, but even then the in game world map (that we create the pieces from) doesn't match the minimap exactly.
mastaraymond
2011-10-28 18:59:22
From: Coh3n
I recently learned that it doesn't use the giant world map at all. Apparently it compares the part of the minimap seen in game to the map pieces (aka SPS Areas), and goes from there.
Now that it's being used a lot more though, we do need to figure out the Access Violation (hoping your out/var thing works), plus it behaves a little weird sometimes. For example, I've had SPS_GetMyPos work perfectly for a while, then for whatever reason it will return a point that is no where near where the player actually is, which causes the walking to fail.
I'm hoping once we can get the world map updated, it will be fixed, but even then the in game world map (that we create the pieces from) doesn't match the minimap exactly.
One could store the last locations, to see if SPS is returning any reasonable position.
Coh3n
2011-10-28 19:28:25
Yeah, but what would we do with that? We would just confirm that it didn't work properly, then what? Try again? That's kind of what we do now anyway. If it fails it'll try again. Thing is, once it fails MSI is set to death walk (teleport home then walk back), and it does that perfectly and continues on with the script as if nothing happened. It did that 3 times in my 2 hour cooking run. Very odd.
mastaraymond
2011-10-28 20:03:35
From: Coh3n
Yeah, but what would we do with that? We would just confirm that it didn't work properly, then what? Try again? That's kind of what we do now anyway. If it fails it'll try again. Thing is, once it fails MSI is set to death walk (teleport home then walk back), and it does that perfectly and continues on with the script as if nothing happened. It did that 3 times in my 2 hour cooking run. Very odd.
Hehe, awkward.
I made a pull-request with an updated DLL, try if it works :).
Jakkle
2011-10-28 22:36:30
I just updated MSI and I'm getting the Access Violation problem. I didn't get this the other day tho :confused:
Oh and coh3n I was going to post the report but as it has my bots name all thee way through the report I will post it to you in a pm. Could you please change it so its just the nickname of the char and not the hole name please. I wouldn't want to have to edit the hole of the report. Unless I'm missing an option ?
Edit: Ok nvm about the report, I copied it but then copied something else, forgetting that I copied the report (closed simba by then) :duh: lol.
Anyway, I tried it few times before I went to report it. It was in Lummy after it had teled there from not finding where it was and it couldn't find that it was in Lummy either. After going to send the report, it started working lol so could not send you one. Even tho it started working, walking its way up to varrock. It got to the location and home teled again, walked back up and logged out. I'm using G.E Oaks.
Gu3st...
2011-10-29 09:28:00
From: mastaraymond
Hehe, awkward.
I made a pull-request with an updated DLL, try if it works :).
I tested it, and I still get Acces Violation each and every time I try running MSI with SPS. I'm running Win7 64-bit by the way.
Wizzup?
2011-10-29 09:36:26
From: Zyt3x
I tested it, and I still get Acces Violation each and every time I try running MSI with SPS. I'm running Win7 64-bit by the way.
Alright guys. If you want to fix it, try this:
Updated URL: See
http://villavu.com/forum/showthread.php?p=838779&posted=1#post838779 for lazarus
Compile the SPS plugin. Compile Simba. (Not sure if you have to)
Make sure Simba uses the new plugin. Run Simba FROM (green play thing) lazarus.
You'll find out where it errors. Lazarus will stop executing and point you at the exact line. At least, I think it
Oh, and you cannot use SMART. It messes with the debugger.
mastaraymond
2011-10-29 10:23:51
From: Wizzup?
Alright guys. If you want to fix it, try this:
Get ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/Lazarus-0.9.30.1-33143-fpc-2.4.4-20111029-win32.exe (or if you already have FPC/lazarus, use that).
Compile the SPS plugin. Compile Simba. (Not sure if you have to)
Make sure Simba uses the new plugin. Run Simba FROM (green play thing) lazarus.
You'll find out where it errors. Lazarus will stop executing and point you at the exact line. At least, I think it
Oh, and you cannot use SMART. It messes with the debugger.
I'll do this tomorrow :)
Camaro'
2011-10-29 10:24:57
From: mastaraymond
I'll do this tomorrow :)
I'll do this now :)
mastaraymond
2011-10-29 10:26:38
[QUOTE=Camaro';838432]I'll do this now :)
Winner ;-)
EDIT: It just walked from lum to draynor without problems??
marpis
2011-10-29 11:07:51
From: mastaraymond
I'm more interested in how SPS works in general.. It compares a screenshot of the minimap with the total map, or something like that?
I hope this helps. I could make a series of pictures of this, but I'm too lazy.
The mathematics behind SPSSPS takes a 100x100 (IIRC) screencapture of the minimap, handles it as a bitmap, and turns it's color content into a T3DIntegerarray. Array[0][0] represent the color content in the left-top-corner in the bitmap we just created. 100x100 bitmap has 10,000 pixels, so we don't want to analyze them all. Thus, Array[0][0] doesn't have the color content info of the
pixel in the left-top-corner, but rather the color content of a 5x5 box in that corner. This way we will have an array with subarrays from [0..19][0..19] instead of [0..99][0..99].
Now what's that "color content" in that 5x5 box, behind Array[0][0]? RGB values summed from all those 25 pixels. Red sum is Array[0][0][0], Green sum is Array[0][0][1], Blue sum is Array[0][0][2].
So now we have a T3DIntegerArray with 400 5x5 boxes' color content (remember, 100x100 bitmap -> turn into 5x5 "average"-boxes, 100/5 = 20, thus 400 5x5 boxes).
Now the objective: We want to find a 100x100 pixels area in the world that is closest to ours in terms of color. The world is pretty huge, so we don't want to go through the whole RS surface. That's why SPS has 500x500pixels areas that you choose, from which we then begin our match hunt.
Before calculations, we need to prepare the 500x500 area image to use the same 5x5pixels box system, so we have less pixels to compare. Now we have a 500x500pixels box whose colors are also stored in a T3DIntegerArray.
Now we start comparing our minimap boxes to those in the map. We need to determine how much difference in RedSum, GreenSum and BlueSum we accept between minimapbox and areabox. That's SPS_Tolerance, what I originally set to 0.3 meaning 30%.
Now to the calculations! We compare the boxes in our T3DIntArray "Minimap" and the other T3dInArray "Area". Lets start with the top-left-corner, which in both is index [0][0]. We see that the Minimap[0][0] has very high values for all R, G and B, as we are on a snowy area (white=255,255,255) for example. Area[0][0] has 3 very low values, as the top left of the 500x500 area bitmap has dark colors. Minimap[0][0] and Area[0][0] do not have similar values in their arrays. We don't count this as a match. We proceed to analyze the next 5x5 box, which is [0][1]. We find that the colors are quite similar, so we count that as a match!
First we match boxes Area[0..19][0..19] to the minimap, and count all matching boxes. Then we take 1 step to the right on the map. We match boxes Area[1..20][0..19] and again count matching boxes. Yes, This comparison has only 1 new row of uncompared boxes, but this is the only way I know to do this. We again take 1 step to the right and match boxes Area[2..21][0..19] and so on, until we get to the right end of the Area. Then we go back to the very left side of the are, but take 1 step down. Now we match Area[0..19][1..20], and again start going to the right. You get the idea? Everytime we find that "hey, this part here has more matches than any of the previous ones!" we remember that index and how many matches it had. In the end, we know what part had the most matches.
That's hellalotta comparison. We finally get to the very last part of the Area and have found out that the 100x100pixels part, whose TOP-LEFT-CORNER is at [3][12] has most matches. Because the boxes are 5x5pixels, we can easily figure out that the cordinates in the Area BITMAP are (3*5, 12*5), which is (15, 60). We also know where in RS surface that area is. When we know that the areas top-left-corner is located on pixel (1500, 900), we can figure out that the best matching part of that area is located at (1500+15, 900+60). Note that this isn't our own location yet! This is the location of the top-left corner of the best matching 100x100pixel area. Our OWN location, ofcourse is in the very center of that 100x100pixel area. Thus, we get our own location by adding 50pixels to both x and y axis.
Our own location in the worldmap is then (1500+15+50, 900+60+50) = (1565, 1100).
EDIT: More tutorial! This probably has lots of same text as above.
Understanding the pluginStudy the functions in sps.dll in this order:
1. SPS_MakeColorBoxEx
2. SPS_BitmapToMap
3. SPS_ColorBoxesMatchInline
4. SPS_FindMapInMapEx
Short clarification5x5 pixels = 1 ColorBox, which is a 3D integerarray containing R, G and B values of the 25 pixels inside that box.
Since we are using 5x5 boxes, SPS has an accuracy of 5 pixels. This is why SPS_GetMyPos always returns a multiple of 5.
For reference, 1 Reflection tile width is approximately 4 pixels.
100x100 pixels area is taken from the minimap, then made into 400 ColorBoxes (20x20 obviously).
The worldmap, or pieces of it (areas) are also made into ColorBoxes.
FindMapInMapExxThis is the heart of SPS.
var cm has the index number of our current worldmap, as the parameter
LargeMap: T4DIntegerArray is the place where we enter our used areas. Areas are, just like our gathered minimap, T3DIntegerArrays.
The function returns an integer. The result integer is the index of LargeMap where our location is found.
SPS tries to fit our minimap to every place in the "worldmap" and everytime it counts how many matching ColorBoxes there are on that try. The one with most matches is chosen to be our supposed location in that worldmap.
Now we know that the SmallMap's center is located X pixels from the left and Y pixels from the top of the LargeMap
. The system of course first calculates how many boxwidths and boxheights are from the top-left-corner to the top-left-corner of SmallMap, and the conversion to pixels is done in the end of FindMapInMapExx. I also made it add 50 pixels in both width and height to return the center of SmallMap.
Understanding the use of SPS in RuneScape
As I stated earlier, SPS_Areas are made into ColorBoxes and put in an array, resulting in a 4DIntegerArray. Let's assume we use 3 areas.
SPS_Areas := ['6_7', '6_8', '7_8'];
All the area bitmaps in the SPS folder can be put in a grid to recreate the whole RS worldmap, just put them in an order, '0_0' being in the top-left-corner and so on.
You'll notice that areas next to eachother have a 50 pixel overlap. Why?
Let's go back to FindMapInMapExx and imagine your real position in the LargeMap is in some very corner. You just can't find it because LargeMap will run out, and the function would try to to match SmallMap boxes with non-existing LargeMap boxes. This can however be overcame by having a half-minimap-width overlap, 50 pixels.
You also probably see that some map pieces are missing. That's because there are lots of useless space in the worldmap, such as black areas and sea. We delete them from the folder to save space and make it easier to find the areas you want to use.
SPS areas are 500x500 size bitmaps, so they make a 100x100 grid of ColorBoxes. That's 10,000 ColorBoxes, and we want to find the most matching place for our 400 ColorBoxes, the minimap.
FindMapInMapExx does this and tells us that (for example) the center of our minimap is 245 pixels from the left and 375 pixels from the top of the second area bitmap, which is SPS_Areas[1], which is '6_8'.
Now we need to calculate that position in the huge worldmap. Since areas are 500x500 bitmaps with 50 pixels overlap in each side, we can calculate the cordinates of the top-left-corner of our current area, '6_8'. It's (6*400, 8*400). So this is the top-left-corner of the area where FindMapInMapExx says we are. FindMapInMapExx also tells that we are 245 pixels from the left and 375 pixels from the top of that area.
Now we can easily see, that our location in the worldmap is
(6*400 + 245, 8*400 + 375)
Wizzup?
2011-10-29 11:45:05
From: Wizzup?
Alright guys. If you want to fix it, try this:
Get ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/Lazarus-0.9.30.1-33143-fpc-2.4.4-20111029-win32.exe (or if you already have FPC/lazarus, use that).
Compile the SPS plugin. Compile Simba. (Not sure if you have to)
Make sure Simba uses the new plugin. Run Simba FROM (green play thing) lazarus.
You'll find out where it errors. Lazarus will stop executing and point you at the exact line. At least, I think it
Oh, and you cannot use SMART. It messes with the debugger.
In addition, you need to enable dwarf debug information and disable splitting the debug info to another file. The dll will increase in size a lot. And that's exactly what you want.
mastaraymond
2011-10-29 14:53:48
From: marpis
I hope this helps. I could make a series of pictures of this, but I'm too lazy.
The mathematics behind SPS
SPS takes a 100x100 (IIRC) screencapture of the minimap, handles it as a bitmap, and turns it's color content into a T3DIntegerarray. Array[0][0] represent the color content in the left-top-corner in the bitmap we just created. 100x100 bitmap has 10,000 pixels, so we don't want to analyze them all. Thus, Array[0][0] doesn't have the color content info of the pixel in the left-top-corner, but rather the color content of a 5x5 box in that corner. This way we will have an array with subarrays from [0..19][0..19] instead of [0..99][0..99].
Now what's that "color content" in that 5x5 box, behind Array[0][0]? RGB values summed from all those 25 pixels. Red sum is Array[0][0][0], Green sum is Array[0][0][1], Blue sum is Array[0][0][2].
So now we have a T3DIntegerArray with 400 5x5 boxes' color content (remember, 100x100 bitmap -> turn into 5x5 "average"-boxes, 100/5 = 20, thus 400 5x5 boxes).
Now the objective: We want to find a 100x100 pixels area in the world that is closest to ours in terms of color. The world is pretty huge, so we don't want to go through the whole RS surface. That's why SPS has 500x500pixels areas that you choose, from which we then begin our match hunt.
Before calculations, we need to prepare the 500x500 area image to use the same 5x5pixels box system, so we have less pixels to compare. Now we have a 500x500pixels box whose colors are also stored in a T3DIntegerArray.
Now we start comparing our minimap boxes to those in the map. We need to determine how much difference in RedSum, GreenSum and BlueSum we accept between minimapbox and areabox. That's SPS_Tolerance, what I originally set to 0.3 meaning 30%.
Now to the calculations! We compare the boxes in our T3DIntArray "Minimap" and the other T3dInArray "Area". Lets start with the top-left-corner, which in both is index [0][0]. We see that the Minimap[0][0] has very high values for all R, G and B, as we are on a snowy area (white=255,255,255) for example. Area[0][0] has 3 very low values, as the top left of the 500x500 area bitmap has dark colors. Minimap[0][0] and Area[0][0] do not have similar values in their arrays. We don't count this as a match. We proceed to analyze the next 5x5 box, which is [0][1]. We find that the colors are quite similar, so we count that as a match!
First we match boxes Area[0..19][0..19] to the minimap, and count all matching boxes. Then we take 1 step to the right on the map. We match boxes Area[1..20][0..19] and again count matching boxes. Yes, This comparison has only 1 new row of uncompared boxes, but this is the only way I know to do this. We again take 1 step to the right and match boxes Area[2..21][0..19] and so on, until we get to the right end of the Area. Then we go back to the very left side of the are, but take 1 step down. Now we match Area[0..19][1..20], and again start going to the right. You get the idea? Everytime we find that "hey, this part here has more matches than any of the previous ones!" we remember that index and how many matches it had. In the end, we know what part had the most matches.
That's hellalotta comparison. We finally get to the very last part of the Area and have found out that the 100x100pixels part, whose TOP-LEFT-CORNER is at [3][12] has most matches. Because the boxes are 5x5pixels, we can easily figure out that the cordinates in the Area BITMAP are (3*5, 12*5), which is (15, 60). We also know where in RS surface that area is. When we know that the areas top-left-corner is located on pixel (1500, 900), we can figure out that the best matching part of that area is located at (1500+15, 900+60). Note that this isn't our own location yet! This is the location of the top-left corner of the best matching 100x100pixel area. Our OWN location, ofcourse is in the very center of that 100x100pixel area. Thus, we get our own location by adding 50pixels to both x and y axis.
Our own location in the worldmap is then (1500+15+50, 900+60+50) = (1565, 1100).
Ah, that makes sense! Could you post the link to this post on the front-page, Coh3n?
I tried debugging it, but it wouldn't error on my during mining @ lumby west.
kingarabian
2011-10-29 16:48:21
Raymond, try run it while your doing VEM. Also try run more then one Simba it's more then likely gonna happen.
Heavenzeyez1
2011-10-30 09:57:02
Rimmingot mines - Port Sarim deposit box is broken for me. It reaches deposit box, then clicks one step north and tries to find the box - then teles to lumby.
~Eerik.
mastaraymond
2011-10-30 12:38:27
From: kingarabian
Raymond, try run it while your doing VEM. Also try run more then one Simba it's more then likely gonna happen.
Will report later tonight! :)
ry0240
2011-10-30 15:21:08
Is there any confirmed banking scripts that MSI runs accurately with SPS? I tried running the G.E Yews and it worked for about 5 mins and then ended up straying away from the Yews and getting lost. I gave up trying to test other scripts cause 9 out of 10 times I get the Access Violation Errors with SPS. Aswell as it doesn't seem to be able to deathwalk so I had to manually move all the accounts there.
Wizzup?
2011-10-30 17:21:16
Get Lazarus+FPC here:
http://www.hu.freepascal.org/lazarus/ The one "Lazarus fixes + fpc 2.4.4 win32"
ry0240
2011-10-30 18:24:46
From: Wizzup?
Get Lazarus+FPC here: http://www.hu.freepascal.org/lazarus/
The one "Lazarus fixes + fpc 2.4.4 win32"
Who is this post in reference to? Either way I'll D/L and see what happens lol.
kingarabian
2011-10-30 18:37:42
From: ry0240
who is this post in reference to? Either way i'll d/l and see what happens lol.
From: wizzup?
alright guys. If you want to fix it, try this:
Updated url: See http://villavu.com/forum/showthread.php?p=838779&posted=1#post838779 for lazarus
compile the sps plugin. Compile simba. (not sure if you have to)
make sure simba uses the new plugin. Run simba from (green play thing) lazarus.
You'll find out where it errors. Lazarus will stop executing and point you at the exact line. At least, i think it
oh, and you cannot use smart. It messes with the debugger.
^mts
mastaraymond
2011-10-30 19:00:06
Was trying to debug VEM, but I could not get it MSI to work.. It would just keep clicking the invetory gametab, SRL broken?
kingarabian
2011-10-30 19:32:29
From: mastaraymond
Was trying to debug VEM, but I could not get it MSI to work.. It would just keep clicking the invetory gametab, SRL broken?
Your not in safe mode. Hold 'S' while Runescape is loading. After that goes into your graphics menu and make sure Safe mode is toggled.
Coh3n
2011-10-31 00:38:25
From: Jakkle
I just updated MSI and I'm getting the Access Violation problem. I didn't get this the other day tho :confused:
Oh and coh3n I was going to post the report but as it has my bots name all thee way through the report I will post it to you in a pm. Could you please change it so its just the nickname of the char and not the hole name please. I wouldn't want to have to edit the hole of the report. Unless I'm missing an option ?
Edit: Ok nvm about the report, I copied it but then copied something else, forgetting that I copied the report (closed simba by then) :duh: lol.
Anyway, I tried it few times before I went to report it. It was in Lummy after it had teled there from not finding where it was and it couldn't find that it was in Lummy either. After going to send the report, it started working lol so could not send you one. Even tho it started working, walking its way up to varrock. It got to the location and home teled again, walked back up and logged out. I'm using G.E Oaks.
Reports are automatically saved in Includes/MSI/Reports/. Also, your username should only appear ones on the report, so I'm not sure what you mean?
From: mastaraymond
Winner ;-)
EDIT: It just walked from lum to draynor without problems??
I've experienced some odd behaviour using it. Death walking has worked for me to Al Kharid, Draynor and VEB, so that's good.
The way MSI works is that if the player isn't at either location for a certain script (bank or mine, for example) it will try to walk to the bank or to the mine (depending on the inventory situation). If that fails, it will teleport to Lumbridge and try to death walk.
What seems to be a common issue is that for whatever reason (I'm guessing it's because of the access violation) the player's location isn't being detected, and everyone is reporting that their player is teleporting to Lumbridge and doing nothing (which makes sense because that's all they see).
The weird behaviour I'm talking about is this: I have my player starting in Falador East Bank, and I want to use the VE Miner. Obviously, the player isn't at VEB or VEM so it will try to death walk first (in case the player is already near the path). Obviously, the player isn't near the death path, but it starts walking anyway. My best guess is that SPS is finding the current minimap to be similar to the SPS areas used to walk from Lumbridge to VEB. I'm not sure if lowering the tolerance would fix this or not, though.
ALSO, I was running MSI's Cooking and it would often say it failed to walk to the range (when clearly it walked there) so it would then death walk back to the bank. I narrowed that down to some issue in SPS_GetMyPos. For whatever reason, every once in a while, the position being returned would be no where near the actual position (I think I posted that somewhere else, Raymond).
From: mastaraymond
Ah, that makes sense! Could you post the link to this post on the front-page, Coh3n?
Yep! :)
From: Heavenzeyez1
Rimmingot mines - Port Sarim deposit box is broken for me. It reaches deposit box, then clicks one step north and tries to find the box - then teles to lumby.
~Eerik.
Rimmington mine was working fine for me last week. This could be the same thing I said above also.
From: ry0240
Is there any confirmed banking scripts that MSI runs accurately with SPS? I tried running the G.E Yews and it worked for about 5 mins and then ended up straying away from the Yews and getting lost. I gave up trying to test other scripts cause 9 out of 10 times I get the Access Violation Errors with SPS. Aswell as it doesn't seem to be able to deathwalk so I had to manually move all the accounts there.
I've used Lumby Swamp west miner, Rimmington miner and the crafting guild miner. I'm not sure what other people have used. Oh, I've also used the cooker.
_________________________________
I still think the map SPS is using is a little outdated and a new one has to be made. I'll be working on a program to automatically create the map this week; hopefully it goes well.
Overall, I think SPS just needs to be made more precise so that if, for example, if you want to walk from VEB to VEM and you're standing in Falador, it won't start walking. I think a better map will help with this, and maybe lowering the tolerance as well. Maybe you guys can mess with the tolerance (even try 0?) and see what happens.
Oh, and right now, MSI uses the conversion methods for all paths (Reflection to SPS), so if we make those paths actual pixels rather than tiles, it may make walking a little more accurate.
Anyone have any luck debugging the access violation?
E: For the maps the map pieces and the minimap need to be identical (idealy). Unfortunately, the world map in the game (the map used to make the pieces) is quite a bit darker then the minimap. Here's an idea of the difference. After I did this, I put the brightness/contrast to 100% on my monitor and it made it a little closer, but still not exact.
Coh3n
2011-10-31 03:12:50
Please download the latest SPS version. The only file updated was sps.simba, so I've attached it to this post so you don't have to redownload everything. I changed the tolerance to 0.25 and added to the first post:
From: Coh3n
NOTE: By default, SPS will give a pop-up message when the Access Violation comes up and then terminate the script. If you don't want this to happen, set SPS_Continue to true somewhere in your script:
SPS_Continue := true;
Hopefully that will help people with the issue for now.
Can someone who gets the Access violation please test the above quote (just run MSI normally, you should receive a warning message if you get the error). I can't seem to get it, but it should work.
kingarabian
2011-10-31 03:23:26
From: Coh3n
Please download the latest SPS version. The only file updated was sps.simba, so I've attached it to this post so you don't have to redownload everything. I changed the tolerance to 0.25 and added to the first post:
Hopefully that will help people with the issue for now.
Can someone who gets the Access violation please test the above quote (just run MSI normally, you should receive a warning message if you get the error). I can't seem to get it, but it should work.
I'll test ina sec.
kingarabian
2011-10-31 03:53:11
mastaraymond
2011-10-31 07:01:46
I've been debugging for quite a while, but I never seem to run into this access violation.. Is this 64-bit related or something??
kingarabian
2011-10-31 07:04:20
From: mastaraymond
I've been debugging for quite a while, but I never seem to run into this access violation.. Is this 64-bit related or something??
Infact I am running a 64bit Windows… I can't recall if I got this error on my 32bit Xp VM yet. I'll do some extensive testing later.
Heavenzeyez1
2011-10-31 13:14:31
Yes, I'm running 64 bit aswell and get it, gonna test after the update, just a sec, will edit post. :)
~Eerik.
Edit: Okay, I get the excact same error as king does every single time, been trying 10 times now with restarting, no luck. :(
Coh3n
2011-10-31 13:47:09
Thanks, kingarabian, and Raymond, I used to get it with my 32-bit Windows, but I actually haven't gotten it in a while.
moparisthebest
2011-10-31 15:50:32
From: Wizzup?
http://zsync.moria.org.uk/client
Simba will need at least C headers + a library to bind against.
You don't have to, you could just build the client and run it from Simba or extensions.
It also just requires a file to be built on the web server, no extra services or modifications to the web server required.
Coh3n
2011-10-31 18:13:39
Is anyone using 32-bit getting it? Maybe it is a 64-bit issue.
doublex8
2011-10-31 18:47:52
I'm on a 32 and I have never received the access violation error
Nava2
2011-10-31 19:07:03
So.. it seems like its an issue of 32 vs. 64.. now the question: Why?
Coh3n
2011-10-31 22:41:14
From: Wizzup?
Alright guys. If you want to fix it, try this:
Updated URL: See http://villavu.com/forum/showthread.php?p=838779&posted=1#post838779 for lazarus
Compile the SPS plugin. Compile Simba. (Not sure if you have to)
Make sure Simba uses the new plugin. Run Simba FROM (green play thing) lazarus.
You'll find out where it errors. Lazarus will stop executing and point you at the exact line. At least, I think it
Oh, and you cannot use SMART. It messes with the debugger.
I'm having trouble with this. I'm getting an unknown procedure exception. I tried moving all my includes, plugins, etc. to the Simba source folder, but nothing changed.
Markus
2011-11-01 10:17:20
is it possible for gdb to attach at time of crash at windows? we could just load external debugging symbols for simba and sps so that we can still see what's going on and we don't need to run from FPC IDE
Wizzup?
2011-11-01 10:49:53
From: Markus
is it possible for gdb to attach at time of crash at windows? we could just load external debugging symbols for simba and sps so that we can still see what's going on and we don't need to run from FPC IDE
Or just run it directly from GDB.
gdb.exe Simba.exe
run
<wait for crash>
bt
<other stuff>
marpis
2011-11-01 12:50:48
Remeber everyone, SPS finds the most matching place on a map! It doesn't matter if it finds 1 matching area on the minimap, it still will return that as the most matching!
At first I wrote SPS to only return True when the best matching area has a minimum of "x" matches, but I figured that wouldn't be all that useful since SPS already needs areas to use.
You could very easily edit the plugin to have 1 extra variable parameter: var MatchesFound: Integer; and set a minimum number of matches to qualify as a successful positioning. Bear in mind that you will most likely have problems like "it said not enough matches eventhough I'm standing in the sps_area!" and you'll have to spend time to find the best minimum. In Grand Exchange it won't find all that many matches because It's always crowded with people, but if you in the middle of nowhere it will find much more.
Ergo; SPS will answer to question "I'm somewhere in this area, where spesifically am I?" but NOT this question "am I somewhere in this area?", some area being a 500x500 SPS_Area.
Coh3n
2011-11-01 13:55:55
From: marpis
You could very easily edit the plugin to have 1 extra variable parameter: var MatchesFound: Integer; and set a minimum number of matches to qualify as a successful positioning. Bear in mind that you will most likely have problems like "it said not enough matches eventhough I'm standing in the sps_area!" and you'll have to spend time to find the best minimum. In Grand Exchange it won't find all that many matches because It's always crowded with people, but if you in the middle of nowhere it will find much more.
May have to mess around with that.
Do you have any idea why this would be happening? I'm running MSI's AK Cooker for a few hours, and every once in a while SPS_GetMyPos will return (5220, 3800) when it should be returning something around (4895, 3980). I've looked through the debug several times and probably 85% of the time it returns (4895, 3980) (which is right), but that other 15% it returns (5220, 3800), which obviously isn't close.
This is all using only one SPS Area as well.
Same thing happens to me coh3n
Coh3n
2011-11-02 02:49:17
We'll have to figure that out. In the meantime, I'm almost done my script to automatically create a new world map.
Here's an example output of 9 screenshots put together.
Wizzup, here's what I got when the Access Violation came up:


That doesn't look very helpful. =\
Ray, do you have 64-bit windows?
______________________________________________
Repository updated!Commit can be found
here. The map hasn't yet been updated, but I have finished and added the script to automatically make the map. If you're interested, the output can be found
here.
I just need to reload the client until I can find a map that matches the minimap. Feel free to run the script yourself; it only takes 2 minutes to finish. If you wanted to test with new pieces, you'll also have to run rs_mapsplitter.simba and convert all the resulting bitmaps to .png file formats.
Wizzup?
2011-11-02 07:28:33
Coh3n, run it again: You want a screenshot of the call track and local vars.
ASM is not particularly useful. (Go to View -> Debug -> call stack|Local Vars)
Nice work though. :)
PotentPK
2011-11-02 22:05:42
Anyone get this?
Exception in Script: Plugin(sps32) has not been found
Coh3n
2011-11-02 22:06:56
You have to move the plugin from SPS/plugin to Simba/Plugins.
PotentPK
2011-11-02 22:10:01
From: Coh3n
You have to move the plugin from SPS/plugin to Simba/Plugins.
Oh, easy. Thanks!
Coh3n
2011-11-03 20:16:20
From: Wizzup?
Coh3n, run it again: You want a screenshot of the call track and local vars.
ASM is not particularly useful. (Go to View -> Debug -> call stack|Local Vars)
Nice work though. :)
Nothing came up in the local vars, but here's the call stack:

E: In other news, the Dwarven Mines + resourse dungeons will be added soon. I have the map + pieces created, I just need to test.
Just a note I get the Access Violation error on my 32 and 64 bit computers.
Very constantly. I barely get one load done without the error popping up with any scripts that use it.
Coh3n
2011-11-03 21:23:20
From: wyn10
Just a note I get the Access Violation error on my 32 and 64 bit computers.
Very constantly. I barely get one load done without the error popping up with any scripts that use it.
Well that resolves whether it's a 32/64 bit issue. Thanks.
From: Coh3n
Well that resolves whether it's a 32/64 bit issue. Thanks.
Forgot to note I have tried Xp,Vista and 7 with 32/64.
Jakkle
2011-11-04 02:11:20
I just started looking into using sps and see it works similar to reflection with points/tiles.
Is it possible to use sps to point on MS and could it be used to find the position of other things to like objects by pos ?
KingKong
2011-11-04 04:06:37
From: Jakkle
Is it possible to use sps to point on MS and could it be used to find the position of other things to like objects by pos ?
i think there is a function that does sps to ms but im not sure. As for finding objects, i doubt it will happen since sps is not very accurate(try getting your own position and you'll see that it changes)
Jakkle
2011-11-04 13:34:41
From: KingKong
i think there is a function that does sps to ms but im not sure. As for finding objects, i doubt it will happen since sps is not very accurate(try getting your own position and you'll see that it changes)
I have seen a post about that. It could be worked upon tho. I'm sure if it was made more accurate then finding something like trees, rocks, obstacles and doors would be easy as they are always in the same position.
Coh3n
2011-11-04 15:08:55
From: Jakkle
I just started looking into using sps and see it works similar to reflection with points/tiles.
Is it possible to use sps to point on MS and could it be used to find the position of other things to like objects by pos ?
There's a MMToMS function in SRL. I've tried what you're suggesting and it works sometimes, but like King said, it's not very accurate. SPS isn't exact like tiles were.
From: KingKong
i think there is a function that does sps to ms but im not sure. As for finding objects, i doubt it will happen since sps is not very accurate(try getting your own position and you'll see that it changes)
It does, but it shouldn't by THAT much. If it really changes that much, more SPS Areas may need to be added.
Markus
2011-11-06 04:24:54
Stupid suggestion: don't you need sharemem/cmem to pass objects through the DLL barrier? I don't see it used within the SPS plugin (Simba also needs to be compiled with support for it).
kingarabian
2011-11-06 05:35:32
Hows that fix for the access violation coming along? It's impossible for me to run MsI right now.
Is the problem within the plugin or is it conflicting with another program?
Lima Bean
2011-11-06 08:00:34
Bean vision shows me ……
Seems to be a missing "begin … end. " from sps.simba. The last end is a ';' rather than a '.'
Gu3st...
2011-11-06 08:15:12
The reason there is no begin…end. is because it's an include file. begin…end. is only used for programs, but in this case it's an include, not a program :)
Lima Bean
2011-11-06 08:28:52
ok slight of extension name :)
Wizzup?
2011-11-06 08:44:22
From: Markus
Stupid suggestion: don't you need sharemem/cmem to pass objects through the DLL barrier? I don't see it used within the SPS plugin (Simba also needs to be compiled with support for it).
There might be some memory sharing issue. Any thoughts on it would be appreciated. However, why would it only occur randomly?
See
http://wiki.freepascal.org/shared_library#Sharemem_implementation_details
Lima Bean
2011-11-06 09:23:29
Not sure if this will help, but this was discussed here:
http://bugs.freepascal.org/view.php?id=8623
Gu3st...
2011-11-06 09:30:22
From: Lima Bean
Not sure if this will help, but this was discussed here:
http://bugs.freepascal.org/view.php?id=8623
Woah this is amazing!
I just did {$loadlib sps} at the top of RunMe.scar in simba and removed it from the sps.simba file and surprisingly enough SPS works now!
From: Zyt3x
Woah this is amazing!
I just did {$loadlib sps} at the top of RunMe.scar in simba and removed it from the sps.simba file and surprisingly enough SPS works now!
Is this the solution then?
Gu3st...
2011-11-06 10:00:37
From: Yago
Is this the solution then?
Well it did work for me, we just need more people to confirm that it worked for them too and then we'll take action :)
Sabzi
2011-11-06 10:53:39
I will laugh if this was it. A lot. For a long time.
I hope this was it so SPS will work. And I can laugh.
Nava2
2011-11-06 10:56:53
But.. why does that work? :s
I'm not following why this works.
Markus
2011-11-06 11:09:14
Because it gets initialized before SMART/other plugins.
Actually it's weird that SPS actually works for some people, if the object (the TMufasaBitmap) resides in another memory segment then it should indeed segfault/access violation methinks. But SPS might just stay inside Simba's mem blabla because of it being loaded earlier (and SMART just passes a pointer to a buffer? that should always work).
Jakkle
2011-11-06 11:25:19
From: Zyt3x
Woah this is amazing!
I just did {$loadlib sps} at the top of RunMe.scar in simba and removed it from the sps.simba file and surprisingly enough SPS works now!
I just did this and so far I've had no problems, still early days tho so I will post back if I get any. Nice one guys :)
MSI running like a beast now :f: jagex
kingarabian
2011-11-06 11:48:42
From: Zyt3x
Woah this is amazing!
I just did {$loadlib sps} at the top of RunMe.scar in simba and removed it from the sps.simba file and surprisingly enough SPS works now!
Seeing that I got this error a shit load, I'll test it out now.
Well would ya look at that… IT FIXED IT. Time to rape the stats :stirthepot:.
Coh3n
2011-11-06 13:13:42
YES! I'll update that part of MSI and SPS now.
From: Coh3n
YES! I'll update that part of MSI and SPS now.
Great news!
~Home
Coh3n
2011-11-06 14:02:05
MSI and SPS are both updated. Please download the latest version of SPS. And, if you use SPS in your script, refer to the beginning of the "How to add SPS to you script" section of the first post as the setup has changed slightly.
'Toxin
2011-11-07 10:17:46
From: Coh3n
MSI and SPS are both updated. Please download the latest version of SPS. And, if you use SPS in your script, refer to the beginning of the "How to add SPS to you script" section of the first post as the setup has changed slightly.
Too sick, thanks a bunch Coh3n. Your contribution around here is simply amazing bud. Great to see a lot of hard work being put into MSI. I'm going to stick around here for a while and make some scripts for the hell of it seeing as no current bot is working and SRL has always been by far my favourite community to be part of.
Nava2
2011-11-07 10:52:39
From: XxX Toxin XxX
Too sick, thanks a bunch Coh3n. Your contribution around here is simply amazing bud. Great to see a lot of hard work being put into MSI. I'm going to stick around here for a while and make some scripts for the hell of it seeing as no current bot is working and SRL has always been by far my favourite community to be part of.
…. You came back? btw text me.
'Toxin
2011-11-07 11:07:58
From: Nava2
…. You came back? btw text me.
Yes I'm back. I'm bored and I wanna program. Need to port a few of my java scripts to delphi now… Should be fun.
Heavenzeyez1
2011-11-07 11:38:10
Omg, it works!!! Thank you so very much! <3
~Eerik.
Alecks
2011-11-07 14:25:11
Just updated everything(MSI, SPS, SRL, etc), still getting access violation. Have restarted it as admin over 50 times in a row and haven't gotten a single working session. It errors at GATHERMINIMAP, if that matters.
KevinHouse
2011-11-07 17:17:37
From: Alecks
Just updated everything(MSI, SPS, SRL, etc), still getting access violation. Have restarted it as admin over 50 times in a row and haven't gotten a single working session. It errors at GATHERMINIMAP, if that matters.
I have the same error when running MSI. Nothing was wrong before the {$loadlib sps} update.
I have no clue why this is happening. Latest versions of SRL, SPS and MSI.
Log:
http://pastebin.com/HSRyVKBEMaybe it's because of my 64 bit OS, I have no idea.
Coh3n
2011-11-07 18:15:07
You guys are both running as admin?
KevinHouse
2011-11-07 18:46:50
From: Coh3n
You guys are both running as admin?
I am. But it worked without running as admin before the latest access violation patch.
Alecks
2011-11-07 19:00:24
From: Coh3n
You guys are both running as admin?
I am indeed.
From: KevinHouse
I am. But it worked without running as admin before the latest access violation patch.
try deleting {$loadlib sps} and see if it works.
Alecks
2011-11-07 19:03:11
From: Yago
try deleting {$loadlib sps} and see if it works.
I deleted that from RunMe and added it back to sps, and finally got a working session.
qwerty4ever
2011-11-08 16:37:18
Hey I am new here. I don't know if it's the script that's not working or the SPS. When compiling it says:
[Error] (34:17): Unknown type 'T4DIntegerArray' at line 33
Compiling failed
Thanks.
From: qwerty4ever
Hey I am new here. I don't know if it's the script that's not working or the SPS. When compiling it says:
[Error] (34:17): Unknown type 'T4DIntegerArray' at line 33
Compiling failed
Thanks.
DO you have a line that contains {$loadlib sps} in RunMe.simba?
qwerty4ever
2011-11-08 17:53:35
From: Yago
DO you have a line that contains {$loadlib sps} in RunMe.simba?
Yes. I don't think this is an MSI script (could be wrong, I don't know much because this is my first day on here). Maybe I saved it in the wrong location? I just saved it to scripts. I press RUN and then a tab opens up called 'sps' with the compilation error above.
From: qwerty4ever
Yes. This isn't an MSI script. Maybe I saved it in the wrong location? I just saved it to scripts. I press RUN and then a tab opens up called 'sps' with the compilation error above.
Do you have the sps plugin in the Simba/Plugins folder?
qwerty4ever
2011-11-08 18:09:03
From: Yago
Do you have the sps plugin in the Simba/Plugins folder?
I have sps.dll in Simba>Plugins. I have the sps.simba script in Simba>Includes>SPS.
astoria1112000
2011-11-08 23:22:36
Cant run, Keep getting access voilation (I have everything updated). Tried deleting {$loadlib sps} from RunMe and Adding it to sps , still getting the error.
EDIT: Do i need to compile sps.simba after adding {$loadlib sps} there. I get
[Error] (105:34): Unknown identifier 'MMCX' at line 104
Compiling failed. when i compile.
astoria1112000
2011-11-08 23:39:45
From: qwerty4ever
Hey I am new here. I don't know if it's the script that's not working or the SPS. When compiling it says:
[Error] (34:17): Unknown type 'T4DIntegerArray' at line 33
Compiling failed
Thanks.
I also get this error, I have sps.dll in plugin folder
kingarabian
2011-11-09 00:02:28
From: astoria1112000
I also get this error, I have sps.dll in plugin folder
C. Getting SPS.
1. Download the SPS zip HERE
2. Locate your Simba folder. Open it up and proceed to opening up the Includes folder.
3. Extract the folder inside SPS zip into there.
4. NOW RENAME THAT FOLDER INTO SPS. YOU MUST.
5.Inside your SPS folder there will be a plugin. Copy it and put it in the main Simba plugin folder.
Try this.
astoria1112000
2011-11-09 00:05:54
^^ I have done all this, still i am getting the error on compiling sps
Coh3n
2011-11-09 01:23:15
You're not supposed to compile SPS as it's an include. You're supposed to compile a script that uses SPS.
Markus and Wizzup? (I think) have resolved the access violation issue, permanently. We just need some people to test. So, if you're receiving the access violation error, please follow these steps to test:
- Download the latest Simba here. It hasn't been released yet so no, you don't already have it.
- Download the new sps.dll plugin from here. Save it to your Simba/Plugins folder.
- Try running MSI or any script using SPS. You shouldn't have to run ad administrator.
- Report back. If it works then we can make an official release.
That did it for me, first time ive been able to run scripts that bank. I didn't have to run it as admin either.Been running for nearly an hour now. Im on win7 64 bit home premium
Coh3n
2011-11-09 12:00:22
Glad to hear it. :)
astoria1112000
2011-11-09 14:20:55
From: Coh3n
You're not supposed to compile SPS as it's an include. You're supposed to compile a script that uses SPS.
Markus and Wizzup? (I think) have resolved the access violation issue, permanently. We just need some people to test. So, if you're receiving the access violation error, please follow these steps to test:
- Download the latest Simba here. It hasn't been released yet so no, you don't already have it.
- Download the new sps.dll plugin from here. Save it to your Simba/Plugins folder.
- Try running MSI or any script using SPS. You shouldn't have to run ad administrator.
- Report back. If it works then we can make an official release.
Thank You very much , this worked
Coh3n
2011-11-09 15:58:42
I readded the {$loadlib sps} as the source of the error was found. I also added the Dwarven Mine map and a list of supported maps/surfaces on the first post.
Enjoy! :)
qwerty4ever
2011-11-09 16:14:47
I downloaded the new Simba along with the new .dll and the updated sps.simba and everything works perfectly now! Thanks.
One Question, though. For the Scripts that don't use SMART, how do I get them to work in my browser or is there another way they function?
litoris
2011-11-09 16:22:53
From: qwerty4ever
I downloaded the new Simba along with the new .dll and the updated sps.simba and everything works perfectly now! Thanks.
One Question, though. For the Scripts that don't use SMART, how do I get them to work in my browser or is there another way they function?
There is this crosshair on simba, you just move it to the game screen before starting. Of course, smart should be disabled.
Wizzup?
2011-11-09 16:37:49
Sounds like it's time for a new Simba release. :)
qwerty4ever
2011-11-09 16:41:13
From: litoris
There is this crosshair on simba, you just move it to the game screen before starting. Of course, smart should be disabled.
Thanks. Everything running smoothly now.
Shuttleu
2011-11-09 17:10:21
just to let you know, the reflection tile conversions dont work
i dont know what the conversion is so i cant fix it
~shut
From: Shuttleu
just to let you know, the reflection tile conversions dont work
i dont know what the conversion is so i cant fix it
~shut
That's been known for a bit now. I believe Coh3n plans to go through and remove all the reflection stuff. Even if he doesn't get to it, I can soon as what I was working on is mostly done now.
Coh3n
2011-11-09 20:44:32
From: Shuttleu
just to let you know, the reflection tile conversions dont work
i dont know what the conversion is so i cant fix it
~shut
Well that's what MSI is relying on right now and most locations work, so it has to work somewhat. It's not 100% accurate, though.
NCDS, I am working on removing Reflection. It's basically done, I just need to remake all the paths and location boxes (which shouldn't take THAT long). I'll also only test a few locations rather than every single one.
[Nathan]
2011-11-10 12:40:49
I have downloaded the new version of simba and SPS, put the new dll file in its place, but when I try to use SPS, it always says my location is (-1, -1). Before I updated literally 10 minutes ago using the same script it worked just fine
marpis
2011-11-10 13:38:51
From: [Nathan]
I have downloaded the new version of simba and SPS, put the new dll file in its place, but when I try to use SPS, it always says my location is (-1, -1). Before I updated literally 10 minutes ago using the same script it worked just fine
Try restarting Simba, and remember to drag the crosshair if not using SMART.
Hopefully this helps. :redface:
[Nathan]
2011-11-10 14:59:22
From: marpis
Try restarting Simba, and remember to drag the crosshair if not using SMART.
Hopefully this helps. :redface:
I did this about 6 times, then I realized I left my graphics on OpenGL while I was working on writing a wrapper to use with opengl. Oops.
From: Coh3n
You're not supposed to compile SPS as it's an include. You're supposed to compile a script that uses SPS.
Markus and Wizzup? (I think) have resolved the access violation issue, permanently. We just need some people to test. So, if you're receiving the access violation error, please follow these steps to test:
- Download the latest Simba here. It hasn't been released yet so no, you don't already have it.
- Download the new sps.dll plugin from here. Save it to your Simba/Plugins folder.
- Try running MSI or any script using SPS. You shouldn't have to run ad administrator.
- Report back. If it works then we can make an official release.
Details about the fix? :)
(What changed etc..)
~Home
Nava2
2011-11-10 15:06:10
From: Home
Details about the fix? :)
(What changed etc..)
~Home
Plugins used to use their own Memory manager, thus SPS was creating memory, and then freeing it on its own. Not exactly ideal.. thus the access violations. :)
Check the patch markus pushed, it just allows plugins to have their memory manager set.
Coh3n
2011-11-11 01:57:47
bab22
2011-11-11 16:13:29
Ok so when I try to run mining scripts i get this message from simba.
"WARNING: Player (Joe Smoe) cannot run script (Mining Guild Miner) as it is unsupported by SPS. Setting script to false."
Any ideas? haha I have been trying for the past week just to get MSI running properly XD
the script you are trying to use isn't supported yet. use another one…
bab22
2011-11-11 17:15:03
Kk thanks so much! I was assuming that it was another glitch. Is there a list of the supported scripts? or should I just go down the list till one works?
O believe the guild miner and runecrafting are the only ones.
bab22
2011-11-11 21:51:16
From: Yago
O believe the guild miner and runecrafting are the only ones.
KK thanks!
Jakkle
2011-11-14 13:07:01
Right not been around for a little while but I've come straight to this to see if sps is sorted. I got rid of my old installs and did a fresh as there is a new simba (I prefer to do that). I also re-downloaded sps and put it where it needs to be. The sps.dll I see was already in simba's plugin's folder. Anyway with
everything updated I went to run MSI and this came up.
ERROR in TMThread.LoadFile
Exception in Script: Unable to find file 'C:\Users\****\Desktop\Simba\Includes\SRL/SRL/core/mouse.scar' used from 'C:\Users\****\Desktop\Simba\Includes\srl/srl.scar'
Edit: I clicked play again and got this now :confused:
Harry
2011-11-14 13:12:49
^ that has nothing to do with SPS. Just rerun MSI with the green arrow and that error usually goes away. Blame Simba.
Jakkle
2011-11-14 13:15:05
Check my edit out, what is that all about ?
Harry
2011-11-14 13:16:02
That means you should turn off the firewall Simba extension.
Jakkle
2011-11-14 13:16:55
Oh ok I see thats never happened to me ever before. Thanks
Edit: OMG its working :D haha nice one guys for sorting the access violation out, good job :thumbsup:
Coh3n
2011-11-14 18:01:05
From: Jakkle
Oh ok I see thats never happened to me ever before. Thanks
Edit: OMG its working :D haha nice one guys for sorting the access violation out, good job :thumbsup:
Lol! I seem to be the only person getting the error. But I'm glad it's me and not 90% of users. :p
Jakkle
2011-11-14 19:15:19
Well I just got this since I changed everything
{----------------------------------------------------------------}
{ MSI Phoenix Player Report }
{----------------------------------------------------------------}
{ Time Running: 5 Hours, 43 Minutes and 0 Seconds }
{----------------------------------------------------------------}
{ }
{ Player 0: *********** }
{ Location: Varrock East Bank }
{ Time: 04h 18m 46s }
{ Active: True }
{ }
{ Script: Varrock East Miner }
{ Time: 04h 18m 46s }
{ Skill: Mining }
{ Exp: 19,512 }
{ Level: 38 }
{ Loads: 40 }
{ Item: Tin ore }
{ Amount: 584 }
{ Item: Copper ore }
{ Amount: 531 }
{ }
{----------------------------------------------------------------}
{----------------------------------------------------------------}
So seems to be working rather well, Manually stopped :)
From: Coh3n
Lol! I seem to be the only person getting the error. But I'm glad it's me and not 90% of users. :p
What error?
Coh3n
2011-11-14 21:48:48
From: Yago
What error?
A new Access Violation (coming from a different part of SPS than the last AV).
marpis
2011-11-14 22:12:09
EDIT: nvm… I always get this "heureca" ideas when going to bed but when I start drawing them on paper I always find out they don't work as I imagined they would.
Markus
2011-11-15 03:34:23
From: marpis
EDIT: nvm… I always get this "heureca" ideas when going to bed but when I start drawing them on paper I always find out they don't work as I imagined they would.
Well if you really want something different and have some spare time, you could maybe try to implement mine? It'll be a a bit of a memory hog (10mb for entire map is doable though) and I have no idea about the accuracy, but it should be quite tolerant to partial visible minimaps and rotated maps, as long as the reference map is 100% complete.
Flight
2011-11-15 04:26:51
Any suggestions on what would cause surface areas '7_11' and '8_11' to fail so badly? The colors look pretty stable to me compared to the rest of the map. I cannot for the life of me get 2 stable runs in my path before I end up at the wrong spot of SPS gets lost all together. This is the only problem standing in the way of my script at the moment.
marpis
2011-11-15 04:54:33
From: Flight
Any suggestions on what would cause surface areas '7_11' and '8_11' to fail so badly? The colors look pretty stable to me compared to the rest of the map. I cannot for the life of me get 2 stable runs in my path before I end up at the wrong spot of SPS gets lost all together. This is the only problem standing in the way of my script at the moment.
And compass is set to North correctly?
Flight
2011-11-15 05:01:01
From: marpis
And compass is set to North correctly?
Yep, via ClickNorth. Also, according to the include, if the compass isn't at north already SPS will call ClickNorth.
Deni_mulic
2011-11-15 05:26:00
My script gets lost walking between Falador east bank & Dark Wizards in Port Sarim, the points are 60 pixels apart, should they be closer or is there something else that could be screwing up :s
marpis
2011-11-15 08:00:49
From: Deni_mulic
My script gets lost walking between Falador east bank & Dark Wizards in Port Sarim, the points are 60 pixels apart, should they be closer or is there something else that could be screwing up :s
I suggest you pick points closer to each other, like 20-40 pixels apart.
Also are you using the right areas?
Coh3n
2011-11-15 13:30:30
From: Flight
Any suggestions on what would cause surface areas '7_11' and '8_11' to fail so badly? The colors look pretty stable to me compared to the rest of the map. I cannot for the life of me get 2 stable runs in my path before I end up at the wrong spot of SPS gets lost all together. This is the only problem standing in the way of my script at the moment.
How are you making your path?
putonajonny
2011-11-15 19:34:27
I'm getting the following error :(
[Error] C:\Simba\Includes\sps/sps.simba(34:17): Unknown type 'T4DIntegerArray' at line 33
Nava2
2011-11-15 19:51:24
From: putonajonny
I'm getting the following error :(
[Error] C:\Simba\Includes\sps/sps.simba(34:17): Unknown type 'T4DIntegerArray' at line 33
You need to put the plugin in the plugin directory and restart Simba.
Flight
2011-11-15 20:18:19
From: Coh3n
How are you making your path?
Path_ToAlter := [Point(2999, 4605), Point(3048, 4608), Point(3099, 4598), Point(3144, 4575),
Point(3173, 4538), Point(3201, 4525), Point(3254, 4535), Point(3283, 4556)];
And these are called
once in the script:
SPS_Setup(RUNESCAPE_SURFACE, ['7_11','8_11']);
SPS_Continue := True;
I know it's nothing wrong with the path or how I set up SPS because once in a blue moon it will correctly walk me to the alter, but that's rare, and it also won't pull off two trips in a row, it always seems to get lost on the second trip. I've tried making paths spaced far apart as well as paths spaced extremely close together, neither prevail. I'm really hoping you can point out a mistake or throw some suggestions my way because I'm really running low on options here, Coh3n.
Coh3n
2011-11-15 21:45:10
I meant how are you gathering the points?
If part of your path is close to the edge of the SPS area, try also including other areas that overlap if you know what I mean. If that doesn't work, I may get you to try the new maps I've created.
Flight
2011-11-15 22:56:06
I'll give that a try. I might also try manually making my path; I've previously been using the PathMaker.
marpis
2011-11-16 00:10:45
Now that SPS works quite fast, we could try using bigger areas, that'd be more user friendly? :) instead of 500x500, we could try 1000x1000?
scarscaper4life
2011-11-17 05:33:24
awsome!
Flight
2011-11-17 06:02:25
From: marpis
Now that SPS works quite fast, we could try using bigger areas, that'd be more user friendly? :) instead of 500x500, we could try 1000x1000?
I definitely agree. I wonder if this is part of my problems I've been having with walking paths. Maybe bigger areas would mean more accuracy, less chance to get points mixed up with surrounding areas. I'm for this, Marpis.
marpis
2011-11-17 08:36:14
From: Flight
I definitely agree. I wonder if this is part of my problems I've been having with walking paths. Maybe bigger areas would mean more accuracy, less chance to get points mixed up with surrounding areas. I'm for this, Marpis.
Well, it probably won't add accuracy, and accuracy is not a problem anyway. There's something else going wrong there then. It just make it easier to pick areas.
Flight
2011-11-17 09:38:01
Well maybe or maybe not. It seems to have problems when a new map region is loaded.
Coh3n
2011-11-17 14:47:21
From: marpis
Now that SPS works quite fast, we could try using bigger areas, that'd be more user friendly? :) instead of 500x500, we could try 1000x1000?
Wouldn't that decrease accuracy?
From: Flight
Well maybe or maybe not. It seems to have problems when a new map region is loaded.
You mean when a new surface is loaded?
I've been having a little trouble with the Dwarven Mine. It works really well sometimes, but other times GetMyPos returns something completely wrong. Marpis, the MatchesFound addition would help with this would it not? Part of it could be that the mine is a pretty consistent colour, but on the other hand, each part of the map/minimap has a unique outline that distinguishes it from other areas.
Flight
2011-11-17 20:01:33
From: Coh3n
Wouldn't that decrease accuracy?
You mean when a new surface is loaded?
Yes.
marpis
2011-11-18 00:07:40
From: Coh3n
Wouldn't that decrease accuracy?
You mean when a new surface is loaded?
I've been having a little trouble with the Dwarven Mine. It works really well sometimes, but other times GetMyPos returns something completely wrong. Marpis, the MatchesFound addition would help with this would it not? Part of it could be that the mine is a pretty consistent colour, but on the other hand, each part of the map/minimap has a unique outline that distinguishes it from other areas.
Very unlikely that it'd decrease accuracy.
Well, the MatchesFound addition could help, but it would probably just return (-1, -1).
You can try smaller tolerance.
Coh3n
2011-11-18 18:21:24
From: Flight
Yes.
What kind of problems?
From: marpis
Very unlikely that it'd decrease accuracy.
Well, the MatchesFound addition could help, but it would probably just return (-1, -1).
You can try smaller tolerance.
Well from Harry's issue with the water/maze, and my issue with it repeatedly clicking black on the minimap, couldn't we somehow have it check the colour on the minimap with the colour on the SPS area? If they're no where near each other, something is wrong?
Flight
2011-11-18 20:11:43
As I explained previously it just walks to random spots about half way through my path (I figured it was very close to where the new area is loaded), and counts those wrong points as part of the path array, so it sill thinks it walked the path successfully.
Coh3n
2011-11-19 01:47:27
From: Flight
As I explained previously it just walks to random spots about half way through my path (I figured it was very close to where the new area is loaded), and counts those wrong points as part of the path array, so it sill thinks it walked the path successfully.
Sorry, I don't really understand. :o When I say "Surface" I mean Runescape Surface, Essence Mine, Dwarven Mine, etc. When I say "Area" I mean the pieces of the map, the 13_12 and 10_9 that are called upon in SPS_Setup.
The areas are all loaded at once, not as you're walking the path. Your problem may be resolved if you use the new maps, I'm not sure. I've created a new branch with the new maps that can be downloaded
here. Keep in mind that you have to remake your path, and if you're using the PathMaker, use the new RS Surface map in SPS/img/runescape_surface/.
Flight
2011-11-19 02:37:54
From: Coh3n
Sorry, I don't really understand. :o When I say "Surface" I mean Runescape Surface, Essence Mine, Dwarven Mine, etc. When I say "Area" I mean the pieces of the map, the 13_12 and 10_9 that are called upon in SPS_Setup.
The areas are all loaded at once, not as you're walking the path. Your problem may be resolved if you use the new maps, I'm not sure. I've created a new branch with the new maps that can be downloaded here. Keep in mind that you have to remake your path, and if you're using the PathMaker, use the new RS Surface map in SPS/img/runescape_surface/.
Wonderful, I'll give those new maps a whirl. Also, thanks for the reminder about the loading the new img into the path-maker.
marpis
2011-11-20 23:40:11
From: marpis
Now that SPS works quite fast, we could try using bigger areas, that'd be more user friendly? :) instead of 500x500, we could try 1000x1000?
I take this back!
I have an idea how to recognize which are the most likely areas you're on! I'm going to write some code when I have time. :)
On one area there are many many minimap views, depending on where on that area you are. Each minimap view has different RGB ratios depending on your environment. In forests there is lots of green but little blue and red. In swamps there's also lots of green but there might be medium amount of blue and low red.
We have 27 profiles for every kind of minimap view:
(LowR, LowG, LowB)
(MedR, LowG, LowB)
(HigR, LowG, LowB)
(LowR, MedG, LowB)
(LowR, HigG, LowB)
and so on and so on.
Now I will make a script that will analyze every area and tell me
which kinds of minimap view profiles it contains. One area may have many profiles, so it will appear as a suggestion in many places. When we have profiled our current minimap view, we only use areas from a premade TStringArray that only has areas which contain views like ours.
The problem that will probably rise here, is that there could be way too many areas in every array. I know that this will happen when in woods, but there's just not much you can do about it.
To prevent this, we could also profile the areas the same way using HSL.
That will give us 729 different profiles, which will most likely mean less areas in each array. To do this, we need to modify the plugin a bit.
The goal is to have 1-3 areas in each array, excluding forests.
EDIT: Ok so I made this script. For area '8_10' I got 8 profiles. Now I'm going to try dividing RGB ratios to 5 categories instead of 3 and see how it goes.
Nava2
2011-11-21 10:56:17
Coh3n and I were talking about doing HSL as well.. Its not that complicated and we could do it.
Just store the information in a text file alongside the full pictures. We can "profile" every map and then just build records instead of the just the TIntegerArray. We could then cross reference the values of the current area on the minimap (..ugh speed?) and the stored values. Make sense?
Btw, I'm running your profiler from the other thread.. this needs to be plugin-ized. BAD.
marpis
2011-11-21 12:59:44
From: Nava2
Coh3n and I were talking about doing HSL as well.. Its not that complicated and we could do it.
Just store the information in a text file alongside the full pictures. We can "profile" every map and then just build records instead of the just the TIntegerArray. We could then cross reference the values of the current area on the minimap (..ugh speed?) and the stored values. Make sense?
Btw, I'm running your profiler from the other thread.. this needs to be plugin-ized. BAD.
Well, yeah :rolleyes: I just don't even have lazarus on my laptop now.
And my idea is to have an
Array [0..444] of TStringArray because there are 125 different profiles, each profile is presented as a number, ranging from 0 to 444. The formula can be found in the profiler script. Then it's simple as this:
var
CurrentViewProfile: Integer;
MostProbableAreas: TStringArray;
ProfiledAreas := Array [0..444] of TStringArray;
begin
CurrentViewProfile := SPS_ProfileMinimap();
MostProbableAreas := ProfiledAreas[CurrentViewProfile];
end;
Then just run the regural FindMapInMapExx using MostProbableAreas. :)
Nava2
2011-11-21 16:04:12
But can we profile the minimap to be similar to the full chunk? It seems that the mark might be off dependant on where you are in the chunk.. Thus the part of the map might be better off being smaller.. We would have to implement some form of tolerance or a range of values since the average when you are on the docks of karamja it will be very different than if you are in the plantation.. Just something to think about.
I hope that made sense..
Can we do something where you dont have to be facing north?
Nava2
2011-11-21 16:21:42
From: Yago
Can we do something where you dont have to be facing north?
You could do that with rotating the bitmap before giving it to sps – it will be slower.
I believe someone else was looking into this.. It's bit necessarily hard, but just a bit intensive.
marpis
2011-11-22 01:15:35
From: Nava2
But can we profile the minimap to be similar to the full chunk? It seems that the mark might be off dependant on where you are in the chunk.. Thus the part of the map might be better off being smaller.. We would have to implement some form of tolerance or a range of values since the average when you are on the docks of karamja it will be very different than if you are in the plantation.. Just something to think about.
I hope that made sense..
My technique takes this into consideration, as it finds multiple profiles for each area.
It goes through every possible "minimap view" in that area and makes a profile, adds it to an array. In the end all double profiles are cleaned from the profile array. :)
Nava2
2011-11-22 09:10:59
From: marpis
My technique takes this into consideration, as it finds multiple profiles for each area.
It goes through every possible "minimap view" in that area and makes a profile, adds it to an array. In the end all double profiles are cleaned from the profile array. :)
There are (total_width-minimapwidth)*(total_height-minimapheight) possibilities, per SPS map. Is that what you took into account?
Remember, the minimap could shift by just one pixel.. :/
marpis
2011-11-22 11:22:43
From: Nava2
There are (total_width-minimapwidth)*(total_height-minimapheight) possibilities, per SPS map. Is that what you took into account?
Remember, the minimap could shift by just one pixel.. :/
Try to read the code in the other post, see if you can understand it. :redface:
When I make a profile for our current minimap, I count all the pixels together, to get a total sum of the red, green and blue counts. Then I rate how much there is of each color, with a scale from 0 to 4. When I rate all 3 colors in such manner, we get 125 different combinations of these profiles. For example this is one profile:
Red count very low: 0
Green count medium: 2
Blue count: rather high: 3
My script goes through every possible minimap view in every area, calculating what all profiles there are. When we have 1
array of array of string for each profile (totally 125 of them) and we know which profile our current minimap view represents, we can easily load all zones that have that matching profile. This means that one area can be in multiple arrays.
The lenght of the array would be 444, because as profiles are presented as single integers, 444 is the highest integer. This means that there are 444 - 125 = 319 empty subarrays, but we don't care about that.
When we analyze our minimap and get the previous example profile 023 = 23, we have all the areas matching our current profile listed in
SPS_ProfiledAreas[23], the 2D string array I just talked about.
The content of
SPS_ProfiledAreas[23] could be, for example ['1_12', '4_5', '7_2']
Lunar island got messed recently, needs a new map.
From: DaWu
Lunar island got messed recently, needs a new map.
one way to put it =D how so did it get messed if you dont mind me asking ;D
From: pur3b100d
one way to put it =D how so did it get messed if you dont mind me asking ;D
First of all, sps walks mega slow on the whole island. Second, tiles are off near the altar as they changed the altar peninsula and the whole island slightly.
Compare current worldmap to one you got in your SPS image folder and notice it.
Coh3n
2011-11-23 15:40:11
How recent? I've had new maps made for a while I just haven't had enough time to properly test. Plus the fonts thing set me back a day. Also, the "slow walking" you're talking about will be fixed.
From: DaWu
First of all, sps walks mega slow on the whole island. Second, tiles are off near the altar as they changed the altar peninsula and the whole island slightly.
Compare current worldmap to one you got in your SPS image folder and notice it.
lol no i understand i was just questioning the way you said it in the first place lol
From: Coh3n
How recent? I've had new maps made for a while I just haven't had enough time to properly test. Plus the fonts thing set me back a day. Also, the "slow walking" you're talking about will be fixed.
Well it worked absolutely perfect before the graphics update.
So very recent.
Flight
2011-11-23 20:37:03
I don't think it's just Lunar Island. I was testing Naturez after the graphic update (I think it was around this time) and SPS is taking a long time after stopping at a flag to, I guess, find the next walk tile. Atleast long compared to what it was before.
Coh3n
2011-11-23 20:40:07
From: Flight
I don't think it's just Lunar Island. I was testing Naturez after the graphic update (I think it was around this time) and SPS is taking a long time after stopping at a flag to, I guess, find the next walk tile. Atleast long compared to what it was before.
That's because rs_GetCompassAngle broke as well. All that will be fixed in the next version of SPS, which I'm hoping will be very soon.
Flight
2011-11-23 20:54:47
From: Coh3n
That's because rs_GetCompassAngle broke as well. All that will be fixed in the next version of SPS, which I'm hoping will be very soon.
Oh ok yeah that would make sense, I didn't think about that. Just out of curiosity, where would I find the function rs_GetCompassAngle?
Coh3n
2011-11-23 21:02:06
From: Flight
Oh ok yeah that would make sense, I didn't think about that. Just out of curiosity, where would I find the function rs_GetCompassAngle?
overwrite.scar. It's actually fixed in the latest SRL. Um, in SPS.simba, change the getCompassDegrees line in SPS_GetMyPos to this:
if (inRange(round(rs_GetCompassAngleDegrees), 5, 355)) then
That should fix it. If not, let me know.
^^ fixes it.
Tho tiles are still slightly messed at lunar island.
Coh3n
2011-11-23 21:49:06
From: DaWu
^^ fixes it.
Tho tiles are still slightly messed at lunar island.
Yeah those won't be fixed until I push the new map to the SPS repository.
Coh3n
2011-11-24 22:03:55
Please see
this thread for latest update news. Also,
From: Coh3n
P.S. For anyone who uses SPS in their scripts, you MAY need to remake your paths as the new maps are slightly offset from the old ones. This is due to my generator creating a slightly different sized map. This will only happen once since the generator will always create the same size from now on.
From: Coh3n
Please see this thread for latest update news. Also,
Do you know the x & y offset?
Coh3n
2011-11-25 00:27:53
What offsets are you referring to?
Harry
2011-11-25 00:29:01
The difference from the last version, I think he means.
Coh3n
2011-11-25 00:31:41
Oh, I have no idea.
marpis
2011-11-26 13:19:26
I just came up with a very quick fix to FindMapInMapExx to make it a bit faster :)
When it analyzes a view (I have started calling the 100x100 pixel box you gather from minimap a view) it checks if it's even possible to beat the currently best matching area, with a very simple formula:
if (BoxesLeftInView + Matching) <= BestMatch then Break;Because the best possible score for a view is if all the boxes left match. So summing BoxesLeftInView and currently Matching boxes, we get the best possible score for that area. If it's less than BestMatch, then there's no point in going through the rest of the view.
In my theory, this will make SPS very much faster especially when the actual correct view is found in the first area we are analyzing. It will quickly skip the following views after that.
To make use of this, we should use quite high tolerance, so that when the real matching view is found, the score would be so high it just skips basically all the rest views.
I don't have lazarus on this crappy laptop, so could someone replace SPS_FindMapInMapExx in the plugin? Thanks!
—
On the sidenote, I don't think we should start using the number of matches as an indicator if we have actually found our real position. This is because I want SPS to eventually always find 1-4 areas that you are most likely in (and you would always be in one of them) and then always find you from that area. In GE and crowded places there are far less matches than in some unpopulated woods, thus making it impossible to find a good number. Unless, we count the number of player/drop/npc dots and make a function that tells us how many matches is enough depending on how distorted the view is. This however slows SPS down many valuable milliseconds and introduces one more thing that can go wrong.
—
Here's the new function:
function SPS_FindMapInMapEx(out fx, fy: integer; LargeMap: T4DIntegerArray; SmallMap: T3DIntegerArray; tol: extended): integer; register;
var
x, y, HighX, HighY, cm, L: integer;
xx, yy: integer;
Matching, BestMatch: integer;
BoxesLeftInView: integer;
b: Boolean;
begin
fX := -1;
fY := -1;
BestMatch := 0;
L := Length(LargeMap);
Result := -1;
for cm := 0 to L-1 do
begin
HighX := High(LargeMap[cm]) - 19;
HighY := High(LargeMap[cm][0]) - 19;
for x := 0 to HighX do
for y := 0 to HighY do
begin
// Reset these in the beginning of every 20x20 view (100x100 pixels)
Matching := 0;
BoxesLeftInView := 400; // 20x20 = 400
for xx := 0 to 19 do
for yy := 0 to 19 do
begin
// added 26.11.2011 to improve speed
// will stop going through the view if it's not possibly better than
// the best one found.
if (BoxesLeftInView + Matching) <= BestMatch then
Break;
Dec(BoxesLeftInView);
b:= SPS_ColorBoxesMatchInline(LargeMap[cm][x+xx][y+yy], SmallMap[xx][yy], tol);
if (b) then Inc(Matching);
end;
if (Matching > BestMatch) then
begin
BestMatch := Matching;
Result := cm;
fX := x;
fY := y;
end;
end;
end;
if (Result > -1) then
begin
// moved outside to remove uncessary calculations in interations.
fX := fX * 5 + 50; // cause we want the center
fy := fY * 5 + 50;
end;
end;
Trippeh
2011-11-28 13:41:57
From: Trippeh
Desert walking is bugged it just cant find the most 'pale' sand color to walk on.
Would be heaven if this got fixed.
Cheerz, (I Would if I knew how :P)
Posted this in an other topic too by mistake. (Sorry)
From: Trippeh
Posted this in an other topic too by mistake. (Sorry)
Same goes with snow sadly.
marpis
2011-11-29 01:17:02
Also, we should have the SPS_Tolerance as a variable rather than a constant.
In SPS_Setup, set it to 0.3 as default and scripters may change it in their scripts if they want to.
Trippeh
2011-11-29 02:00:00
From: marpis
Also, we should have the SPS_Tolerance as a variable rather than a constant.
In SPS_Setup, set it to 0.3 as default and scripters may change it in their scripts if they want to.
If this would fix it, great! :P:spot:
From: Trippeh
If this would fix it, great! :P:spot:
Most likely wont, cause I played with tolerance at the area im having troubles with.
Trippeh
2011-11-29 10:10:38
From: DaWu
Most likely wont, cause I played with tolerance at the area im having troubles with.
Same had no luck..
Coh3n
2011-11-29 16:58:30
From: marpis
Also, we should have the SPS_Tolerance as a variable rather than a constant.
In SPS_Setup, set it to 0.3 as default and scripters may change it in their scripts if they want to.
They already can. SPS_Surface is a global variable. It's reset every time SPS_Setup is called.
From: DaWu
Most likely wont, cause I played with tolerance at the area im having troubles with.
It works for some locations, not all.
dislocated
2011-12-02 21:59:37
hey, where can I download a upadated SPS File… I extracted it a long time ago and made a new file called SPS but I think I need to update it because MSI does not work for me
From: dislocated
hey, where can I download a upadated SPS File… I extracted it a long time ago and made a new file called SPS but I think I need to update it because MSI does not work for me
It's in the update extension srl thing.
Coh3n
2011-12-05 16:37:41
From: dislocated
hey, where can I download a upadated SPS File… I extracted it a long time ago and made a new file called SPS but I think I need to update it because MSI does not work for me
The extensions were updated, so MSI, SPS, and SRL are all included in one updater. What you should do is close Simba, delete your SRL, SPS and MSI folders, then start over, following
this guide.
I Am Legend
2011-12-08 03:10:13
How can i set run on only when it reaches certain areas or maps areas ? thanks.
marpis
2011-12-08 03:57:30
From: I Am Legend
How can i set run on only when it reaches certain areas or maps areas ? thanks.
You need to make that happen in your own code.
You can split your walking paths into "run-paths" and "walk-paths", as such:
function GoToSomewhere: boolean;
var
WalkPath: TPointArray;
RunPath: TPointArray;
begin
WalkPath := [Point(123, 123), Point(321, 321), Point(456, 456), Point(234, 234)];
RunPath := [Point(567, 567), Point(543, 543), Point(987, 987), Point(346, 346)];
SetRun(False); // Makes us walk
if not SPS_WalkPath(WalkPath) then Exit; // Quit if the first part fails
SetRun(True); // Makes us run
Result := SPS_WalkPath(RunPath); // The function returns True if we successfully run the path
end;
I Am Legend
2011-12-08 04:33:40
oh thats a good way , thanks .
KingKong
2011-12-08 04:52:42
someone needs to change the walktopoint or walkpath so that it does't do setrun(or whatever it does) because it clicks the run button every time its called.
Coh3n
2011-12-08 12:54:12
From: KingKong
someone needs to change the walktopoint or walkpath so that it does't do setrun(or whatever it does) because it clicks the run button every time its called.
SPS_WalkPath calls RunEnergy(20);, so perhaps GetMMLevels is broken?
Infantry001
2011-12-11 15:56:47
Is there any way for us to help you create other maps/surfaces?
Claymore
2011-12-11 17:42:53
From: Infantry001
Is there any way for us to help you create other maps/surfaces?
Just take a look at SPS.simba and look
// Should be called in scripts to setup SPS
// Needs to be called each time the surface changes (i.e. from runescape_surface to essence_mine)
procedure SPS_Setup(surface: integer; areas: TStringArray);
begin
SPS_Areas := areas;
case surface of
RUNESCAPE_SURFACE:
with SPS_Surface do
begin
Name := 'Runescape Surface';
ImagePath := SPS_IMG_PATH + 'runescape_surface\';
FactorX := 400;
FactorY := 400;
TileOffsetX := -1;
TileOffSetY := -1;
Tolerance := 0.3;
end;
DUNGEON_ESSENCE_MINE:
with SPS_Surface do
begin
Name := 'Essence Mine';
ImagePath := SPS_IMG_PATH + 'essence_mine\';
FactorX := 400;
FactorY := 1;
TileOffsetX := -1;
TileOffSetY := -1;
Tolerance := 0.5;
end;
DWARVEN_MINE:
with SPS_Surface do
begin
Name := 'Dwarven Mine';
ImagePath := SPS_IMG_PATH + 'dwarven_mine\';
FactorX := 400;
FactorY := 340;
TileOffsetX := -1;
TileOffSetY := -1;
Tolerance := 0.35;
end;
RUNECRAFTING_ALTARS:
with SPS_Surface do
begin
Name := 'Runecrafting Altars';
ImagePath := SPS_IMG_PATH + 'RUNECRAFTING_ALTARS\';
FactorX := 400;
FactorY := 400;
TileOffsetX := -1;
TileOffSetY := -1;
Tolerance := 0.2;
end;
end;
SPS_Surface.Constant := surface;
if (SPS_Debug) then
begin
SPS_DebugStr('[SPS] SPS_Surface: ' + SPS_Surface.Name);
SPS_DebugStr('[SPS] SPS_Areas: ' + toStr(SPS_Areas));
end;
SPS_Loaded := false;
end;
First of all create a constant named corresponding to the dungeons name. (I.E Essence Mine -> ESSENCE_MINE)
as for the array.
Name - Name it again until its stuck under your tongue…
ImagePath - Location of the images (which youll provide later.)
FactorX,FactorY - I believe the dimensions of all the split images of the dungeon?
TileoffsetX, TileoffsetY - default -1, really thats all i see from all the other ones.
Tolerance - To your desire.
As for the image files, simply take the whole dungeon map, and cut it into the dimensions set in FactorX and FactorY.
Am i getting close anyone? No? Man…
Infantry001
2011-12-12 21:34:43
Yeah, I meant the actual image itself. Where do you find the entire image of a dungeon/surface?
(I don't play runescape much, so please excuse my ignorance)
Coh3n
2011-12-12 23:31:18
From: Infantry001
Yeah, I meant the actual image itself. Where do you find the entire image of a dungeon/surface?
(I don't play runescape much, so please excuse my ignorance)
Open the world map in the game, and at the bottom there's a surface drop down box with a bunch of different dungeons to select from.
KillerTHC
2011-12-15 08:28:49
From: Coh3n
Open the world map in the game, and at the bottom there's a surface drop down box with a bunch of different dungeons to select from.
By anychance does anyone know the surface/dungeon that the sorceress gerden is in? I cant seem to find it on any of the maps.
From: KillerTHC
By anychance does anyone know the surface/dungeon that the sorceress gerden is in? I cant seem to find it on any of the maps.
I don't believe there is currently an SPS map for that area.
KillerTHC
2011-12-15 09:08:08
From: NCDS
I don't believe there is currently an SPS map for that area.
I understand that, what I meant was where I could find it on the RS map, like what dungeon it is in, ie what map would I have to select from the drop down box in RS, so I could add it to SPS.
I now have the general idea of how to add the map to SPS, my only problem is obtaining a full image of the map. Would it be possible to use many images of my minimap spliced together to form one bigger map for SPS?
marpis
2011-12-15 09:46:16
From: KillerTHC
I now have the general idea of how to add the map to SPS, my only problem is obtaining a full image of the map. Would it be possible to use many images of my minimap spliced together to form one bigger map for SPS?
Yes.
Kyle Undefined
2011-12-15 09:51:50
Doesn't Cohen have a tool that does this? Or does it work differently?
marpis
2011-12-15 12:27:04
From: Camo Developer
Doesn't Cohen have a tool that does this? Or does it work differently?
Coh3n's tool opens the worldmap and graps images from it I guess.
KillerTHC
2011-12-15 15:00:24
From: marpis
Coh3n's tool opens the worldmap and graps images from it I guess.
Where can I find Coh3n's tool? Also how does the FactorX and FactorY work? Are they the dimensions of the split images? Or are they the dimensions of the whole map image? Also I noted that in your mathematics post you talk about the images being 100 x 100 pixels, however when I go into the img folder I see that they are actually 500 x 500 pixels. What size should the split images be?
nubsrevenge
2011-12-20 16:46:18
Tried using SPS walking to just do a circle across the two bridges in lumbridge
SPS_Setup(RUNESCAPE_SURFACE ,['11_9','12_9']);
MyPath := [Point(4726, 3784), Point(4777, 3785), Point(4754, 3736), Point(4719, 3686), Point(4705, 3631), Point(4748, 3618), Point(4820, 3622), Point(4849, 3670), Point(4874, 3710), Point(4857, 3754), Point(4790, 3756), Point(4763, 3784), Point(4729, 3784)];
WriteLn(SPS_GetMyPos());
SPS_WalkPath(MyPath);
if (SPS_WalkPath(MyPath)) then
WriteLn('We made it!');
and all that did was print out the GetMyPos and then say We made it! after not moving
i was following the sample code pretty closely so I dont know whats wrong
From: nubsrevenge
Tried using SPS walking to just do a circle across the two bridges in lumbridge
SPS_Setup(RUNESCAPE_SURFACE ,['11_9','12_9']);
MyPath := [Point(4726, 3784), Point(4777, 3785), Point(4754, 3736), Point(4719, 3686), Point(4705, 3631), Point(4748, 3618), Point(4820, 3622), Point(4849, 3670), Point(4874, 3710), Point(4857, 3754), Point(4790, 3756), Point(4763, 3784), Point(4729, 3784)];
WriteLn(SPS_GetMyPos());
SPS_WalkPath(MyPath);
if (SPS_WalkPath(MyPath)) then
WriteLn('We made it!');
and all that did was print out the GetMyPos and then say We made it! after not moving
i was following the sample code pretty closely so I dont know whats wrong
By default it will try to move to the last point I believe…. It probably saw that it was near your last point and returned true.
nubsrevenge
2011-12-21 03:31:35
From: Yago
By default it will try to move to the last point I believe…. It probably saw that it was near your last point and returned true.
thank you, that was the problem, its working for me now if a little inaccurate lol
jordi1104
2011-12-22 10:55:08
Nvm.
Gaston7eze
2011-12-22 18:40:31
i dont have the .DLL file,what should i do?
onilika
2011-12-22 18:45:10
If you have the newest simba, you should have SPS.
While on Simba, Click on View > Extensions . Make sure you have srl enabled and update it.
If that doesn't work, download from the link of the first page, that .dll file
~onilika
NickMystre
2012-01-13 10:06:38
Would someone in the know please explain to me how I go about adding to the available SPS surfaces.
Apart from growing my own understanding, I also want to contribute to the community.
Any takers ?
Coh3n
2012-01-13 18:43:47
From: NickMystre
Would someone in the know please explain to me how I go about adding to the available SPS surfaces.
Apart from growing my own understanding, I also want to contribute to the community.
Any takers ?
I think most of the maps have been made
here. Marpis said he was going to add them to SPS2.
NickMystre
2012-01-14 01:15:55
From: Coh3n
I think most of the maps have been made here. Marpis said he was going to add them to SPS2.
OK! I'll keep on looking. Thx!
EDIT: Will certainly check out the maps though, if only to look over and admire Heros' handy work.
Coh3n
2012-03-01 01:22:29
The Dominion Tower map has now been added thanks to mika. :)
Justin
2012-04-08 23:39:17
Fantastic news! Thanks
Coh3n
2012-04-08 23:42:47
SPS 2.0 has now been released. Updated first post to reflect changes.
Daniel
2012-04-09 09:11:25
From: Coh3n
SPS 2.0 has now been released. Updated first post to reflect changes.
From TODO:
– ** Work from any compass angle
– World walker
Is it really 2.0? Or something like 1.7/8/9..?
Coh3n
2012-04-09 13:13:13
Doesn't really matter. On github it's just SPS, so those additions can be added whenever. The point is it's a major update that may require some changed on the script side (most likely not).
Justin
2012-04-09 22:36:24
I found SPS 2.0 to be extremely slow.
http://srljustin.com/sps_slow/sps_slow.html
Path:
Path_ToAlter := [Point(3020, 4640), Point(3070, 4635), Point(3120, 4630),
Point(3165, 4605), Point(3195, 4565), Point(3245, 4560), Point(3285, 4575), Point(3305, 4590)];
Walking method
SPS_WalkPath(Path_ToAlter);
SPS_Setup:
SPS_Setup(RUNESCAPE_SURFACE, ['7_11','8_11','11_7','11_6']);
Hope that helps.Problem solved. Was loading Varrock maps (for some reason) when I didn't even use them (11_7,11_6)
Coh3n
2012-04-10 01:03:06
Yeah. The more maps you have, the slower it's going to be. That part hasn't changed. It has, however, been made a few ms slower to greatly increase the accuracy.
Archaic
2012-04-10 21:44:29
while it gets stuck on large obstacles occasionally, blind/wind walk is an awesome feature:D
Thanks for the hard work!:)
Not giving me a accurate location in edge Vill I've even tried taking part of the MM and pasted it over 10_6 and still nothing its putting me 200 Titles out.
Mat
Total
2012-04-13 19:48:48
2.0 going slower for me :( Went from 5k+ nats/hr avg to 4.6k+ nats/hr avg. Might need to switch to a different walking method to speed it back up.
Coh3n
2012-04-13 20:39:17
From: Mat
Not giving me a accurate location in edge Vill I've even tried taking part of the MM and pasted it over 10_6 and still nothing its putting me 200 Titles out.
Mat
Post where exactly in Edgeville and the code you're trying to use. If the player is near the edge of the area, I recommend including areas next to that edge.
From: TotalKillz
2.0 going slower for me :( Went from 5k+ nats/hr avg to 4.6k+ nats/hr avg. Might need to switch to a different walking method to speed it back up.
Try using SPS_BlindWalk instead of SPS_WalkPath.
Total
2012-04-13 20:51:33
Thats even slower for me. >.< It waits till it gets to the flag, waits about 1 second, then clicks the next point.
junsin
2012-04-14 05:48:15
[Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] C:\Users\CCPPCCPPCCPP\Downloads\Evlin'sGildedAltarV4SummoningSupport (3).simba(143:5): Unknown identifier 'SPS_Continue' at line 142
Compiling failed.
downloading that new SPS thing made no difference
putonajonny
2012-04-14 12:31:03
Sometimes getting around 200 pixels out around Duel Arena :( I would give more details but I don't know what to say, it is desert so I wouldn't expect it to be perfect, but the area it thinks I am in looks nothing like the area I am in, Desert Vs Swamp :S
Coh3n
2012-04-14 16:38:17
From: putonajonny
Sometimes getting around 200 pixels out around Duel Arena :( I would give more details but I don't know what to say, it is desert so I wouldn't expect it to be perfect, but the area it thinks I am in looks nothing like the area I am in, Desert Vs Swamp :S
Try including another SPS area that's beside the one(s) you're using.
Hunaja
2012-04-15 10:17:16
Hi, SPS has been very inaccurate for me since the last update.
This is how I have SPS set:
SPS_Setup(RUNESCAPE_SURFACE, ['3_13','3_12','4_12','4_13']);
EntranceLoc := Point(1490, 5376);
This is wheres the Point:

But this is where its trying to walk:

I was using BlindWalk like this:
MyLoc:=sps_getMyPos;
if(distance(EntranceLoc.x,EntranceLoc.y,MyLoc.x,MyLoc.y) > 14) then SPS_BlindWalk(EntranceLoc);
I also tried using SPS_WalkToPos but it didn't help at all - same problem. That place is mobilising armies. Any advice?
smurg
2012-04-16 04:36:55
Is this broken or no?
I just copied down a small path using SPS_GetMyPost and then used SPS_WalkPath on it and it walking to random places and stopping really early. (In gnome stronghold)
Same thing for me. First time using SPS :P And it looks like SPS2 is not working correctly.
~Home
Coh3n
2012-04-16 17:01:37
From: Hunaja
Hi, SPS has been very inaccurate for me since the last update.
This is how I have SPS set:
SPS_Setup(RUNESCAPE_SURFACE, ['3_13','3_12','4_12','4_13']);
EntranceLoc := Point(1490, 5376);
This is wheres the Point:

But this is where its trying to walk:

I was using BlindWalk like this:
MyLoc:=sps_getMyPos;
if(distance(EntranceLoc.x,EntranceLoc.y,MyLoc.x,MyLoc.y) > 14) then SPS_BlindWalk(EntranceLoc);
I also tried using SPS_WalkToPos but it didn't help at all - same problem. That place is mobilising armies. Any advice?
You shouldn't need that many areas. 3_13 should be enough.
From: smurg
Is this broken or no?
I just copied down a small path using SPS_GetMyPost and then used SPS_WalkPath on it and it walking to random places and stopping really early. (In gnome stronghold)
From: Home
Same thing for me. First time using SPS :P And it looks like SPS2 is not working correctly.
~Home
Everything is working just fine for me, so I'm not sure what your problems are.
Try setting calling SPS_Accuracy := 3; after you call SPS_Setup.
'Toxin
2012-04-16 17:03:16
From: Coh3n
Try setting calling SPS_Accuracy := 3; after you call SPS_Setup.
Wow, wow, wow… This worked for the issues I was having pertaining to SPS. Thanks Coh3n.
Coh3n
2012-04-16 17:04:08
[QUOTE='Toxin;991907]Wow, wow, wow… This worked for the issues I was having pertaining to SPS. Thanks Coh3n.[/QUOTE]The lower the number, the more accurate it will be, but also the slower it will be.
I'm going to add a section on SPS variables to the first post.
'Toxin
2012-04-16 17:14:09
From: Coh3n
The lower the number, the more accurate it will be, but also the slower it will be.
I'm going to add a section on SPS variables to the first post.
Please do, these constants are very useful, I wasn't aware of this specific one to be perfectly honest with you. There may even be others that may or may not help.
Coh3n
2012-04-16 17:17:50
[QUOTE='Toxin;991916]Please do, these constants are very useful, I wasn't aware of this specific one to be perfectly honest with you. There may even be others that may or may not help.Done.
From: Coh3n
SPS Global Variables:
[INDENT]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.[/INDENT]
- 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. I recommend setting SPS_Accuracy to 3.
'Toxin
2012-04-16 17:19:02
Thank you once again, Coh3n. You're handling this project in a very organized matter :)
digitalninja
2012-04-21 19:33:26
So I followed the instructions on installing SIMBA and kept getting the same issue.
Unable to find file 'sps/sps.simba' used from 'C:\Simba\Includes\MSI/MSI/Core/Setup.simba'
There is already a thread on this but essentially when you install the extensions it should load this file automatically.
When I installed SIMBA it was version 980 but there is already a version 984. I updated the versions before installing the extensions and the file I needed was not automatically installed.
I uninstalled SIMBA and upgraded all the extensions BEFORE upgrading SIMBA and the file was installed correctly.
Just in case anyone else has similar issues …
Coh3n
2012-05-05 10:42:45
The SPS repository has been moved to the SRL organization on github. The new source files can be found
here. The links in the first post have also been updated.
@digitalninja, try downloading SPS manually (instructions are on the first post).
Ashart1025
2012-05-11 15:59:53
So after a few hours of trying to manually update (and reading search / google results) I still cannot get SPS to update :-/.
I am trying to run Geo's Varrock Tanner.
Original error: Exception in Script: Unable to find file 'SPS/SPS2.simba' used from ''
After manual update: Exception in Script: Plugin(sps2) has not been found
Uninstall and reinstall Simba (updated enabled plugins ect, ect): Exception in Script: Unable to find file 'SPS/SPS2.simba' used from ''
Can anyone give me a shove in the right direction?
Coh3n
2012-05-13 21:00:24
The script you're using isn't updated. At the top of the script, where it says something like
{$i sps/sps2.simba}
Change it to
{$i sps/sps.simba}
See if that helps.
Ashart1025
2012-05-14 16:47:21
Thanks Coh3n that was what I had ended up doing (was running Geos Varrock Tanner) this also solves my Pm that I sent. I just didn't know if I was doing it right :-P It had made no sense why the script was referencing a file that didn't exist…
Trying to walk in the dwarven mines, copied the maps into the "runescape_other" folder so they are now registered, if i set the accuracy to 3 it seems to follow the correct points much better, however it clicks the first point, waits for the player to reach it and then ends the script as if it has completed the whole path. Any ideas?
TonyM
2012-05-18 20:23:20
Thanks is really helped!!^_^
From: p1ng
Trying to walk in the dwarven mines, copied the maps into the "runescape_other" folder so they are now registered, if i set the accuracy to 3 it seems to follow the correct points much better, however it clicks the first point, waits for the player to reach it and then ends the script as if it has completed the whole path. Any ideas?
Most likely because it cant find the next point, try making loads of points
put multiple points all very close to each other (because i believe i read somewhere that it simply chooses the furthest point it can find).. still doesn't appear to work
benny999
2012-05-22 08:34:30
just wondering why my walking script will just randomly walk off to the east of the the map
Procedure WalkMine;
Begin
if not LoggedIn then Exit;
SPS_Setup(RUNESCAPE_SURFACE,['10_9','10_8']);
myPrath := [Point(4211, 3688), Point(4208, 3683), Point(4207, 3677), Point(4206, 3672), Point(4208, 3666), Point(4216, 3660), Point(4225, 3658), Point(4232, 3655), Point(4241, 3655), Point(4251, 3654), Point(4253, 3648), Point(4253, 3642), Point(4255, 3634), Point(4253, 3623), Point(4253, 3613), Point(4254, 3605), Point(4254, 3598), Point(4255, 3590), Point(4254, 3583), Point(4254, 3570), Point(4258, 3559), Point(4258, 3552), Point(4260, 3545), Point(4265, 3537), Point(4270, 3521), Point(4271, 3513), Point(4273, 3494), Point(4277, 3474), Point(4289, 3466), Point(4296, 3463), Point(4305, 3456), Point(4315, 3456), Point(4321, 3445), Point(4323, 3435), Point(4330, 3434), Point(4338, 3426), Point(4345, 3421), Point(4349, 3419), Point(4355, 3415), Point(4360, 3412), Point(4373, 3404), Point(4386, 3396), Point(4392, 3393), Point(4396, 3386), Point(4398, 3386)];
SPS_WalkPath(myPrath)
end;
it walks from draynor bank to the clay mine just north but some times it will randomly walk into the cow field the east but i haven't selected any ware near there anyideas?
[D]ude
2012-05-23 20:42:51
will there be an update to fix edgeville?
VastlySuperior
2012-08-30 16:05:54
@ Coh3n, is it possible to update the runescape surface creator. There is a lot of maps that is really outdated.
I have changed the tool to work and it do make the maps but I keep getting a you are here all over the f2p areas regardless of where I am in the world. I don`t know if I made some mistake in editing the creator but it would be appreciated if this could be fixed. The rimmington area has drastically been changed. Draynor area also have a lot of issues when using sps.
Thanks.
From: VastlySuperior
@ Coh3n, is it possible to update the runescape surface creator. There is a lot of maps that is really outdated.
I have changed the tool to work and it do make the maps but I keep getting a you are here all over the f2p areas regardless of where I am in the world. I don`t know if I made some mistake in editing the creator but it would be appreciated if this could be fixed. The rimmington area has drastically been changed. Draynor area also have a lot of issues when using sps.
Thanks.
I though I'd post the world maps are quite poor with sps as the colours are very different.
Most of us now make custom maps by using Minimaps.
Mat
litoris
2012-10-12 13:21:32
I got around to make a custom map for the area around lava maze in the wildy(from the moss giants to the rune rocks, then to KBD basically) and it works well with my custom map, but fails with the maps that come with SPS. So it is definitely not a problem on my part, but the inaccuracy of the maps in the wildy.
Is there any chance we could gather images off the real minimap in order to get more accuracy?
P1nky
2012-10-17 04:05:32
Can someone do me a huge favor :)? Get me a GE map, that works!
Coh3n
2012-12-20 14:14:20
Added a scripting tips and hints section to the first post. Hopefully it will help out a few scripters. :)
Eduard
2012-12-29 20:07:57
[Error] C:\Users\Eduard\Desktop\Unused files\SPS/SPS.simba(370:51): Invalid number of parameters at line 369
Compiling failed.
madoff
2013-01-02 16:57:31
i installed the sps update manually and am also getting the error that Eduard is getting. any help?
Coh3n
2013-01-02 17:13:15
From: madoff
i installed the sps update manually and am also getting the error that Eduard is getting. any help?
Try
this. I replied to Eduard's post on another thread. If that doesn't work, it's possible the plugin in the SPS repository isn't up to date.
Ixilisi
2013-01-15 00:27:26
Coh3n, maybe update the credits to include J J, and OllyBeast for theirSPS_AnyAngle stuff?
Also is there anything on the todo list? (where's the link to the todo gone!?)
Lol Im not bothered about credit and if it really annoys you its credited in the include :p.. Regardless im not quite sure if theres anything really left to add to sps.
Coh3n
2013-01-15 21:22:37
From: Ixilisi
Coh3n, maybe update the credits to include J J, and OllyBeast for theirSPS_AnyAngle stuff?
Also is there anything on the todo list? (where's the link to the todo gone!?)
Ah yes, of course! Thank you for reminding me.
Also, I think I deleted the TODO.txt because there was nothing left to do! I honestly can't think of anything else that can be done except optimizing the code, and I'm not sure if it can be made any faster at the moment. E: I can't seem to find a link to that file in the OP?
From: Ollybest
Lol Im not bothered about credit and if it really annoys you its credited in the include :p.. Regardless im not quite sure if theres anything really left to add to sps.
Glad to hear it, but I'm still going to add your names to the OP. :p
https://github.com/SRL/SPS/commit/55782f4a46178902917d093d35458d22a623a125Only thing left is world walker and that's a massive massive project that i don't feel needs to be done.
Coh3n
2013-01-17 20:33:45
From: Ollybest
https://github.com/SRL/SPS/commit/55782f4a46178902917d093d35458d22a623a125
Only thing left is world walker and that's a massive massive project that i don't feel needs to be done.
Not to mention it probably wouldn't work well due to the slow nature of SPS.
Zorgatone
2013-02-02 11:20:46
From: Coh3n
Also, I think I deleted the TODO.txt because there was nothing left to do!
Would you please work on this:
http://villavu.com/forum/showthread.php?t=89831As I mentioned in that post I'm having issues when I try to make more than one path in different map slices (official or custom, they're both not working for me).. With SPS_WalkPath it will only walk the first path, then when I teleport somewhere else (switching the maps with SPS_Setup, or loading all of them at once at the first time) the second WalkPath with the new path doesn't work. If I test only the second path it's working, but if I put them both in one script it doesn't.
I've tried also to copy the zones that I need from the runescape_surface.png, made them 2-3 minimaps wide and put all the paths in one file, saved in RUNESCAPE_OTHER and after that I have the same problem.. When I teleport from the end of the first path to the start of the second path it doesn't walk the second one… Even recalling SPS_Setup and making a longer wait(timer)…
I'd love to have it fixed, because my script needs that, and the alternatives to SPS are a pain in the ass to use.. I've tried ObjDTM but sometimes it will walk the whole path sometimes it won't find some of the spots (Varrock from lodestone to GE sometimes the minimap symbols will cover ladders or trees and in some cases I don't have much objects in the minimap to use to make my path work), and I'm in trouble understanding radialwalking, because it asks for road colors, and after I try it doesn't walk even the first spot and I need to use it off-road..
Does anyone know a working method to walk,teleport and walk again in a different place? Seems that it will keep in memory the old map.. I'm using this link to download the latest SPS version:
https://github.com/SRL/SPS/zipball/master but I'm not using the plugin in there because it's not updated and it fails to compile..
What should I do? I won't give up to make my script, and if I see that it will make a good quantity of RSGP, I'm thinking to release it in the Moneymaking Scripts forum..
Thanks in advance for the help…
Zorgatone.
From: Zorgatone
Would you please work on this: http://villavu.com/forum/showthread.php?t=89831
As I mentioned in that post I'm having issues when I try to make more than one path in different map slices (official or custom, they're both not working for me).. With SPS_WalkPath it will only walk the first path, then when I teleport somewhere else (switching the maps with SPS_Setup, or loading all of them at once at the first time) the second WalkPath with the new path doesn't work. If I test only the second path it's working, but if I put them both in one script it doesn't.
I've tried also to copy the zones that I need from the runescape_surface.png, made them 2-3 minimaps wide and put all the paths in one file, saved in RUNESCAPE_OTHER and after that I have the same problem.. When I teleport from the end of the first path to the start of the second path it doesn't walk the second one… Even recalling SPS_Setup and making a longer wait(timer)…
I'd love to have it fixed, because my script needs that, and the alternatives to SPS are a pain in the ass to use.. I've tried ObjDTM but sometimes it will walk the whole path sometimes it won't find some of the spots (Varrock from lodestone to GE sometimes the minimap symbols will cover ladders or trees and in some cases I don't have much objects in the minimap to use to make my path work), and I'm in trouble understanding radialwalking, because it asks for road colors, and after I try it doesn't walk even the first spot and I need to use it off-road..
Does anyone know a working method to walk,teleport and walk again in a different place? Seems that it will keep in memory the old map.. I'm using this link to download the latest SPS version: https://github.com/SRL/SPS/zipball/master but I'm not using the plugin in there because it's not updated and it fails to compile..
What should I do? I won't give up to make my script, and if I see that it will make a good quantity of RSGP, I'm thinking to release it in the Moneymaking Scripts forum..
Thanks in advance for the help…
Zorgatone.
I cant see why SPS_Setup wouldn't switch the map, its worked for me in the past. Force update SPS in the extensions toolbar the newest sps is now on there.
Zorgatone
2013-02-02 11:55:43
From: Ollybest
I cant see why SPS_Setup wouldn't switch the map, its worked for me in the past. Force update SPS in the extensions toolbar the newest sps is now on there.
How do I force the update? Anyway I've tried to reinstall everything from scratch (clean install), and doesn't walk more than one path.. Now I've tried SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','4_5','4_6','4_7','3_7','3_6']); to load all the map slices..
It stops after I
teleport somewhere :( I don't know why
From: Zorgatone
How do I force the update? Anyway I've tried to reinstall everything from scratch (clean install), and doesn't walk more than one path.. Now I've tried SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','4_5','4_6','4_7','3_7','3_6']); to load all the map slices..
It stops after I teleport somewhere :( I don't know why
Did my post work?
http://villavu.com/forum/showthread.php?t=95934&p=1167076#post1167076I had the same issue, I solved it with this method..
Don't forget to load the map again, when you're gonna use it again.
Zorgatone
2013-02-02 12:04:22
From: Sjoekeloe
Did my post work? http://villavu.com/forum/showthread.php?t=95934&p=1167076#post1167076
I had the same issue, I solved it with this method..
Don't forget to load the map again, when you're gonna use it again.
This way.. Yes but not if I'm walking to the whirlpool, jumping into it, and walking again.. It won't walk the second path
Ok, just to set things straight for everyone (for people that don't know it) SPS can only have 1 map loaded at once, so you can't just do sps_setup(map1) and sps_setup(map2) because that will override the first map and load map2, if you want to walk using 2 maps you would have to do something like this
function walk_Underground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['underground_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
function walk_Aboveground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['groundlevel_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
Zorgatone
2013-02-02 13:12:15
From: Ollybest
Ok, just to set things straight for everyone (for people that don't know it) SPS can only have 1 map loaded at once, so you can't just do sps_setup(map1) and sps_setup(map2) because that will override the first map and load map2, if you want to walk using 2 maps you would have to do something like this function walk_Underground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['underground_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
function walk_Aboveground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['groundlevel_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
I'll try that.. What I did was SPS_Setup(RUNESCAPE_SURFACE, ['1_2', '1_3', '1_4']) and so on..
Coh3n
2013-02-02 17:29:56
From: Zorgatone
I'll try that.. What I did was SPS_Setup(RUNESCAPE_SURFACE, ['1_2', '1_3', '1_4']) and so on..
Right, but if you're changing surfaces (i.e. to a dungeon map or custom map) you have to make sure you're done with the walking on the previous surface first. So, to expand on what Olly said:
// this is how you have to do it - Call SPS_Setup, walk, then call SPS_Setup again to switch surfaces
function walk_Underground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['underground_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
function walk_Aboveground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['groundlevel_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
// you can't do this (it will load 11_8, then override it with dwarven_mine)
procedure loadSPSMaps();
begin
SPS_Setup(RUNESCAPE_SURFACE, ['11_8']);
SPS_Setup(RUNESCAPE_OTHER, ['dwarven_mine']);
end;
Zorgatone
2013-02-03 03:00:07
From: Coh3n
Right, but if you're changing surfaces (i.e. to a dungeon map or custom map) you have to make sure you're done with the walking on the previous surface first. So, to expand on what Olly said:
// this is how you have to do it - Call SPS_Setup, walk, then call SPS_Setup again to switch surfaces
function walk_Underground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['underground_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
function walk_Aboveground: boolean;
begin
SPS_Setup(RUNESCAPE_OTHER, ['groundlevel_map']); {*}
p := [point(100,100), point(500, 500), point(1000,100)];
Result := SPS_WalkPath(p);
end;
// you can't do this (it will load 11_8, then override it with dwarven_mine)
procedure loadSPSMaps();
begin
SPS_Setup(RUNESCAPE_SURFACE, ['11_8']);
SPS_Setup(RUNESCAPE_OTHER, ['dwarven_mine']);
end;
Yes, I understand
DannyRS
2013-02-09 23:27:23
Sorry for kinda gravediggy, it is a sticky,
From: Coh3n
[*]The mathematics behind SPS can be found here.
404 after forum update? or removed? I know I read it before can't find it
Coh3n
2013-02-09 23:35:45
From: DannyRS
Sorry for kinda gravediggy, it is a sticky,
404 after forum update? or removed? I know I read it before can't find it
No gravedig on a sticky. ;) I still encourage people to ask questions on this thread. I fixed the link. Thanks for letting me know, turns out the rest of the links were broken as well due to a small forum bug we had a few weeks ago.
DannyRS
2013-02-10 02:29:39
From: Coh3n
No gravedig on a sticky. ;) I still encourage people to ask questions on this thread. I fixed the link. Thanks for letting me know, turns out the rest of the links were broken as well due to a small forum bug we had a few weeks ago.
Great, thanks a lot :), want to read marpis' explanation a few more times so I can maintain any private server stuff I mod more easily :p
Got it working pretty flawlessly on ProjectRS06, thanks for continuing SPS for us Coh3n, your Awesome!
westkevin12
2013-04-30 04:24:32
Result := rs_OnMinimap(p.x, p.y); trying to run this in osr gets error [Error] C:\Simba\Includes\sps/sps.simba(447:35): Invalid number of parameters at line 446 Compiling failed.
any suggestions on fixing this error for osr?
Coh3n
2013-04-30 20:14:54
From: westkevin12
Result := rs_OnMinimap(p.x, p.y); trying to run this in osr gets error [Error] C:\Simba\Includes\sps/sps.simba(447:35): Invalid number of parameters at line 446 Compiling failed.
any suggestions on fixing this error for osr?
I think there's a separate version of SPS for OSR somewhere.
Zeta Matt
2014-07-29 01:58:05
Thanks for this thread, been trying to figure out how to use SPS myself
Zeta Matt
2014-07-29 02:00:03
Wow, double thanks for the link to The Mayor's tutorial =O
https://github.com/SRL/SPS/tree/NextA peak into the future, OpenCV support. :)
Tho I am not totally happy with it, I feel like i may rub
@slacky up the wrong way but it's hard not to 'take' something when it's there which is so powerful.
Big thanks to him of course, totally wouldn't be done without his work out there. (And why not thank him for what he's done to Simba over a good month or two 90% of commits was his work).
The Mayor
2014-08-03 19:51:38
From: Olly
https://github.com/SRL/SPS/tree/Next
A peak into the future, OpenCV support. :)
Tho I am not totally happy with it, I feel like i may rub @slacky up the wrong way but it's hard not to 'take' something when it's there which is so powerful.
Big thanks to him of course, totally wouldn't be done without his work out there. (And why not thank him for what he's done to Simba over a good month or two 90% of commits was his work).
This is going to be awesome! Thanks slacky & Olly!
KeepBotting
2014-08-03 20:32:41
From: Olly
https://github.com/SRL/SPS/tree/Next
A peak into the future, OpenCV support. :)
Tho I am not totally happy with it, I feel like i may rub @slacky up the wrong way but it's hard not to 'take' something when it's there which is so powerful.
Big thanks to him of course, totally wouldn't be done without his work out there. (And why not thank him for what he's done to Simba over a good month or two 90% of commits was his work).
This will rival tilebased walking. Much thanks & respectin' to you two.
lanadekat
2014-08-05 09:50:44
I think this is right place to ask this:
I made a autotanner script, it runs to the tanner, tans, runs back to the bank.But it doesn't want to enter buildings. It always runs to a wall of the building. Not verry handy when trying to open the bank ;(
printscreen:
http://prntscr.com/49rbft( green arrows are the places it walks to, I know there are many points, I also tried with fewer points but that didn't work.)
Turpinator
2014-08-05 10:17:03
From: lanadekat
I think this is right place to ask this:
I made a autotanner script, it runs to the tanner, tans, runs back to the bank.But it doesn't want to enter buildings. It always runs to a wall of the building. Not verry handy when trying to open the bank ;(
printscreen:
http://prntscr.com/49rbft
( green arrows are the places it walks to, I know there are many points, I also tried with fewer points but that didn't work.)
your map needs to be larger on the top side. also. sps doesnt work so well in the desert… except there it shouldnt have too much of a problem. to debug your map, do this…
program whatever;
{includes here}
stuff stuff
begin
all your setup stuff;
sps.setup(whatever);
while true do sps.debugPlayerPos();
end.
and then login and walk around your map and watch the window that is open. if it has problems, then you can
try playing with accuracy/tolerance/etc. but that may not help.
lanadekat
2014-08-05 11:08:19
From: Turpinator
your map needs to be larger on the top side. also. sps doesnt work so well in the desert… except there it shouldnt have too much of a problem. to debug your map, do this…
program whatever;
{includes here}
stuff stuff
begin
all your setup stuff;
sps.setup(whatever);
while true do sps.debugPlayerPos();
end.
and then login and walk around your map and watch the window that is open. if it has problems, then you can try playing with accuracy/tolerance/etc. but that may not help.
thanks it works now :D It works in the desert, but not as good, but still it works good enough.