PDA

View Full Version : [Resolved] SPS 1.5 - Ready for testing!



marpis
01-23-2012, 05:17 PM
Update: March 25th, 2012:

I've updated my SPS2.0 branch on github with the files from the first post. After I'm able to test more (and there are no major bugs), I will merge with the master so everyone can enjoy it.

If you want to test it out, replace your SPS folder with the one from here (https://github.com/Coh3n/SPS/zipball/sps_2.0). Replace the old plugin with the new one, and you're good to go.

To use a map other than the RS surface, do:

SPS_Setup(RUNESCAPE_OTHER, ['runecrafting_altars']);


SPS 1.5
A huge thankyou to Hero (http://villavu.com/forum/member.php?u=70650) for the dungeon maps!

What's new?

SPS 1.5 uses the whole round minimap when finding the location, instead of just a 100x100 pixel box from the center.
A better, faster tolerance formula. Tolerance value is 600 by default, compared to the previous 0.3.
Dungeons! Just use RUNESCAPE_DUNGEONS as the surface when calling SPS_Setup and check out the filenames under /img/runescape_dungeons/ to see what are the area names to use.


How to try it?

Download the sps2.dll to /Simba/Plugins/
Download the sps2.simba to /Simba/Includes/SPS/
Download the sps2 test.simba to /Simba/Scripts/
Stand on Varrock south gate and run the test script and watch your cahracter run around in Lumbridge.


How to use SPS 1.5 in dungeons?

Download the runescape dungeons folder to /Simba/Includes/SPS/img/
Check out the filenames in that folder
Set your SPS_Setup(RUNESCAPE_DUNGEONS, ['ancient_cavern']);


Known bugs

Gives an access violation error. Solution: for now, just reset Simba.
GetMyPos acts weird in dungeons. Working on it now. Should be fixed now.


EDIT: Sauce


library sps;

{$mode objfpc}{$H+}

uses
Classes, sysutils, FileUtil, mufasatypes, bitmaps, math, Interfaces;

type
T3DIntegerArray = array of T2DIntegerArray;
T4DIntegerArray = array of T3DIntegerArray;
TMufasaBitmapArray = array of TMufasaBitmap;

function SPS_ColorBoxesMatchInline(B1, B2: TIntegerArray; tol: extended): boolean; inline;
begin
Result := False;

if (B2[0]+B2[1]+B2[2]) = 0 then
Exit;

if (abs(B1[0] - B2[0]) < tol) then
if (abs(B1[1] - B2[1]) < tol) then
if (abs(B1[2] - B2[2]) < tol) then
Result := True;
end;


function SPS_MakeColorBox(bmp: TMufasaBitmap; x1, y1, SideLength: integer): TIntegerArray; register;
var
x, y, width: integer;
C: TRGB32;
begin
SetLength(Result, 3);
width := bmp.Width;

for x := (x1 + SideLength - 1) downto x1 do
for y := (y1 + SideLength - 1) downto y1 do
begin
try
C := bmp.FData[y * width + x];
Result[0] := Result[0] + C.R;
Result[1] := Result[1] + C.G;
Result[2] := Result[2] + C.B;
except end;
end;
end;


procedure SPS_FilterMinimap(var Minimap: TMufasaBitmap); register;
var
W, H, x, y: integer;
C: TRGB32;
begin
W := Minimap.width;
H := Minimap.height;

for x := W - 1 downto 0 do
for y := H - 1 downto 0 do
begin
if hypot(abs(75.0 - x), abs(75.0 - y)) > 75 then
begin
Minimap.FastSetPixel(x, y, 0);
continue;
end;

C := Minimap.FData[y * W + x];

end;
end;



function SPS_BitmapToMap(bmp: TMufasaBitmap; SideLength: integer): T3DIntegerArray; register;
var
X, Y, HighX, HighY: integer;
begin
HighX := Trunc(bmp.Width / (SideLength*1.0));
HighY := Trunc(bmp.Height / (SideLength*1.0));

SetLength(Result, HighX);
for X := 0 to HighX - 1 do
begin
SetLength(Result[X], HighY);
for Y := 0 to HighY - 1 do
begin
Result[X][Y] := SPS_MakeColorBox(bmp, X * SideLength, Y * SideLength, SideLength);
end;
end;
end;


function SPS_FindMapInMap(out fx, fy: integer; LargeMap: T4DIntegerArray; SmallMap: T3DIntegerArray; tol: extended; out FoundMatches: integer): integer; register;
var
x, y, HighX, HighY, cm, L: integer;
xx, yy: integer;
Matching: integer;
BoxesInViewX, BoxesInViewY: integer;
b: Boolean;
begin
fX := -1;
fY := -1;
Result := -1;
FoundMatches := 0;
L := Length(LargeMap);
BoxesInViewX := Length(SmallMap);
BoxesInViewY := Length(SmallMap[0]);

for cm := 0 to L-1 do
begin
HighX := High(LargeMap[cm]) - BoxesInViewX - 1;
HighY := High(LargeMap[cm][0]) - BoxesInViewY - 1;

for x := 0 to HighX do
for y := 0 to HighY do
begin
Matching := 0;

for xx := BoxesInViewX - 1 downto 0 do
for yy := BoxesInViewY - 1 downto 0 do
begin
b:= SPS_ColorBoxesMatchInline(LargeMap[cm][x+xx][y+yy], SmallMap[xx][yy], tol);
if (b) then Inc(Matching);
end;

if (Matching > FoundMatches) then
begin
FoundMatches := Matching;
Result := cm;
fX := x;
fY := y;
end;
end;
end;
end;


////// EXPORTING /////////////////////////////////////////////////////////////

procedure SetPluginMemoryManager(MemMgr : TMemoryManager); stdcall; export;
begin
SetMemoryManager(MemMgr);
end;

function GetTypeCount(): Integer; stdcall; export;
begin
Result := 3;
end;

function GetTypeInfo(x: Integer; var sType, sTypeDef: string): integer; stdcall; export;
begin
case x of
0: begin
sType := 'T3DIntegerArray';
sTypeDef := 'array of T2DIntegerArray;';
end;
1: begin
sType := 'T4DIntegerArray';
sTypeDef := 'array of T3DIntegerArray;';
end;
2: begin
sType := 'TMufasaBitmapArray';
sTypeDef := 'array of TMufasaBitmap';
end;
else
x := -1;
end;
Result := x;
end;

function GetFunctionCount(): Integer; stdcall; export;
begin
Result := 4;
end;

function GetFunctionCallingConv(x : Integer) : Integer; stdcall; export;
begin
Result := 0;
case x of
0..3: Result := 1;
end;
end;

function GetFunctionInfo(x: Integer; var ProcAddr: Pointer; var ProcDef: PChar): Integer; stdcall; export;
begin
case x of
0:
begin
ProcAddr := @SPS_FindMapInMap;
StrPCopy(ProcDef, 'function SPS_FindMapInMap(out fx, fy: integer; LargeMap: T4DIntegerArray; SmallMap: T3DIntegerArray; tol: extended; out FoundMatches: integer): integer;');
end;
1:
begin
ProcAddr := @SPS_BitmapToMap;
StrPCopy(ProcDef, 'function SPS_BitmapToMap(bmp: TMufasaBitmap; SideLength: integer): T3DIntegerArray;');
end;
2:
begin
ProcAddr := @SPS_MakeColorBox;
StrPCopy(ProcDef, 'function SPS_MakeColorBox(bmp: TMufasaBitmap; x1, y1, SideLength: integer): TIntegerArray;');
end;
3:
begin
ProcAddr := @SPS_FilterMinimap;
StrPCopy(ProcDef, 'procedure SPS_FilterMinimap(var Minimap: TMufasaBitmap);');
end
else
x := -1;
end;
Result := x;
end;

exports SetPluginMemoryManager;
exports GetTypeCount;
exports GetTypeInfo;
exports GetFunctionCount;
exports GetFunctionInfo;
exports GetFunctionCallingConv;

begin
end.

Sin
01-23-2012, 05:19 PM
Holy Shit!
This looks amazing!!
It'll work for sure now?

Kyle Undefined
01-23-2012, 05:27 PM
Shweet work man! Will test this out later! :D

JN13
01-23-2012, 05:32 PM
Awesome! I think ill try it with my new script~

chemicstry
01-23-2012, 05:53 PM
Thanks for release!
Testing it for my yew woodcutter and here is what i got (Access violation is in sps2.simba):


[SPS] SPS_Setup() took 78 ms. Loaded 2 areas.
[SPS] SPS_GetMyPos() finished in 219 ms. Result = (4015, 3585)
Error: Exception: Access violation at line 146
The following DTMs were not freed: [SRL - Lamp bitmap, 1, SRL - Lamp bitmap, 3]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, 6]

EDIT: This happens only in port sarim docks.

Hero
01-23-2012, 05:54 PM
Nice job. So someone finished the maps I made? :)

dudekid39
01-23-2012, 05:58 PM
i need help can i just this as the main sps for simba ?

Sebo
01-23-2012, 05:59 PM
Ah, I am going to convert the DTM walking in my script to SPS. I'll leave the DTM walking in there just in case it doesn't work correctly, or if it breaks again. :P

marpis
01-23-2012, 06:15 PM
Nice job. So someone finished the maps I made? :)

Oh gosh! I forgot to credit you in the original post, fixed that! Sorry!
I just added thicker black borders, otherwise they're original.

Smidqe
01-23-2012, 06:29 PM
[SPS] SPS_Setup() took 156 ms. Loaded 3 areas.
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4680, 3135)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4650, 3145)
[SPS] SPS_GetMyPos() finished in 249 ms. Result = (4600, 3170)
[SPS] SPS_GetMyPos() finished in 250 ms. Result = (4550, 3205)
[SPS] SPS_GetMyPos() finished in 234 ms. Result = (-1, -1)
[SPS] SPS_GetMyPos() finished in 234 ms. Result = (-1, -1)
[SPS] SPS_GetMyPos() finished in 234 ms. Result = (4540, 3275)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4535, 3305)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4535, 3305)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4535, 3310)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4535, 3310)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4540, 3330)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4540, 3335)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4540, 3335)
[SPS] SPS_GetMyPos() finished in 312 ms. Result = (4540, 3340)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4540, 3370)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4540, 3370)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4540, 3375)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4540, 3375)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4545, 3425)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4540, 3430)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4540, 3430)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4540, 3430)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4505, 3465)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4505, 3465)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4505, 3470)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4505, 3470)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4500, 3515)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4500, 3520)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4500, 3520)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4500, 3520)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4500, 3525)
[SPS] SPS_GetMyPos() finished in 344 ms. Result = (4500, 3525)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4480, 3585)
[SPS] SPS_GetMyPos() finished in 343 ms. Result = (4505, 3615)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4540, 3675)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4545, 3675)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4595, 3675)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4640, 3675)
askldfaklsdkljasd
Successfully executed.
Works great! :p (aside the access violation error)

Also a temporary solution to Access violation error is this: Right click simba.exe and choose run as administrator, then choose the SPS test script. (Applies atleast to windows Vista & 7)

chemicstry
01-23-2012, 06:46 PM
Also a temporary solution to Access violation error is this: Right click simba.exe and choose run as administrator, then choose the SPS test script. (Applies atleast to windows Vista & 7)
Works!

However location finding in port sarim is still a bit buggy.

cause
01-23-2012, 06:49 PM
Awesome work guys!

Hero
01-23-2012, 06:53 PM
Sorry I never got around to removing all the !s but thanks for the credits :) Hopefully going to use this in some dungeons soon.

jakeyboy29
01-23-2012, 06:53 PM
Sexy as ever @Marpis, just a quickie, Can this be used to walk from the runescape surface into a dungeon and carry on walking? (chaos tunnel)

Multiple surfaces?

chemicstry
01-23-2012, 06:56 PM
Sexy as ever @Marpis, just a quickie, Can this be used to walk from the runescape surface into a dungeon and carry on walking? (chaos tunnel)

Multiple surfaces?

You will have to use SPS_Setup() again with different surface.

Coh3n
01-23-2012, 07:05 PM
Nice marpis! The Access Violation was fixed, though. You need to add some memory code to your plugin so it works properly. I don't know exactly what it is, but talk to Wizzup? or Markus, they know.

WT-Fakawi
01-23-2012, 07:07 PM
Time for some quests?

go9090go
01-23-2012, 07:15 PM
thank you for all youre work on this website =)

jakeyboy29
01-23-2012, 07:55 PM
You will have to use SPS_Setup() again with different surface.

thanks rep+


thank you for all youre work on this website =)

your* :P sorry for being a grammer nazi

poopy2177
01-23-2012, 08:05 PM
Yay! can't wait Ill test when I get home from school

tls
01-23-2012, 08:28 PM
Nice marpis! The Access Violation was fixed, though. You need to add some memory code to your plugin so it works properly. I don't know exactly what it is, but talk to Wizzup? or Markus, they know.

You have to use the ShareMem that simba exports. It should be in the source of SPS 1....

Shuttleu
01-23-2012, 08:30 PM
so is this what was going to be SPS 2.0?

~shut

Coh3n
01-23-2012, 10:21 PM
so is this what was going to be SPS 2.0?

~shutEventually, yes.

marpis
01-23-2012, 10:24 PM
so is this what was going to be SPS 2.0?

~shut

The amount of work needed to do all the things I have planned is overwhelming, so I decided to release several versions with something little added to each one. :)

Coh3n
01-23-2012, 10:30 PM
You have to use the ShareMem that simba exports. It should be in the source of SPS 1....Got it.

Marpis, add this to your plugin to get rid of the access violations:

procedure SetPluginMemoryManager(MemMgr : TMemoryManager); stdcall; export;
begin
SetMemoryManager(MemMgr);
end;

exports SetPluginMemoryManager;
I'm pretty sure that's all you have to do. Simba will do the rest.

Wizzup?
01-23-2012, 10:54 PM
Marpis, if you want I can set up something that will automatically build sps for you every time you commit.

Coh3n
01-23-2012, 11:00 PM
Marpis, if you want I can set up something that will automatically build sps for you every time you commit.He doesn't use/know how to use git. I have a SPS2.0 branch setup, I guess he just hasn't gotten around to figuring it out.

Mat
01-23-2012, 11:20 PM
SmallMap := SPS_BitmapToMap(Minimap, 5);
getting a error about this on Line 146.
Mat
Edit And
SPS_AreaMaps[i] := SPS_BitmapToMap(tmp, 5);
Line 254 Its walks to the Bank No Problem but as it goes to walk to the Altar it Fails

maigel
01-24-2012, 02:07 AM
Sweet, I'll test it tommorow!
Oh, and does "dungeons" include the maps inside the runecrafting altars (fire altar to be specific)?

Edit:
Seems like it doesn't (couldnt find it in the rar) :(
Is there any tutorial or something out there that teaches how to make SPS maps yourself?

Daniel
01-24-2012, 03:28 AM
Marpis, could you please publish the source of your plugin? :)

Regards,
Daniel.

Geo
01-24-2012, 04:47 AM
Hey, any reason as to why you changed ClickNorth to MakeCompass?

Excellent work by the way, I'm glad something brung you back from retirement. :)

marpis
01-24-2012, 11:46 AM
He doesn't use/know how to use git. I have a SPS2.0 branch setup, I guess he just hasn't gotten around to figuring it out.
The latter one.


Sweet, I'll test it tommorow!
Oh, and does "dungeons" include the maps inside the runecrafting altars (fire altar to be specific)?

Edit:
Seems like it doesn't (couldnt find it in the rar) :(
Is there any tutorial or something out there that teaches how to make SPS maps yourself?
Runecrafting altars should be in the dungeons folder?


Marpis, could you please publish the source of your plugin? :)

Regards,
Daniel.
Done.


Hey, any reason as to why you changed ClickNorth to MakeCompass?

Excellent work by the way, I'm glad something brung you back from retirement. :)
I think MakeCompass will suffice, and it's more natural. Didn't really give this much thought though.

Markus
01-24-2012, 12:21 PM
Please, don't repeat that old mistake of not sharing the memory :( Also, source is in the lpr file, not the lpi file.

NickMystre
01-24-2012, 12:30 PM
Please, don't repeat that old mistake of not sharing the memory :( Also, source is in the lpr file, not the lpi file.

Is this a user reminder, or a request to the coder to add / implement something ?

E: @Markus - I appreciate you giving me the back story - thanks. Just enough info for me without burying me in pages of
code. :-) And few bury quite as nicely as I do. TBH: Scripting is enough of a challenge for me, let alone real coding.
Anyway - each to their own. BTW: Are you a career or a hobby coder or both ?

Markus
01-24-2012, 01:16 PM
To the coder. SPS used to have a very, very annoying bug which turned out to be one mistake (which no one made with SCAR, just with Simba due to SCAR plugins all enforcing the sharing of memory). So the whole boards were complaining that SPS didn't work for them and lots of other people were flaming that it did work for them.
So after weeks of bug hunting and trying various workarounds everyone was desperate so I decided to take a look at it myself. Turned out not everyone knew that you can't just pass objects to a plugin, you have to share the memory space (the heap in this case) then between the host (Simba) and the plugin. A 10-line patch to Simba and a 5-line patch to SPS (the one in post 25) fixed everything up. No more errors, everyone was happy :)

Edit response to Nick: Not a career coder, just hobby one, and also not interested in becoming one! Started studying Electrical Engineering in September :)

marpis
01-24-2012, 06:06 PM
Got it.

Marpis, add this to your plugin to get rid of the access violations:

procedure SetPluginMemoryManager(MemMgr : TMemoryManager); stdcall; export;
begin
SetMemoryManager(MemMgr);
end;

exports SetPluginMemoryManager;
I'm pretty sure that's all you have to do. Simba will do the rest.

Already have that...

Wetish
01-24-2012, 10:44 PM
Looks great. I finally have a solution to walking

Sin
01-25-2012, 12:14 AM
Would this work in the LRC caverns?

Eff.
Saw the rar file and it does :)

Daniel
01-25-2012, 01:21 AM
Done.

Marpis, you uploaded the wrong file. It is instead the file with the LPR extension.

Regards,
Daniel. :)

Coh3n
01-25-2012, 04:56 AM
Why come you just don't updated one .zip file? Then once extracted, everything works if setup in the script properly? Just wondering. :)

marpis
01-25-2012, 05:02 AM
Why come you just don't updated one .zip file? Then once extracted, everything works if setup in the script properly? Just wondering. :)

I don't understand what you mean?

Coh3n
01-25-2012, 05:14 AM
I don't understand what you mean?You have several files uploaded on the first post, why not just have one .zip? That way people only have to extract one thing. They extract one file, and it includes everything - the plugin (and source) the images (including dungeons), and test files.

TrevorB
01-25-2012, 05:25 AM
When will this be available on the updates of SPS etc. Like all you have to do is click update and it should do it auto rather than downloading it and trying to find the folder. Im having hard time trying to find the folders, unless if you guys can make a short video on how to do this then that would be great. Sorry for the extra work.

Jagex_Fagex
01-25-2012, 06:33 AM
So this is where it's hiding. From what i've seen, great work, i'll try it out soon and let you know how it goes.

Olly
01-25-2012, 09:12 AM
When will this be available on the updates of SPS etc. Like all you have to do is click update and it should do it auto rather than downloading it and trying to find the folder. Im having hard time trying to find the folders, unless if you guys can make a short video on how to do this then that would be great. Sorry for the extra work.

No offence but if you cant find a folder (or search even) you shouldn't be here...

Shuttleu
01-25-2012, 09:37 AM
When will this be available on the updates of SPS etc. Like all you have to do is click update and it should do it auto rather than downloading it and trying to find the folder. Im having hard time trying to find the folders, unless if you guys can make a short video on how to do this then that would be great. Sorry for the extra work.

if you cant find the folders then you probably dont know the directory structure for simba
if you dont know the directory structure for simba then your probably not making scripts
if your not making any scripts then you dont need this

~shut

Olly
01-25-2012, 04:55 PM
if you cant find the folders then you probably dont know the directory structure for simba
if you dont know the directory structure for simba then your probably not making scripts
if your not making any scripts then you dont need this

~shut


I think he's trying to use geo's tanner

TrevorB
01-25-2012, 10:59 PM
I think he's trying to use geo's tanner


Thanks you are 100% right. I just want to update simba to 1.5 so I can use the Tanning script but im just having some trouble to figure it out and all. If someone can tell me a way how I can update it to 1.5 that would be great because once again I did try and couldn't figure it out. Pretty damn sure everyone is human beings and need help time to time.

Yago
01-25-2012, 11:26 PM
Is the accuracy on this better? I haven't tested yet.

Shuttleu
01-25-2012, 11:27 PM
it should be, i think the accuracy should be reduced from 20px down to 4px

~shut

Sin
01-26-2012, 10:50 PM
Marpis i'm having a really wierd error, along with Mat.



SPS_Areas := ['0_0','0_1'];
myPath := [Point(361, 318), Point(360, 377), Point(365, 397), Point(363, 429), Point(323, 439), Point(293, 417), Point(254, 409), Point(234, 415)];


I get an error -

[SPS] SPS_Setup() took 156 ms. Loaded 1 areas.
Error: Exception: Access violation at line 146


at line 146

SmallMap := SPS_BitmapToMap(Minimap, 5);


Pl0x help :c
I'm trying to walk through Taverly Dungeon btw :0

marpis
01-27-2012, 06:57 AM
Marpis i'm having a really wierd error, along with Mat.

I'm aware of that error, as you can see in the original post.
For now, just reset Simba and run as an administrator.

Sin
01-27-2012, 11:58 AM
Ah okay, i'll try that out.

Jagex_Fagex
01-27-2012, 02:02 PM
Uh oh, just tested it. Got the access violation error, Restarted as administrator, Tried it again and it ran down to just over the bridge. Then stopped, got an error. I tried restarting simba again as administrator, now it just keeps saying:

[SPS] SPS_Setup() took 93 ms. Loaded 3 areas.
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4805, 3505)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4805, 3505)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4805, 3505)
[SPS] SPS_GetMyPos() finished in 312 ms. Result = (4805, 3505)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4810, 3505)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4805, 3505)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4805, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4805, 3500)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4805, 3500)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4800, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4800, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4800, 3500)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4800, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4800, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4805, 3500)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4800, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4800, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4805, 3500)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 312 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 312 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 280 ms. Result = (4815, 3500)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4815, 3500)

And won't actually click anywhere.

Where i got to, and the error just before it stopped working are attatched.

Coh3n
01-27-2012, 11:42 PM
^ Your minimap looks more detailed than it should be. Make sure you're in safe mode.

Jagex_Fagex
01-28-2012, 05:52 AM
^ Your minimap looks more detailed than it should be. Make sure you're in safe mode.

It was indeed. I changed all the detail, it then started to go, until after the bridge. You come to a gate, which happened to be shut. I forgot the keyboard command to pause the script, so i just moved the mouse and clicked on the gate to open it. It then clicked below the gate again, got next to the building and wheat field and crashed again:

New window: 328568
[Hint] (8:3): Variable 'I' never used at line 7
Compiled successfully in 655 ms.
SRL Compiled in 16 msec
[SPS] SPS_Setup() took 109 ms. Loaded 3 areas.
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4675, 3130)
[SPS] SPS_GetMyPos() finished in 266 ms. Result = (4640, 3155)
[SPS] SPS_GetMyPos() finished in 266 ms. Result = (4580, 3175)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4555, 3200)
[SPS] SPS_GetMyPos() finished in 250 ms. Result = (4550, 3205)
[SPS] SPS_GetMyPos() finished in 249 ms. Result = (4570, 3275)
[SPS] SPS_GetMyPos() finished in 250 ms. Result = (4565, 3275)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4565, 3275)
[SPS] SPS_GetMyPos() finished in 265 ms. Result = (4535, 3305)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4530, 3335)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4535, 3380)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4550, 3390)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4555, 3390)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4565, 3400)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4570, 3400)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4580, 3405)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4580, 3390)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4580, 3375)
[SPS] SPS_GetMyPos() finished in 281 ms. Result = (4580, 3355)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4570, 3385)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4560, 3400)
[SPS] SPS_GetMyPos() finished in 312 ms. Result = (4560, 3385)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4555, 3370)
[SPS] SPS_GetMyPos() finished in 297 ms. Result = (4550, 3380)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4550, 3390)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4550, 3390)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4555, 3390)
[SPS] SPS_GetMyPos() finished in 296 ms. Result = (4555, 3390)
Error: Exception: Access violation at line 146
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, 3]


I think we need some sort of failsafe to either open closed gates/doors, or detect if the character starts running in the other direction to run around, then let it go.

Mr. Freeweed
01-28-2012, 09:45 PM
SPS an ointment used after long periods of color walking runescape.

I appreciate your hard work, it helps my lazyness alot, thanks ;)

YoHoJo
01-31-2012, 04:00 AM
Will this work with MSI right now?

Coh3n
01-31-2012, 06:47 AM
Will this work with MSI right now?If the same map/areas are used, yes. And assuming it's still setup the same way.

Sin
02-01-2012, 09:52 PM
Doesn't work anymore?
Since the world map got extended...

Shuttleu
02-01-2012, 09:57 PM
Doesn't work anymore?
Since the world map got extended...

by extended, do you mean the new taverly and burthorpe?

if so then other locations should work

~shut

Sin
02-01-2012, 10:03 PM
Yeah, since Flight's script doesn't work.
SPS is messed up in that area I guess xD

Shuttleu
02-01-2012, 10:06 PM
which one, and which area is it in?

~shut

Adobe
02-01-2012, 10:09 PM
Thanks :) going to update my GDK and FDK script.

Sin
02-01-2012, 10:14 PM
The nature runecrafter.

jakeyboy29
02-01-2012, 10:25 PM
Thanks :) going to update my GDK and FDK script.

very very impressive for someone whos been here for a month! ;)

Shuttleu
02-01-2012, 11:25 PM
The nature runecrafter.

from what i can tell, naturez uses objectdtm, not dtm

~shut

Dmazing
02-04-2012, 10:54 PM
Exception in Script: Unable to find file 'SPS/SPS2.simba' used from ''

I am getting that error while running varrock gtanner. I don't know if it's the scripts fault or this.. help?

NickMystre
02-04-2012, 11:43 PM
Download SPS2.simba from here (http://villavu.com/forum/showthread.php?t=73103)

Brandon
02-26-2012, 02:52 AM
Anyone got the actual source for this? I want to work on it or something.. The source file posting on the First page only has the lpr file..

Silent
02-26-2012, 09:03 AM
Anyone got the actual source for this? I want to work on it or something.. The source file posting on the First page only has the lpr file..

I think it's on github, but I don't know what repo it's under.

bilka
02-26-2012, 03:25 PM
Thx, t his is working great had trouble in LRC, with the old sps -with the new sps i could remove a ton of failsafes:)

Nemesis3X
02-26-2012, 03:31 PM
Well, it may be the time for me to Take a look at SpS Walking now that is up!

Great job for your release too!

Late
03-02-2012, 04:08 PM
First tried the test script, it worked fine.

After that I tried to implement my own dungeon walking. I have it set up like this:


SPS_Setup(RUNESCAPE_DUNGEONS, ['misthalin_underground']);


Ended up with this error:


SRL Compiled in 0 msec
[SPS] ERROR: SPS_GetArea: Exception: Error while reading stream: Unable to open file "C:\Simba\Includes\SPS\img\runescape_dungeons\misth alin_underground.png"
[SPS] SPS_Setup() took 0 ms. Loaded 1 areas.
Error: Exception: Access violation at line 148


Tried running with administrator and checked if the file really existed. Everything should be okay but it still won't work. Any ideas? :(

Brandon
03-02-2012, 05:24 PM
First tried the test script, it worked fine.

After that I tried to implement my own dungeon walking. I have it set up like this:


SPS_Setup(RUNESCAPE_DUNGEONS, ['misthalin_underground']);
Ended up with this error:


SRL Compiled in 0 msec
[SPS] ERROR: SPS_GetArea: Exception: Error while reading stream: Unable to open file "C:\Simba\Includes\SPS\img\runescape_dungeons\misth alin_underground.png"
[SPS] SPS_Setup() took 0 ms. Loaded 1 areas.
Error: Exception: Access violation at line 148
Tried running with administrator and checked if the file really existed. Everything should be okay but it still won't work. Any ideas? :(

Change the name of the map to something like 0_0MU.png

Late
03-02-2012, 05:50 PM
Change the name of the map to something like 0_0MU.png

Thanks, it worked now. Btw, why did I have to do that? o.O

Brandon
03-02-2012, 05:57 PM
Thanks, it worked now. Btw, why did I have to do that? o.O

I'm not sure.. sometimes it works with just letters, sometimes it won't..

Thing is, I noticed the co-ordinates SPS gives, depends on the name of the file..

Example if I named it 0_0000001 it'd give me the smallest co-ordinates of any other map.. whereas if it was named 0_001, it'd give larger co-ordinates than the 0_00000001

Since it depends on the name.. I'm guessing it needs those numbers to calculate the co-ords

laakerules
03-03-2012, 10:55 PM
Anyone else tried using this in GWD?

Coh3n
03-04-2012, 07:25 AM
I'm not sure.. sometimes it works with just letters, sometimes it won't..

Thing is, I noticed the co-ordinates SPS gives, depends on the name of the file..

Example if I named it 0_0000001 it'd give me the smallest co-ordinates of any other map.. whereas if it was named 0_001, it'd give larger co-ordinates than the 0_00000001

Since it depends on the name.. I'm guessing it needs those numbers to calculate the co-ordsIt may be because it adds 500 depending on the name. Like 0_0 is (0, 0) to (500, 500) on the world map, where as 2_2 would be (1000, 1000) to (1500, 1500). That's my best guess, anyway, although I'm not sure if it's supposed to be like that. I thought 1.5 wasn't dependent on the map names.

laakerules
03-04-2012, 08:04 PM
Ya, it doesnt work in godwars. It tried editing it myself and cant get that stupid bitmap minimap error to go away! :/ oh well might es well just wait for it to be fully working and released! :)

Coh3n
03-26-2012, 02:10 AM
I've updated my SPS2.0 branch on github with the files from the first post. After I'm able to test more (and there are no major bugs), I will merge with the master so everyone can enjoy it.

If you want to test it out, replace your SPS folder with the one from here (https://github.com/Coh3n/SPS/zipball/sps_2.0). Replace the old plugin with the new one, and you're good to go.

To use a map other than the RS surface, do:

SPS_Setup(RUNESCAPE_OTHER, ['runecrafting_altars']);

Brandon
03-26-2012, 02:12 AM
You must spread some Reputation around before giving it to Coh3n again.Wth? I never even.. -___- Well u know. Thanx!

EDIT: SPS_Filterminimap is not a valid identifier because it isn't anywhere in the SPS.Simba file.. Umm.. a lot of problems in the SPS.Simba that causes it to not compile..

EDIT: Got it working.

Bot4Fun
06-02-2012, 04:48 PM
I cant find any sps2.dll uner the attached files?

And what exactly is it i need to download, and to where when i get this error? Exception in Script: Unable to find file 'ObjectDTM/ObjDTMInclude.simba' used from ''