PDA

View Full Version : [NEED TESTING!] SPS-OSR (2007Scape)



SeanStar
03-10-2013, 12:42 AM
Hello VillaVu, releasing an sps version for OldSchool RuneScape (2007Scape)

THIS IS USED WITH THE OFFICIAL SRL-OSR INCLUDE WHICH CAN BE FOUND HERE: https://github.com/SRL/SRL-OSR
Tutorial for setting up SRL-OSR: http://villavu.com/forum/showthread.php?t=100543

You can get the fonts here: Fonts.zip (http://villavu.com/forum/attachment.php?attachmentid=19822&d=1362900038) (Extract into your Fonts folder)

CHANGE LOG

Added DegreeFix, basically loops through adding 0, 5, -5, 10, -10, 15, and -15 to the current degrees until it finds a point. (Also tries previous degreefix in the array first) - 3/9/2013

Changed DegreeFix from WalkPath proceedure to the SPS_GetMyPos, changed tolerances + match percentages enough to hopefully prevent false positives on most locations. - 3/27/2013

Downloads:
20288
runescape_surface07.zip (http://dl.dropbox.com/u/32529420/runescape_surface07.zip)

To use this, download the attachments and place sps-osr.simba in your Includes/SPS/ folder, and extract the runescape_surface07 zip file to your Includes/SPS/img/ folder.

Then test it the exact same way you would using regular SRL/SPS.

I recommend using SPS Path Generator (http://villavu.com/forum/showthread.php?t=80134) to make paths to test! (Please make your points closer together than normal when making paths!)

Then insert path data into the script below and test it out (I recommend using SPS_AnyAngle at the moment, makes for more accurate read most of the time due to imperfect north):
program TestSPS;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
var
MyLoc: TPoint;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(2000);
MakeCompass(5);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, []);
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
SPS_WalkPath([]);
end.

As of 3/27/2013 DegreeFix has been updated to use SPS_GetMyPos rather than use only with SPS_WalkPath!
What this means for you, the user:
Depending on where you are setting up your walking to work, you may want to change the match percentages + tolerances a bit. I've found that .4 (for match percentage) is generally good for cities and things, while .5 or .6 would be best for areas that have a lot of grass and empty spaces. You can change the match percentage with the SPS_MatchesPercent global variable. The default is .4 or 40%, but the higher you can get without breaking your walking, the better. This is because we are trying to avoid false positives which would lead to an incorrect coordinate.

Note that the percentages/tolerance can be a bit touchy depending on your walking location, but 07 sps isn't exactly easy to do.
If you would like to debug the DegreeFix offset or current matchespercent, uncomment lines 374 and 407 in sps-osr.simba.

EDIT: Unable to attach the images for runescape_surface07 because the archive is too large (12MB)

Iambubbleman
03-10-2013, 05:31 AM
Hi there,

Error at Line 54
[Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
Compiling failed.

Don't know if that's an error because me, or the includes file.

SeanStar
03-10-2013, 05:38 AM
Hi there,

Error at Line 54
[Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
Compiling failed.

Don't know if that's an error because me, or the includes file.
Are you trying to run this as a script? SPS is an include itself... and you need SRL-OSR, as stated in bold up there.

Iambubbleman
03-10-2013, 05:39 AM
Are you trying to run this as a script? SPS is an include itself... and you need SRL-OSR, as stated in bold up there.

Yep, put both in the includes folder, I'll get back to you with some more debug in just a second.

E:
Looks to be a problem with SRL-OSR, now I'm getting a compiling error in text
[Error] C:\Simba\Includes\SRL-OSR/SRL/core/text.simba(805:13): Unknown identifier 'UpChars07' at line 804

Smidqe
03-10-2013, 05:42 AM
Hi there,

Error at Line 54
[Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
Compiling failed.

Don't know if that's an error because me, or the includes file.
Include the SRL-OSR before you include SPS. Can't show you an example since I'm currently using my phone.

E: Just check the example that OP has posted, it shows you how includes should be.

Justin
03-10-2013, 05:45 AM
I strongly suggest you wait until the include if official released as we could change functions the SPS currently use.

SeanStar
03-10-2013, 05:49 AM
I strongly suggest you wait until the include if official released as we could change functions the SPS currently use.

I can adjust as necessary Justin. No harm in releasing it now, as long as it gets updated as the include does.

Iambubbleman
03-10-2013, 05:54 AM
Hi there,

Hate to be a pest, just checked to make extra super sure that the files were properly seated in the Includes folder. They are, I promise ;)

Though it does appear my problem is with SRL-OSR as opposed to being with SPS-OSR, So I'll try get those worked out first, then test SPS-OSR out :)

SeanStar
03-10-2013, 07:19 AM
Hi there,

Hate to be a pest, just checked to make extra super sure that the files were properly seated in the Includes folder. They are, I promise ;)

Though it does appear my problem is with SRL-OSR as opposed to being with SPS-OSR, So I'll try get those worked out first, then test SPS-OSR out :)
One moment, let me get you the fonts.


Extract the attachment into your Fonts folder.

Ashaman88
03-10-2013, 07:29 AM
How well is this working?

SeanStar
03-10-2013, 07:37 AM
How well is this working?
Try it out, works extremely well in my limited test runs. (Would help if you could help test!)

Iambubbleman
03-10-2013, 08:06 AM
One moment, let me get you the fonts.


Extract the attachment into your Fonts folder.

+Rep, thanks a lot :3


program TestSPS;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
var
MyLoc: TPoint;
ToMine:TPointArray;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;

Procedure WalkToFlax;

begin


SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
ToMine := [Point(4532,3704), Point(4492,3704), Point(4472,3728), Point(4769, 3839), Point(4768, 3863), Point(4770, 3889), Point(4792, 3887), Point(4801, 3903), Point(4800, 3944), Point(4792, 3978), Point(4784, 4009), Point(4778, 4037), Point(4750, 4079)];
SPS_WalkPath(ToMine);


end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(2000);
MakeCompass(5);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
WalkToFlax;
end.


Debug:
SPS returns 4484,3716
Successfully executed.

I'm currently in the courtyard of Lumbridge, the script shows the current position, then clicks on the utilities tab, clicks the run option, and then stops.
The walking path is made to walk from the courtyard to the mines near Lumbridge Swap, and was made using Wolygons parth maker, with the Surface Map for 07. The script either sends the character into the castle to the West, going inside the kitchen, then clicking outside, or it goes out East, crossing the bridge, near the desert gate. The script should be going south, and does go south if started further down, after the castle has disappeared from the minimap.

I then used the GetPos function, and inserted those positions instead of the path creators, the result was the same.

SeanStar
03-10-2013, 08:30 AM
+Rep, thanks a lot :3


program TestSPS;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
var
MyLoc: TPoint;
ToMine:TPointArray;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;

Procedure WalkToFlax;

begin


SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
ToMine := [Point(4532,3704), Point(4492,3704), Point(4472,3728), Point(4769, 3839), Point(4768, 3863), Point(4770, 3889), Point(4792, 3887), Point(4801, 3903), Point(4800, 3944), Point(4792, 3978), Point(4784, 4009), Point(4778, 4037), Point(4750, 4079)];
SPS_WalkPath(ToMine);


end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(2000);
MakeCompass(5);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
WalkToFlax;
end.


Debug:
SPS returns 4484,3716
Successfully executed.

I'm currently in the courtyard of Lumbridge, the script shows the current position, then clicks on the utilities tab, clicks the run option, and then stops.
The walking path is made to walk from the courtyard to the mines near Lumbridge Swap, and was made using Wolygons parth maker, with the Surface Map for 07. The script either sends the character into the castle to the West, going inside the kitchen, then clicking outside, or it goes out East, crossing the bridge, near the desert gate. The script should be going south, and does go south if started further down, after the castle has disappeared from the minimap.

I then used the GetPos function, and inserted those positions instead of the path creators, the result was the same.
Set your compass to south, and then make sure you're using the latest sps-osr.simba I have on this thread. (Redownload and replace)

Let me know results after you've done this.

Iambubbleman
03-10-2013, 07:14 PM
Set your compass to south, and then make sure you're using the latest sps-osr.simba I have on this thread. (Redownload and replace)

Let me know results after you've done this.

Does the exact same thing as it did before, even after changing the MakeCompass from 5 to 185.

SeanStar
03-10-2013, 08:21 PM
Does the exact same thing as it did before, even after changing the MakeCompass from 5 to 185.

Will look into this as soon as I can. Thanks for helping test!

SeanStar
03-13-2013, 04:16 PM
+Rep, thanks a lot :3


program TestSPS;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
var
MyLoc: TPoint;
ToMine:TPointArray;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;

Procedure WalkToFlax;

begin


SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
ToMine := [Point(4532,3704), Point(4492,3704), Point(4472,3728), Point(4769, 3839), Point(4768, 3863), Point(4770, 3889), Point(4792, 3887), Point(4801, 3903), Point(4800, 3944), Point(4792, 3978), Point(4784, 4009), Point(4778, 4037), Point(4750, 4079)];
SPS_WalkPath(ToMine);


end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(2000);
MakeCompass(5);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
WalkToFlax;
end.


Debug:
SPS returns 4484,3716
Successfully executed.

I'm currently in the courtyard of Lumbridge, the script shows the current position, then clicks on the utilities tab, clicks the run option, and then stops.
The walking path is made to walk from the courtyard to the mines near Lumbridge Swap, and was made using Wolygons parth maker, with the Surface Map for 07. The script either sends the character into the castle to the West, going inside the kitchen, then clicking outside, or it goes out East, crossing the bridge, near the desert gate. The script should be going south, and does go south if started further down, after the castle has disappeared from the minimap.

I then used the GetPos function, and inserted those positions instead of the path creators, the result was the same.
I found your problem. The points are too apart from each other. Maximum distance they can be apart is 60, I will be changing it to 65. If you make your points closer together, it should walk just fine.

litoris
03-13-2013, 04:50 PM
I found your problem. The points are too apart from each other. Maximum distance they can be apart is 60, I will be changing it to 65. If you make your points closer together, it should walk just fine.

Or just use blindwalk... Seriously, I don't get why people insist on not using blindwalk, when it would make creating paths much esier. For most paths, three or four coordinates are enough to walk the whole distance using blindwalk.

Iambubbleman
03-13-2013, 05:00 PM
program TestSPS;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
var
MyLoc: TPoint;
ToMine:TPointArray;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;

Procedure WalkToFlax;

begin


SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
ToMine := [Point(4711, 3814), Point(4723, 3815), Point(4733, 3816), Point(4746, 3815), Point(4759, 3817), Point(4769, 3826), Point(4769, 3839), Point(4764, 3850), Point(4770, 3858), Point(4769, 3869), Point(4771, 3877), Point(4771, 3887), Point(4785, 3884), Point(4794, 3886), Point(4805, 3892), Point(4805, 3900), Point(4803, 3910), Point(4804, 3923), Point(4801, 3934), Point(4799, 3947), Point(4801, 3956), Point(4796, 3967), Point(4789, 3968), Point(4791, 3979), Point(4785, 3986), Point(4781, 3996), Point(4775, 4005), Point(4780, 4011), Point(4781, 4025), Point(4784, 4036), Point(4779, 4045), Point(4771, 4065), Point(4766, 4077), Point(4756, 4093), Point(4736, 4101)];
SPS_WalkPath(ToMine);


end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(2000);
MakeCompass(5);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
WalkToFlax;
end.


Works! Wow!

litoris
03-13-2013, 06:29 PM
Just spent over an hour testing this. I created custom maps out of the pieces in the surface folder, that way it doesn't get confused with similar shapes in the minimap.
It walks well with blindwalk, at all angles. I'm making a law crafter now :D
+rep to OP

SeanStar
03-14-2013, 12:56 AM
Just spent over an hour testing this. I created custom maps out of the pieces in the surface folder, that way it doesn't get confused with similar shapes in the minimap.
It walks well with blindwalk, at all angles. I'm making a law crafter now :D
+rep to OP

I've been running scripts with a lot of walking flawlessly for days. :)

The DegreeFix helps a lot.

gamer716
03-15-2013, 02:47 AM
Works really well! There is many opportunities in the future :)

helcast
03-15-2013, 03:00 AM
Seems to be working very well, when it works. My only issue is I have a script setup to two areas, a runecraft altar and a bank. It will walk back and fourth for quite sometime. By printing out the results of (sps_getMyPos) I can see that when it finally breaks down half way through a path the coordinates jump down from 3776, 3576 to 3776, 2876. It's considerably random, but what I've noticed it normally loses the coordinates half way through a path.

Also I noticed sometimes it clicks inaccurately, usually up to 10 tiles. So I'm not sure if that is accuracy or a anti-random that you put in to make the coordinates more random.



Better Results:
Using a for loop through blindwalk path seems to get the most accurate walking. Also I would change the minimum for SPS_WalkPath to 5 and 70. I saw that your method was the same as that was mentioned from DaWu, and his opinion on the matter for minimum and maximum distances seems to be more accurate.


for i := 0 to High(ToBank) do
repeat
Wait(RandomRange(600,800));
until(SPS_BlindWalk(ToBank[i]));

SeanStar
03-15-2013, 06:42 AM
Seems to be working very well, when it works. My only issue is I have a script setup to two areas, a runecraft altar and a bank. It will walk back and fourth for quite sometime. By printing out the results of (sps_getMyPos) I can see that when it finally breaks down half way through a path the coordinates jump down from 3776, 3576 to 3776, 2876. It's considerably random, but what I've noticed it normally loses the coordinates half way through a path.

Also I noticed sometimes it clicks inaccurately, usually up to 10 tiles. So I'm not sure if that is accuracy or a anti-random that you put in to make the coordinates more random.



Better Results:
Using a for loop through blindwalk path seems to get the most accurate walking. Also I would change the minimum for SPS_WalkPath to 5 and 70. I saw that your method was the same as that was mentioned from DaWu, and his opinion on the matter for minimum and maximum distances seems to be more accurate.


for i := 0 to High(ToBank) do
repeat
Wait(RandomRange(600,800));
until(SPS_BlindWalk(ToBank[i]));
I've had issues when using north, looking into that now (I know north isn't perfect, but anyangle works damn good)

helcast
03-15-2013, 05:49 PM
I have only thoroughly tested the anyangle method, but the compass was always pointing north.

SeanStar
03-16-2013, 03:51 AM
I have only thoroughly tested the anyangle method, but the compass was always pointing north.
If compass is north, it's set not to rotate the bitmap even if anyangle is set to true.. and I don't believe makecompass is working with the degreefix very well.

Iambubbleman
03-17-2013, 01:43 AM
AH, got to remember SRL OSR

Looking nice, sometimes it seems a bit touchy, will try to give an example

mcbain
03-19-2013, 10:37 PM
from my tests it seems to be working very well! good job :D

slacky
03-20-2013, 04:32 AM
The map on the other hand is not all that correct, VWB + GE is an example.. Else, good job ! :)

vizzyy
03-24-2013, 12:17 AM
Excellent. Works perfectly for me.

syn acid
03-24-2013, 12:48 PM
wtf is this

[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228

meanderingmonk
03-24-2013, 01:31 PM
wtf is this

[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228

I'm having the same error.

Here is the snippet of surrounding code:

begin
If (Not ForceNew) then
begin
Ids := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
begin
If SmartPairClient(IDs[I]) then
begin
Result := IDs[I];
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Paired with SMART[' + ToStr(Result) + ']');
Exit;
end;
end;
end;

quartersun
03-24-2013, 01:39 PM
The link is broken for sps-osr so I cant download it :/ someone pm me a mirror, or fix the post?

EDIT ----
Anyone else having the same problem, scroll down to the bottom of the post and click the attachment link, not the sps-osr link further up.

ineedbot
03-25-2013, 02:03 AM
I'm liking this! Thanks! Working well! Got it to run from Lumby Castle to Goblin House, and then back!

I have this! Running to Seer's Yews to bank, as well as the path back!



SPS_Setup(runescape_surface, ['6_6']);

SPS_WalkPath([Point(2720,2712), Point(2720,2736), Point(2720,2764), Point(2716,2788), Point(2712,2808), Point(2696,2828), Point(2680,2828), Point(2660,2828)]);
SPS_WalkPath([Point(2660,2828), Point(2680,2828), Point(2696,2828), Point(2712,2808), Point(2716,2788), Point(2720,2764), Point(2720,2736), Point(2720,2712)]);


Even the Fishing Guild to bank and back!


SPS_Setup(runescape_surface, ['5_7']);
SPS_WalkPath([Point(2164,3000), Point(2172,3004), Point(2192,3020), Point(2200,3000), Point(2220,2992)]);
SPS_WalkPath([Point(2220,2992), Point(2200,3000), Point(2192,3020), Point(2172,3004), Point(2164,3000)]);

djm995
03-25-2013, 04:10 AM
wtf is this

[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228

Simply follow all instructions in setting up simba for OSR again as you've probably done before, It keeps breaking when it gets updated

jamyy
03-25-2013, 09:01 PM
Exception in Script: Unable to find file 'SRL-OSR/Srl.simba' used from '', ok so i need help if possible. i downloaded it or i think i did i ZiP filed it into includes and it's still not working. could someone ytell me a solution pls cheers.

rj
03-25-2013, 09:41 PM
Exception in Script: Unable to find file 'SRL-OSR/Srl.simba' used from '', ok so i need help if possible. i downloaded it or i think i did i ZiP filed it into includes and it's still not working. could someone ytell me a solution pls cheers.

extract it

jamyy
03-25-2013, 09:50 PM
extract it
yes i ment i extracted it into the folder. still nothing works and it says i'm missing it.

deathdj
03-25-2013, 11:09 PM
Please Reupload sps-osr.simba
Edit:Thank you For Reuploading :)

Sjoe
03-26-2013, 06:19 PM
Just spent over an hour testing this. I created custom maps out of the pieces in the surface folder, that way it doesn't get confused with similar shapes in the minimap.
It walks well with blindwalk, at all angles. I'm making a law crafter now :D
+rep to OP

hey, could u give an example on how u use blindwalk in a script?

SPS_Anyangle doesn't really work for me and when the compassdegree is off by 20+ degrees, doesn't find the path.
Damn offset!

litoris
03-26-2013, 08:16 PM
hey, could u give an example on how u use blindwalk in a script?

SPS_Anyangle doesn't really work for me and when the compassdegree is off by 20+ degrees, doesn't find the path.
Damn offset!

You asked for an example, I wrote a whole tut. :)

http://villavu.com/forum/showthread.php?t=99716&p=1205387#post1205387

Sjoe
03-26-2013, 08:17 PM
You asked for an example, I wrote a whole tut. :)

http://villavu.com/forum/showthread.php?t=99716&p=1205387#post1205387

I love you !

shebee
03-26-2013, 09:25 PM
Seems to be pretty inaccurate at least in varrock.
I'll see if I have done something wrong, first time trying SPS, been using my own map walking so far.

SeanStar
03-27-2013, 06:58 AM
The "Degree Fix" portion is designed to work with SPS_WalkPath and nothing else at the moment. SPS_BlindWalk seems to work well, but I somehow doubt it would work in the long run considering the map offset from the compass would probably eventually cause SPS_GetMyPos to return -1,-1 (Point not found)

I could see about integrating the DegreeFix into SPS_GetMyPos when it is unable to find a point, though I'm fairly sure I'd want to turn the SPS_Accuracy to 3 (Maybe) and SPS_MatchesPercent to something higher to prevent false positives. This would result in a slightly longer time to find the point, but we'd rather not risk false positives; these would result in SPS_BlindWalk or whatever function mindlessly walking in a random direction. Would be especially harmful should the point it walked to be off your custom maps, or specified surface area maps, since it wouldn't be able to find it's way and recover.

If anyone else has feedback on the issue, it'd be greatly appreciated. I'm already working on fixing DegreeFix while the compass is north.

BigRedJapan
03-27-2013, 07:37 AM
What Path Maker are you guys Rolling on Cuz my Paths are in the hundreds and the SPS comes back in Thousands! Uhhhh!

Sjoe
03-27-2013, 07:39 AM
What Path Maker are you guys Rolling on Cuz my Paths are in the hundreds and the SPS comes back in Thousands! Uhhhh!

Try Cynicrus' http://villavu.com/forum/showthread.php?t=92498

or blindwalk method from litoris: http://villavu.com/forum/showthread.php?t=99716

WWFranco
03-27-2013, 08:58 PM
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''

:/ i put the files where u said are u making a vid about this btw?

SeanStar
03-27-2013, 09:01 PM
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''

:/ i put the files where u said are u making a vid about this btw?

In the OP


THIS IS USED WITH THE OFFICIAL SRL-OSR INCLUDE WHICH CAN BE FOUND HERE: https://github.com/SRL/SRL-OSR

You can get the fonts here: Fonts.zip (http://villavu.com/forum/attachment.php?attachmentid=19822&d=1362900038) (Extract into your Fonts folder)


Get SRL-OSR from that page in a zip, extract to your includes folder, and rename the folder from SRL-OSR-master to SRL-OSR.

Debug
03-27-2013, 11:40 PM
Been testing this around seers village. Not working great, always get -1,-1 errors :/

Lol Pk
03-28-2013, 12:15 AM
[Error] (1:1): Unexpected end of file at line 0
Compiling failed.

shebee
03-28-2013, 02:55 AM
[Error] (1:1): Unexpected end of file at line 0
Compiling failed.

Your last end is probably messed up (end. not end; e.g.)

SeanStar
03-28-2013, 03:18 AM
As of 3/27/2013 DegreeFix has been updated to use SPS_GetMyPos rather than use only with SPS_WalkPath!
What this means for you, the user:
Depending on where you are setting up your walking to work, you may want to change the match percentages + tolerances a bit. I've found that .4 (for match percentage) is generally good for cities and things, while .5 or .6 would be best for areas that have a lot of grass and empty spaces. You can change the match percentage with the SPS_MatchesPercent global variable. The default is .4 or 40%, but the higher you can get without breaking your walking, the better. This is because we are trying to avoid false positives which would lead to an incorrect coordinate.

Note that the percentages/tolerance can be a bit touchy depending on your walking location, but 07 sps isn't exactly easy to do.
If you would like to debug the DegreeFix offset or current matchespercent, uncomment lines 374 and 407 in sps-osr.simba.

Updated Download: 20288

Sjoe
03-28-2013, 03:33 AM
Updated Download: 20288

Nice work mate, will give it a go tomorrow.

Iambubbleman
03-28-2013, 05:58 AM
Nice, don't know if this is an issue with the update, but I've noticed that the script waits to get to a flag before walking again. It seems like FFlag is missing (Or whatever traditional SPS uses to walk constantly)

Otherwise, very nice job, seems to be getting more reliable!

justaddictonpc
03-28-2013, 06:47 PM
Hey guys,

I'm getting this when running the test script.


[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228
Compiling failed.
[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228
Compiling failed.

Any suggestions on how to fix this?

shebee
03-28-2013, 08:41 PM
I think the issue with SPS is more so due to the map, but I might be wrong.


Hey guys,

I'm getting this when running the test script.


[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228
Compiling failed.
[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228
Compiling failed.

Any suggestions on how to fix this?


You need to use smart 8.
Install smart 8 from the forums here and enable it in the script.
{$DEFINE SMART8}

botlover1234
03-29-2013, 12:50 AM
[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:203): Invalid number of parameters at line 228
Compiling failed.

What to do now?

mohammed49
03-30-2013, 12:08 PM
SPS_GetArea ERROR: Exception: Error while reading stream: File "C:\Simba\Includes\SPS\img\runescape_surface07\6_6. png" does not exist
SPS_MergeAreas ERROR: Exception: You are accessing an invalid point, (0,0) at bitmap[5]
Error: Exception: Access violation at line 398
The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 4, 6, 9]
please help me lol...

mohammed49
03-30-2013, 12:09 PM
i did everything trying to run this script
program cFlax;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}

Const
Lagg = 2000; //Change To Adjust Wait Time To Make Up For Your Lag
FlaxPrice = 50; //Change To The Ammount You Will Be Selling The Flax For
FlaxCol = 15131288;
BankCol = 8229016;
AntiFreq = 20; //The Lower, the More Antiban
Version = '1.4';
var
MyLoc: TPoint;
PBox: TBox;
secs,mins,hours,Tot,x,y,rand,Inv,FlaxPicked : Integer ;
MonPerHour,MoneyMade :Extended;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Enter Username
Players[0].Pass :=''; //Enter Password
Players[0].Nick :=''; //Enter Nick
Players[0].Active:=True;
End;

Procedure BankItems;

var
x,y: integer;

begin
MakeCompass(0);
repeat
if FindObj(x, y, 'ank' , BankCol, 2) then
begin
MMouse(x,y,5,5);
ClickMouse(x,y,1);
wait(Lagg);
end;
until(BankScreen)
//writeln('We Have Found A Bank')
wait(Lagg/2);
DepositAll;
FlaxPicked := FlaxPicked + 28;
//writeln('We Have Finished Banking')

CloseBank;
end;
Procedure ToField;
begin
MakeCompass(180);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);
SetRun(True)

MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
SPS_WalkPath([Point(2720, 2711), Point(2723, 2717), Point(2724, 2728), Point(2726, 2737), Point(2729, 2747), Point(2729, 2755), Point(2726, 2761), Point(2731, 2769), Point(2732, 2779), Point(2734, 2791), Point(2734, 2800), Point(2736, 2811), Point(2738, 2822), Point(2740, 2832), Point(2739, 2839), Point(2742, 2849), Point(2745, 2857), Point(2748, 2865), Point(2752, 2874), Point(2753, 2887), Point(2755, 2897), Point(2760, 2906), Point(2771, 2911), Point(2776, 2918), Point(2785, 2920), Point(2796, 2921), Point(2805, 2921), Point(2810, 2916), Point(2810, 2909), Point(2810, 2901), Point(2809, 2894), Point(2806, 2891), Point(2799, 2885), Point(2792, 2883), Point(2784, 2886), Point(2783, 2891), Point(2783, 2899), Point(2783, 2907), Point(2790, 2910), Point(2800, 2910), Point(2799, 2900), Point(2795, 2897), Point(2793, 2897), Point(2791, 2899), Point(2781, 2880)]);
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
end;
Procedure ToBank;
begin
MakeCompass(180);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);
SetRun(True)
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
SPS_WalkPath([Point(2781, 2880), Point(2791, 2899), Point(2793, 2897), Point(2795, 2897), Point(2799, 2900), Point(2800, 2910), Point(2790, 2910), Point(2783, 2907), Point(2783, 2899), Point(2783, 2891), Point(2784, 2886), Point(2792, 2883), Point(2799, 2885), Point(2806, 2891), Point(2809, 2894), Point(2810, 2901), Point(2810, 2909), Point(2810, 2916), Point(2805, 2921), Point(2796, 2921), Point(2785, 2920), Point(2776, 2918), Point(2771, 2911), Point(2760, 2906), Point(2755, 2897), Point(2753, 2887), Point(2752, 2874), Point(2748, 2865), Point(2745, 2857), Point(2742, 2849), Point(2739, 2839), Point(2740, 2832), Point(2738, 2822), Point(2736, 2811), Point(2734, 2800), Point(2734, 2791), Point(2732, 2779), Point(2731, 2769), Point(2726, 2761), Point(2729, 2755), Point(2729, 2747), Point(2726, 2737), Point(2724, 2728), Point(2723, 2717), Point(2720, 2711)]);
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
end;

function FindFlax(var fx, fy: Integer): Boolean;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.29, 0.85);

if not(FindColorsTolerance(arP, 6399256, MSX1, MSY1, MSX2, MSY2, 30)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);

for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('lax')) then
begin;
Result := True;
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
begin
Exit;
end;

GetMousePos(fx, fy);
end;

Function Antiban: Boolean;
begin
case random(2) of
//1: HoverSkill('strength', false);
1: MakeCompass(RandomRange(0,359));

end;
end;

procedure Proggy;


begin
ClearDebug;
ConvertTime(GetTimeRunning,hours,mins,secs);
MoneyMade := FlaxPicked * FlaxPrice / 1000;
MonPerHour := MoneyMade * 3600000 / GetTimeRunning;
WriteLn(' cFlax Version: '+Version);
WriteLn(' ');
WriteLn(' FlaxPicked: ' + intToStr(FlaxPicked));
WriteLn(' TimeRunning: ' + inttostr(hours)+ ' Hours, ' + inttostr(mins) + ' Minutes ' + inttostr(secs) + ' Seconds');
WriteLn(' Money Made: ' + floattoStr(MoneyMade) + 'K GP');
WriteLn(' Making: ' + floattoStr(Round(MonPerHour)) + 'K GP Per Hour');


end;


begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
wait(lagg);
MouseSpeed := 15;
PBox := IntToBox(220, 140, 300, 200);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);

if InvCount > 0 then
begin
ToBank;
BankItems;
end;

While(True) Do
begin
If not LoggedIn Then
Begin
LogInPlayer;
If FindNormalRandoms then
begin
Logout;
TerminateScript;
end;
end;
While(LoggedIn) do
begin
ToField;


repeat
FindFlax(x, y);
MMouse(x,y,3,3);
ClickMouse(x,y,1);

While (AveragePixelShift(PBox, 250, 500) > 100) do
begin;
wait(200);
rand := RandomRange(0,AntiFreq);
if rand = 1 then
begin
Antiban;
end;
end;


until(InvCount = 28)
writeln('We Have A Full Inv');
ToBank;
BankItems;
Proggy;
end;
end;


end.

Diegos123
03-30-2013, 05:19 PM
Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from ''
I am still running into this problem, can anybody help me please?

Iambubbleman
03-30-2013, 05:27 PM
Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from ''
I am still running into this problem, can anybody help me please?

Did you install SPS OSR correctly?

Should be in
\Simba\Includes\SPS

and should be named sps-osr

rj
03-30-2013, 10:34 PM
i did everything trying to run this script
program cFlax;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}

Const
Lagg = 2000; //Change To Adjust Wait Time To Make Up For Your Lag
FlaxPrice = 50; //Change To The Ammount You Will Be Selling The Flax For
FlaxCol = 15131288;
BankCol = 8229016;
AntiFreq = 20; //The Lower, the More Antiban
Version = '1.4';
var
MyLoc: TPoint;
PBox: TBox;
secs,mins,hours,Tot,x,y,rand,Inv,FlaxPicked : Integer ;
MonPerHour,MoneyMade :Extended;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Enter Username
Players[0].Pass :=''; //Enter Password
Players[0].Nick :=''; //Enter Nick
Players[0].Active:=True;
End;

Procedure BankItems;

var
x,y: integer;

begin
MakeCompass(0);
repeat
if FindObj(x, y, 'ank' , BankCol, 2) then
begin
MMouse(x,y,5,5);
ClickMouse(x,y,1);
wait(Lagg);
end;
until(BankScreen)
//writeln('We Have Found A Bank')
wait(Lagg/2);
DepositAll;
FlaxPicked := FlaxPicked + 28;
//writeln('We Have Finished Banking')

CloseBank;
end;
Procedure ToField;
begin
MakeCompass(180);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);
SetRun(True)

MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
SPS_WalkPath([Point(2720, 2711), Point(2723, 2717), Point(2724, 2728), Point(2726, 2737), Point(2729, 2747), Point(2729, 2755), Point(2726, 2761), Point(2731, 2769), Point(2732, 2779), Point(2734, 2791), Point(2734, 2800), Point(2736, 2811), Point(2738, 2822), Point(2740, 2832), Point(2739, 2839), Point(2742, 2849), Point(2745, 2857), Point(2748, 2865), Point(2752, 2874), Point(2753, 2887), Point(2755, 2897), Point(2760, 2906), Point(2771, 2911), Point(2776, 2918), Point(2785, 2920), Point(2796, 2921), Point(2805, 2921), Point(2810, 2916), Point(2810, 2909), Point(2810, 2901), Point(2809, 2894), Point(2806, 2891), Point(2799, 2885), Point(2792, 2883), Point(2784, 2886), Point(2783, 2891), Point(2783, 2899), Point(2783, 2907), Point(2790, 2910), Point(2800, 2910), Point(2799, 2900), Point(2795, 2897), Point(2793, 2897), Point(2791, 2899), Point(2781, 2880)]);
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
end;
Procedure ToBank;
begin
MakeCompass(180);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);
SetRun(True)
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
SPS_WalkPath([Point(2781, 2880), Point(2791, 2899), Point(2793, 2897), Point(2795, 2897), Point(2799, 2900), Point(2800, 2910), Point(2790, 2910), Point(2783, 2907), Point(2783, 2899), Point(2783, 2891), Point(2784, 2886), Point(2792, 2883), Point(2799, 2885), Point(2806, 2891), Point(2809, 2894), Point(2810, 2901), Point(2810, 2909), Point(2810, 2916), Point(2805, 2921), Point(2796, 2921), Point(2785, 2920), Point(2776, 2918), Point(2771, 2911), Point(2760, 2906), Point(2755, 2897), Point(2753, 2887), Point(2752, 2874), Point(2748, 2865), Point(2745, 2857), Point(2742, 2849), Point(2739, 2839), Point(2740, 2832), Point(2738, 2822), Point(2736, 2811), Point(2734, 2800), Point(2734, 2791), Point(2732, 2779), Point(2731, 2769), Point(2726, 2761), Point(2729, 2755), Point(2729, 2747), Point(2726, 2737), Point(2724, 2728), Point(2723, 2717), Point(2720, 2711)]);
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
end;

function FindFlax(var fx, fy: Integer): Boolean;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.29, 0.85);

if not(FindColorsTolerance(arP, 6399256, MSX1, MSY1, MSX2, MSY2, 30)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);

for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('lax')) then
begin;
Result := True;
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
begin
Exit;
end;

GetMousePos(fx, fy);
end;

Function Antiban: Boolean;
begin
case random(2) of
//1: HoverSkill('strength', false);
1: MakeCompass(RandomRange(0,359));

end;
end;

procedure Proggy;


begin
ClearDebug;
ConvertTime(GetTimeRunning,hours,mins,secs);
MoneyMade := FlaxPicked * FlaxPrice / 1000;
MonPerHour := MoneyMade * 3600000 / GetTimeRunning;
WriteLn(' cFlax Version: '+Version);
WriteLn(' ');
WriteLn(' FlaxPicked: ' + intToStr(FlaxPicked));
WriteLn(' TimeRunning: ' + inttostr(hours)+ ' Hours, ' + inttostr(mins) + ' Minutes ' + inttostr(secs) + ' Seconds');
WriteLn(' Money Made: ' + floattoStr(MoneyMade) + 'K GP');
WriteLn(' Making: ' + floattoStr(Round(MonPerHour)) + 'K GP Per Hour');


end;


begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
wait(lagg);
MouseSpeed := 15;
PBox := IntToBox(220, 140, 300, 200);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);

if InvCount > 0 then
begin
ToBank;
BankItems;
end;

While(True) Do
begin
If not LoggedIn Then
Begin
LogInPlayer;
If FindNormalRandoms then
begin
Logout;
TerminateScript;
end;
end;
While(LoggedIn) do
begin
ToField;


repeat
FindFlax(x, y);
MMouse(x,y,3,3);
ClickMouse(x,y,1);

While (AveragePixelShift(PBox, 250, 500) > 100) do
begin;
wait(200);
rand := RandomRange(0,AntiFreq);
if rand = 1 then
begin
Antiban;
end;
end;


until(InvCount = 28)
writeln('We Have A Full Inv');
ToBank;
BankItems;
Proggy;
end;
end;


end.

Simba tags please

EvanZillah
03-31-2013, 01:00 AM
Where do I put Runescape_surfaces07

Justin
03-31-2013, 01:08 AM
Simba tags please

Manually added to post + your quote.

Justin.

Sjoe
03-31-2013, 01:12 AM
Where do I put Runescape_surfaces07

sps\img\runescape_surface07

cooler1234
03-31-2013, 01:57 AM
my screen is blank

greengoe
03-31-2013, 05:29 AM
One moment, let me get you the fonts.


Extract the attachment into your Fonts folder.



can you help me please i can't fix the osl part i dont even know how it calls lol help me and give me ur donate link i will give you a gift tnx bro

Fluppie
03-31-2013, 03:36 PM
Thanks, fixed my problem :)

Fabzor
03-31-2013, 07:40 PM
found whats fucking up :)

idontlikeu
03-31-2013, 10:36 PM
once again im a noob at this can u pleas help me

To use this, download the attachments and place sps-osr.simba in your Includes/SPS/ folde -> im doing this but when i look in the includes i only see 2 folders: SEL , SRL-OSR
Where do i need to put it in any help pleas?<3

Hamish
04-01-2013, 02:22 AM
Been having a lot of difficulty trying to get SPS to work, i'll give it a shot and report back.

mesinko3
04-01-2013, 04:25 AM
Hello guys, i am getting the same error as another member on this thread
Error at Line 54
[Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
Compiling failed.

I did everything thats required, but still can't get it to work :/ any help is much appreciated.

SeanStar
04-01-2013, 04:32 AM
once again im a noob at this can u pleas help me

To use this, download the attachments and place sps-osr.simba in your Includes/SPS/ folde -> im doing this but when i look in the includes i only see 2 folders: SEL , SRL-OSR
Where do i need to put it in any help pleas?<3
You need to install regular SPS on simba before you install this. In Simba: View->Extensions->Enable sps.sex

Hello guys, i am getting the same error as another member on this thread
Error at Line 54
[Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
Compiling failed.

I did everything thats required, but still can't get it to work :/ any help is much appreciated.
Do you have SRL-OSR include installed and included on your script? It's a requirement.

idontlikeu
04-01-2013, 10:10 AM
@ Seanstar


How do i enable sps.sex i cant open it ..?

Binnert
04-01-2013, 12:55 PM
I keep getting an error?

SPS_BitmapToMap(Minimap, SPS_Accuracy, SmallMap);
How do I fix this?

still2good
04-01-2013, 03:26 PM
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from 'C:\Users\Parth\Downloads\FishingGuildFisher[1.02].simba'

jeweetettochh
04-01-2013, 03:46 PM
EDIT: Unable to attach the images for runescape_surface07 because the archive is too large (12MB)

Where are we supposed to download the images? I'm gettin the feelin simba doesnt work properly without them? :S

idontlikeu
04-01-2013, 05:31 PM
i downloaded all the attachments but

when i need to do this "To use this, download the attachments and place sps-osr.simba in your Includes/SPS/ folder, and extract the runescape_surface07 zip file to your Includes/SPS/img/ folder."

i go to includes -> but i can't find SPS folder .. any ideas? pleas help me advanced im a noob :(

mesinko3
04-01-2013, 06:25 PM
You need to install regular SPS on simba before you install this. In Simba: View->Extensions->Enable sps.sex

Do you have SRL-OSR include installed and included on your script? It's a requirement.

Yes, i believe i do but the folder was named SRL-OSR.master, i renamed it to SRL-OSR. also when i look into the folder it has the include but it's just named SRL, idk if it should of been SRL-OSR? i also have the SPS-OSR :/

greengoe
04-02-2013, 01:21 AM
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from 'Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from 'Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from '


lol wtf how i fix this please somewon explain me xxx

waqqas123
04-02-2013, 06:49 AM
i get a exception file sps-ors can not be found located at simba ''

i have i think followed all instructions'

what am i doing wrong? if i need a file link me please

idontlikeu
04-02-2013, 07:06 AM
i get a exception file sps-ors can not be found located at simba ''

i have i think followed all instructions'

what am i doing wrong? if i need a file link me please

same problem i can't find the folder.

SeanStar
04-02-2013, 07:22 AM
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from 'Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from 'Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from ''
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from '


lol wtf how i fix this please somewon explain me xxx


i get a exception file sps-ors can not be found located at simba ''

i have i think followed all instructions'

what am i doing wrong? if i need a file link me please


same problem i can't find the folder.

Follow this tutorial please: http://villavu.com/forum/showthread.php?t=100543

idontlikeu
04-02-2013, 08:14 AM
Follow this tutorial please: http://villavu.com/forum/showthread.php?t=100543

I followed i still don't got the folder "SPS" help me with that i got smart8 and SRL OSRL pleas..

SeanStar
04-02-2013, 08:22 AM
I followed i still don't got the folder "SPS" help me with that i got smart8 and SRL OSRL pleas..
Go to your extensions, enabled sps.sex and update it. You need regular sps before you can even begin to try using sps-osr

idontlikeu
04-02-2013, 08:27 AM
Go to your extensions, enabled sps.sex and update it. You need regular sps before you can even begin to try using sps-osr

never mind i found it thank you smuch !

SeanStar
04-02-2013, 08:35 AM
Sean,

with what do i need to open with its a .sex

thank you for helping me so much im almostthere pleas help me further <3 :(
On simba, go to View -> Extensions
Then select sps.sex and check the box to enable the extension for it. Then go to SPS -> Update

idontlikeu
04-02-2013, 08:40 AM
On simba, go to View -> Extensions
Then select sps.sex and check the box to enable the extension for it. Then go to SPS -> Update

Enabled it but then when i want to update it , it says :"No SPS update available" Any ideas and there is no file in the simba/includes/ i only see SRL-OSRL and SRL ?

SeanStar
04-02-2013, 08:56 AM
Enabled it but then when i want to update it , it says :"No SPS update available" Any ideas and there is no file in the simba/includes/ i only see SRL-OSRL and SRL ?
Did you check for updates first? You may have to do that.

idontlikeu
04-02-2013, 08:57 AM
Did you check for updates first? You may have to do that.

I looked and i was @ SRL->settings and i disabled Override update and then i checked SPS and then it updated ! :)

Can u pleas make sure to edit the thread and put everything in so other people know what to do , I found everything thank you

ineedbot
04-03-2013, 12:58 AM
Very good include. However, I think you should make a make north function using the SPS map some how. Or a better angle positioning function. Because AnyAngle still sometimes returns an incorrect position.

And it seems like BlindWalk messes up after sometime of running a script.

Plus, does anyone have a non-GE sps map? Because edgeville is too updated and same as west varrock bank.

samerdl
04-04-2013, 12:33 PM
Thanks for this great tool, sometimes it messes up - but it works, reads the area\terrain and walks it.

Many thank you to the developers, just couldn't help but to ask - will we be getting Mini Game maps - so we could set up an easily unstucking feature for jadcaves?

still2good
04-05-2013, 12:35 AM
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from 'C:\Users\Parth\Downloads\ineedbot's AIO Chopper[2.1].simba'
Exception in Script: Unable to find file 'SRL-OSR/SRL.Simba' used from 'C:\Users\Parth\Downloads\ineedbot's AIO Chopper[2.1].simba'

CoDFan819
04-05-2013, 01:57 AM
I noticed the map rotation was a bit buggy and SPS_GetMyPos would have a good chance of failing to find my position [returns (-1, -1)] so I checked out the code and I saw that DF was being used as a global variable but was declared locally in SPS_GetMyPos. I've deleted the variable and it seems to have fixed the problem!

I deleted "DF" from line 348 of sps-osr.simba:

DF, Z, a, t, FoundMatches: integer;

Great work on SPS-OSR so far though thanks!

Edit: Just read through the replies above, this should fix your problem ineedbot

greengoe
04-05-2013, 04:02 AM
http://villavu.com/forum/showthread.php?t=99577&page=2&p=1216238&posted=1#post1216238

Smoeltje
04-05-2013, 01:12 PM
I noticed the map rotation was a bit buggy and sometimes SPS_GetMyPos would take a long time to find my position so I checked out the code and I saw that DF was being used as a global variable but was declared locally in SPS_GetMyPos. I've deleted the variable and it seems to have fixed the problem!

I deleted "DF" from line 348 of sps-osr.simba:

DF, Z, a, t, FoundMatches: integer;

Great work on SPS-OSR so far though thanks!

Edit: Just read through the replies above, this should fix your problem ineedbot
Im going to test this out in a bit.
Edit: Sadly still getting:
SPS_GetMyPos: Finished in 1296 ms. Result = (4037, 3526)
SPS_GetMyPos: Finished in 1344 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1359 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1359 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1344 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1375 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1375 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1359 ms. Result = (3794, 3400)

CoDFan819
04-05-2013, 01:57 PM
Im going to test this out in a bit.
Edit: Sadly still getting:
SPS_GetMyPos: Finished in 1296 ms. Result = (4037, 3526)
SPS_GetMyPos: Finished in 1344 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1359 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1359 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1344 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1375 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1375 ms. Result = (3794, 3400)
SPS_GetMyPos: Finished in 1359 ms. Result = (3794, 3400)

I found my problem was that my coordinates would return as (-1, -1) so the fix worked for me, your position seems to be returning correctly though? Are you walking and the coordinates are not updating in that snippet?

akadhox
04-07-2013, 02:55 AM
IMPORTANT QUESTION: Why does it have the grand exchange??????

SeanStar
04-07-2013, 11:06 AM
IMPORTANT QUESTION: Why does it have the grand exchange??????
This is the closest high resolution map I could find to the time period. If you can provide me with a better one..

akadhox
04-07-2013, 02:54 PM
This is the closest high resolution map I could find to the time period. If you can provide me with a better one..

Ummm play oldschool runescape in your browser and above the game click "World Map"???
Here you Go: http://www.runescape.com/img/rsp777/gamewin/runescape-map-24-july-07.jpg

SeanStar
04-07-2013, 05:41 PM
Ummm play oldschool runescape in your browser and above the game click "World Map"???
Here you Go: http://www.runescape.com/img/rsp777/gamewin/runescape-map-24-july-07.jpg
Lol? I'm not stupid, that map is crap.

akadhox
04-07-2013, 08:16 PM
Lol? I'm not stupid, that map is crap.
oh...well sorry to offend you, how about this map?
http://images1.wikia.nocookie.net/__cb20110711100610/runescape/images/b/b6/Runesacpe-world-map-2007.jpg
if not that then someones gonna have to start taking alot of screenshots.....

SeanStar
04-07-2013, 10:09 PM
oh...well sorry to offend you, how about this map?
http://images1.wikia.nocookie.net/__cb20110711100610/runescape/images/b/b6/Runesacpe-world-map-2007.jpg
if not that then someones gonna have to start taking alot of screenshots.....
The resolution must be of that inside the minimap ingame. The maps you're sending are not high enough resolution, plus they have compression artifacts.

If you could find a map the resolution and quality of runescape_surface07.jpg during the exact time period, I'd more than happily use it to regenerate the sps maps.

kadir
04-08-2013, 08:22 AM
SPS_Setup(): ERROR: SPS areas are not set!
SPS ERROR: SPS_Setup was never called
SPS returns -1,-1
SPS ERROR: SPS_Setup was never called
Successfully executed.

L3nnuk
04-08-2013, 03:11 PM
So I'm trying to learn SPS walking, but it always throws
SPS returns -1,-1 at me when I try to get my location.
This is with my own made map and also when using the surface07.

Code:

program TestSPS;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
var
MyLoc: TPoint;
ToPlace:TPointArray;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;


begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['8_6','8_7','8_8','9_7']);
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));

end.

Big Tom
04-08-2013, 10:41 PM
Someone wanna help me out and tell me how to get the SPS extension. I looked around and saw someone say you need the original SPS before you can use SPS-OSR which makes sense. I have the OSR folder, there just isnt and SPS folder in it to put these files. If SPS is an extension, I definitely dont have it because the last extension I put on was msi.remote.. Its been awhile. I have SRL-OSR, I just dont have an SPS folder in it. Just need someone to point me in the right direction

My exact error is: Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from 'C:\Simba\Scripts\ineedbot's AIO Chopper[2.1].simba'

L3nnuk
04-09-2013, 11:25 AM
Someone wanna help me out and tell me how to get the SPS extension. I looked around and saw someone say you need the original SPS before you can use SPS-OSR which makes sense. I have the OSR folder, there just isnt and SPS folder in it to put these files. If SPS is an extension, I definitely dont have it because the last extension I put on was msi.remote.. Its been awhile. I have SRL-OSR, I just dont have an SPS folder in it. Just need someone to point me in the right direction

My exact error is: Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from 'C:\Simba\Scripts\ineedbot's AIO Chopper[2.1].simba'

Enable Enable extensions.sex. Then update simba. And update SPS when it appears in Simba. It should generate the SPS folder in your includes folder. Then you also have to download the 07 pack.

Uhh.. Just check the simba install guides. Tons of threads about it.

Big Tom
04-09-2013, 10:58 PM
Ya I downloaded smart a long time ago and the extension extension didnt even exist. I just completely redownloaded simba and got everything working. Thanks for the help

joe hartwig
04-10-2013, 07:46 AM
missing an image i think 0_6 from runescapsurface07.zip

GoodKush
04-11-2013, 02:44 AM
Exception in Script: Unable to find file 'SPS/sps-osr.simba'

can someone help me?

adrian38
04-11-2013, 06:49 AM
Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from 'C:\Users\bot\Downloads\ineedbot's AIO Chopper[2.1] (1).simba'


;L

Binm7md
04-11-2013, 09:12 AM
Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from ''

i still get this after adding it any help?

Crazed
04-11-2013, 10:23 AM
Download is down:/

Kuriamas
04-13-2013, 09:56 AM
Why it walks only few meters and stops? It doesn't know where to walk...

CoDFan819
04-14-2013, 10:20 PM
Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from 'C:\Users\bot\Downloads\ineedbot's AIO Chopper[2.1] (1).simba'


;L


Exception in Script: Unable to find file 'SPS/sps-osr.simba'

can someone help me?

You need to download the script in the first post and place it in the Includes/SPS/ directory

rs cheata
04-15-2013, 03:46 PM
Debug:
SPS returns 4484,3716
Successfully executed.

I tried putting points close, and everything, just not working

kid cudi
04-18-2013, 02:15 AM
SPS returns -1,-1 trying to run the alkharid leather tanner pleeeeaaaseee help

wthomas
04-18-2013, 02:37 AM
SPS returns -1,-1 trying to run the alkharid leather tanner pleeeeaaaseee help

What map segments have you loaded?

kid cudi
04-18-2013, 03:43 AM
im not exactly sure what that means im not very good at this stuff:(

wthomas
04-18-2013, 09:51 AM
im not exactly sure what that means im not very good at this stuff:(

Well, you need to load specific bits of the map.... ie if the tiles of map you have loaded are around castle wars and you're in varrock its obviously going to return -1, -1....

Member Monroe
04-21-2013, 04:12 AM
I'm trying to run a script that uses SPS for OSR but Simba opens up a new tab for SPS-OSR.simba with this error.

[Error] C:\Simba\Includes\SPS/sps-osr.simba(357:9): Unknown identifier 'ClickNorth' at line 356


else begin
if (inRange(a, 10, 350)) then
if (SPS_ClickNorth) then
ClickNorth(SRL_ANGLE_HIGH) // That "ClickNorth" is giving the error.
else
MakeCompass('N');

Wirezzz
04-21-2013, 12:57 PM
It keeps giving this error, even though I set SPS:
SPS_Setup(): ERROR: SPS areas are not set!
SPS ERROR: SPS_Setup was never called
SPS returns -1,-1
SPS ERROR: SPS_Setup was never called
Successfully executed.

ikillthechickens
04-22-2013, 03:11 AM
For me it doesn't follow the path i created at all, sometimes it clicks other times it does nothing. Im using the whole runescape map that was in the img/ folder

samerdl
04-30-2013, 01:15 PM
For me it doesn't follow the path i created at all, sometimes it clicks other times it does nothing. Im using the whole runescape map that was in the img/ folder

Use a small map from the list (the 0_1,0_2.. etc files)

Then when you load it get your position using this:


begin
SPS_Setup(RUNESCAPE_SURFACE, ['0_0']);
SPS_AnyAngle := True;
MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
end;


That will write your proper position on the map, of course change 0_0 with your proper image, works for me when i fish at Jaitszo, the big map just never worked for me.

Flight
05-03-2013, 11:28 AM
Hey guys. So previously I tried over and over to use Wizzup?'s old 'GetWallAngle' to work correctly in order to force our MiniMap into a perfect(ish) north for accurate SPS detection. Unfortunately the function is outdated and I simply could not fix it. So as an alternative I made a quick 10-minute procedure that will attempt to set your compass to perfect north. It simply rotates your compass (in the same way of the normal 'MakeCompass') while searching for both a straight horizontal wall and a straight vertical wall (10-12 in length). If either are found it's assumed the the compass has been aligned to perfect(ish) north.

It's dirty way of aligning the map but it's worked great for me so far and has improved my SPS accuracy by a huge amount.


Procedure ForceMapNorth;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,T2: Integer;
label
Start;
begin
DTM_VertWall := DTMFromString('mFQEAAHicpcvHDQAgDMBAeqh7sP9uEV+8Qs DSPb3cexMDHQ0VgoKMhIgAj6NqtvmsvrsYaCfR');
DTM_HorWall := DTMFromString('mFQEAAHicpcvJCQAgEMBA79s+7L+3xa8BK1 gNzDPT3AY6GioKMhIiAjwcrHlri6gtPq3vDihAJ9E=');

Start:
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F = 0) then
T2 := 1500
else
T2 := 2500;
KeyDown((Ord(not Left) * 2) + 37);
MarkTime(T);
Repeat
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Wait(16);
Until(TimeFromMark(T) >= T2)

if Left then
KeyUp(VK_Left)
else
KeyUp(VK_Right);

if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
if (F < 2) then
GoTo Start;
end;

FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;


I simply call this procedure right before walking a path in SPS, and I'd recommend any users doing the same. So...any thoughts or suggestions?

Edit:
Oh yes, obviously this will only work in an area with walls visible on the minimap.

Edit2:
Fixed a silly typo as well as improved the DTMs.

Haxz
05-03-2013, 02:34 PM
Hey guys. So previously I tried over and over to use Wizzup?'s old 'GetWallAngle' to work correctly in order to force our MiniMap into a perfect(ish) north for accurate SPS detection. Unfortunately the function is outdated and I simply could not fix it. So as an alternative I made a quick 10-minute procedure that will attempt to set your compass to perfect north. It simply rotates your compass (in the same way of the normal 'MakeCompass') while searching for both a straight horizontal wall and a straight vertical wall (10-12 in length). If either are found it's assumed the the compass has been aligned to perfect(ish) north.

It's dirty way of aligning the map but it's worked great for me so far and has improved my SPS accuracy by a huge amount.


Procedure ForceMapNorth;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F: Integer;
label
Start;
begin
DTM_VertWall := DTMFromString('mFQEAAHicpcu5DQAgDMBA/vB27L9lRItXCFi60su95xEQkZBRIKho6BiYOKpmm8/quwu1bSbN');
DTM_HorWall := DTMFromString('mFQEAAHicpcu5DQAgDMBA/p+O/beMaLHEBAFLV3qam4WDR0BEQkZBRUPHMG9tEbXFp/XdAcVFJs0=');

Start:
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);

KeyDown((Ord(not Left) * 2) + 37);
MarkTime(T);
Repeat
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Wait(16);
Until(TimeFromMark(T) >= 1500)

if Left then
KeyUp(VK_Left)
else
KeyUp(VK_Right);

if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
if (F < 2) then
GoTo Start;
end;

FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;


I simply call this procedure right before walking a path in SPS, and I'd recommend any users doing the same. So...any thoughts or suggestions?

Edit:
Oh yes, obviously this will only work in an area with walls visible on the minimap.

Edit2:
Fixed a silly typo as well as improved the DTMs.

I have thought of making something like this, but didn't have the idea of using just vertical and horizontal wall. This would be a very useful procedure! I like the idea and the DTMs can be easily changed to a wall angle that I wanted. Would try to use this procedure in my fighter to bank.

Btw, hows the ObjDTM fix doing so far? :p

Flight
05-03-2013, 03:26 PM
I have thought of making something like this, but didn't have the idea of using just vertical and horizontal wall. This would be a very useful procedure! I like the idea and the DTMs can be easily changed to a wall angle that I wanted. Would try to use this procedure in my fighter to bank.

Btw, hows the ObjDTM fix doing so far? :p

Not so well. I had a few ObjDTMs detected for a few days (detected on separately 15+ spawned SMARTS) and then the next day none of them were detected. Let's hope 'ol euphemism has better news because I'm running out of patience.

jukenuke
05-05-2013, 12:37 AM
hmm

l6bustank
05-05-2013, 12:27 PM
just made a path. In towns it seems to missclick west like 10-5 pixels, this happens with more than half of the clicks it makes on MM. It gets lost too pretty easily...

l6bustank
05-05-2013, 01:16 PM
just made a path. In towns it seems to missclick west like 10-5 pixels, this happens with more than half of the clicks it makes on MM. It gets lost too pretty easily...

E: when there are more than 5 ppl on the map, it wont start moving at all.

Sjoe
05-05-2013, 05:34 PM
Hey guys. So previously I tried over and over to use Wizzup?'s old 'GetWallAngle' to work correctly in order to force our MiniMap into a perfect(ish) north for accurate SPS detection. Unfortunately the function is outdated and I simply could not fix it. So as an alternative I made a quick 10-minute procedure that will attempt to set your compass to perfect north. It simply rotates your compass (in the same way of the normal 'MakeCompass') while searching for both a straight horizontal wall and a straight vertical wall (10-12 in length). If either are found it's assumed the the compass has been aligned to perfect(ish) north.

It's dirty way of aligning the map but it's worked great for me so far and has improved my SPS accuracy by a huge amount.

I simply call this procedure right before walking a path in SPS, and I'd recommend any users doing the same. So...any thoughts or suggestions?

Edit:
Oh yes, obviously this will only work in an area with walls visible on the minimap.

Edit2:
Fixed a silly typo as well as improved the DTMs.

Love this here :p

It sometimes tries to force the map at West though :(

Flight
05-06-2013, 01:53 AM
Love this here :p

It sometimes tries to force the map at West though :(

Ok, so through further progressing I advanced the function to use a much more practical method. I hope you'll like what I did here as I'm quite pleased with the ingenuity. :smarty:

Before we had two static DTMs; one of a vertical wall and one of a horizontal wall, both about 12 in length. Like I said this was a sloppy way of doing it.

So, what I've done is created two new functions to aid the 'ForceMapNorth' function. The first of which will find the longest wall on your minimap, no matter what angle you're at. It search both horizontal and vertical. The second function generates an absolute DTM of a straight-line wall. You feed this function what wall type you want (1 for vertical, 2 for horizontal) and the length of the wall and it will generate a perfect wall DTM for you. Later these two function work together to auto-generate a perfect DTM of the longest wall (both vertical and horizontal) on your MM and these two DTMs are fed into the ForceMapNorth function. Now, in this new version of the function I chose to generate DTMs of only 70% of the longest wall but of course this could be changed back to 100% of the longest wall, if one chooses.

Also, in this new version of ForceMapNorth there's a more accurate way of rotating the map and it will not rotate as far as before. Also if the DTM is not found in the first direction it rotates it should try again in the opposite direction, starting from North. If the DTM is not found in either direction it will revert your compass back to the default North position.


{************************************************* ******************************
Function GenerateWallDTM(WallType, WallLength: Integer): Integer;
By: Flight
Description: Creates a DTM of a perfectly straight wall.
-WallType : 1 for vertical, 2 for horizontal
-WallLength: Length of the DTM to be generated
************************************************** *****************************}
function GenerateWallDTM(WallType, WallLength: Integer): Integer;
var
i: Integer;
TempTDTM: TDTM;
mPnt: TDTMPointDef;
sPnts: array of TDTMPointDef;
begin
SetArrayLength(sPnts, (WallLength-1));
mPnt.x := 0;
mPnt.y := 0;
mPnt.AreaSize := 0;
mPnt.AreaShape := 0;
mPnt.Color := 16119287;
mPnt.Tolerance := 40;

for i:=0 to High(sPnts) do
begin
case WallType of
1:
begin
sPnts[i].x := 0;
sPnts[i].y := i+1;
end;
2:
begin
sPnts[i].x := i+1;
sPnts[i].y := 0;
end;
end;
sPnts[i].AreaSize := 0;
sPnts[i].AreaShape := 0;
sPnts[i].Color := 16119287;
sPnts[i].Tolerance := 40;
end;

TempTDTM.MainPoint := mPnt;
TempTDTM.SubPoints := sPnts;
Result := AddDTM(TempTDTM);
end;

{************************************************* ******************************
Function GetLongestWallLength(WallType: Integer): Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle.
-WallType: 1 for vertical walls, 2 for horizontal walls
************************************************** *****************************}
function GetLongestWallLength(WallType: Integer): Integer;
var
B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

if (WallType = 1) then
SplitTPAExWrap(TPA, 2, 5, ATPA)
else
SplitTPAExWrap(TPA, 5, 2, ATPA);

SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
if (WallType = 1) then
Result := (B.Y2-B.Y1)
else
Result := (B.X2-B.X1);
end;

{************************************************* ******************************
Function ForceMapNorth: Boolean;
By: Flight
Description: Using auto-generated wall DTMs, this function will attempt to
rotate the compass to near-perfect north. Should it fail it will revert
back to default north.
************************************************** *****************************}
Function ForceMapNorth: Boolean;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,L1,L2: Integer;
label
Start,FuncEnd;
begin
Result := False;
L1 := GetLongestWallLength(1);
L2 := GetLongestWallLength(2);
if (L1 > 50) then
L1 := 50;
if (L2 > 50) then
L2 := 50;

DTM_VertWall := GenerateWallDTM(1, Round(L1*0.85)); //Create a DTM 85% of the length of the longest vertical wall
DTM_HorWall := GenerateWallDTM(2, Round(L2*0.85)); //Create a DTM 85% of the length of the longest horizontal wall

if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
begin
Result := True;
GoTo FuncEnd;
end;

StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);

Start:
if (F > 0) then
MakeCompass('N');

MarkTime(T);
Repeat
TypeByte((Ord(not Left) * 2) + 37); //No holding down, actually press the arrow key
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Until(TimeFromMark(T) >= 1000)

FuncEnd:
if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F < 2) then
GoTo Start;
end else if ((X > 1) and (Y > 1)) then
Result := True;

if not Result then
MakeCompass('N');
FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;

Sjoe
05-06-2013, 02:00 AM
Ok, so through further progressing I advanced the function to use a much more practical method. I hope you'll like what I did here as I'm quite pleased with the ingenuity. :smarty:

Before we had two static DTMs; one of a vertical wall and one of a horizontal wall, both about 12 in length. Like I said this was a sloppy way of doing it.

So, what I've done is created two new functions to aid the 'ForceMapNorth' function. The first of which will find the longest wall on your minimap, no matter what angle you're at. It search both horizontal and vertical. The second function generates an absolute DTM of a straight-line wall. You feed this function what wall type you want (1 for vertical, 2 for horizontal) and the length of the wall and it will generate a perfect wall DTM for you. Later these two function work together to auto-generate a perfect DTM of the longest wall (both vertical and horizontal) on your MM and these two DTMs are fed into the ForceMapNorth function. Now, in this new version of the function I chose to generate DTMs of only 70% of the longest wall but of course this could be changed back to 100% of the longest wall, if one chooses.

Also, in this new version of ForceMapNorth there's a more accurate way of rotating the map and it will not rotate as far as before. Also if the DTM is not found in the first direction it rotates it should try again in the opposite direction, starting from North. If the DTM is not found in either direction it will revert your compass back to the default North position.


{************************************************* ******************************
Function GenerateWallDTM(WallType, WallLength: Integer): Integer;
By: Flight
Description: Creates a DTM of a perfectly straight wall.
-WallType : 1 for vertical, 2 for horizontal
-WallLength: Length of the DTM to be generated
************************************************** *****************************}
function GenerateWallDTM(WallType, WallLength: Integer): Integer;
var
i: Integer;
TempTDTM: TDTM;
mPnt: TDTMPointDef;
sPnts: array of TDTMPointDef;
begin
SetArrayLength(sPnts, (WallLength-1));
mPnt.x := 0;
mPnt.y := 0;
mPnt.AreaSize := 0;
mPnt.AreaShape := 0;
mPnt.Color := 16119287;
mPnt.Tolerance := 40;

for i:=0 to High(sPnts) do
begin
case WallType of
1:
begin
sPnts[i].x := 0;
sPnts[i].y := i+1;
end;
2:
begin
sPnts[i].x := i+1;
sPnts[i].y := 0;
end;
end;
sPnts[i].AreaSize := 0;
sPnts[i].AreaShape := 0;
sPnts[i].Color := 16119287;
sPnts[i].Tolerance := 40;
end;

TempTDTM.MainPoint := mPnt;
TempTDTM.SubPoints := sPnts;
Result := AddDTM(TempTDTM);
end;

{************************************************* ******************************
Function GetLongestWallLength: Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle. This
number is based off both vertical and horizontal walls.
************************************************** *****************************}
function GetLongestWallLength: Integer;
var
B: TBox;
L1,L2: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

{Find all vertical walls and sort by size}
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

SplitTPAExWrap(TPA, 2, 5, ATPA);
SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
L1 := (B.Y2-B.Y1);

{Rinse}
TPA := [];
ATPA := [];
B := IntToBox(0, 0, 0, 0);

{Find all horizontal walls and sort by size}
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

SplitTPAExWrap(TPA, 5, 2, ATPA);
SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
L1 := (B.X2-B.X1);

if (L1 > L2) then
Result := L1
else
Result := L2;
end;

{************************************************* ******************************
Function ForceMapNorth: Boolean;
By: Flight
Description: Using auto-generated wall DTMs, this function will attempt to
rotate the compass to near-perfect north. Should it fail it will revert
back to default north.
************************************************** *****************************}
Function ForceMapNorth: Boolean;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,L: Integer;
label
Start,FuncEnd;
begin
Result := False;
L := GetLongestWallLength;
if (L > 50) then
L := 50;

DTM_VertWall := GenerateWallDTM(1, Round(L*0.7)); //Create a DTM 70% of the length of the longest vertical wall
DTM_HorWall := GenerateWallDTM(2, Round(L*0.7)); //Create a DTM 70% of the length of the longest horizontal wall

if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
begin
Result := True;
GoTo FuncEnd;
end;

StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);

Start:
if (F > 0) then
MakeCompass('N');

KeyDown((Ord(not Left) * 2) + 37);
MarkTime(T);
Repeat
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Until(TimeFromMark(T) >= 1000)

if Left then
KeyUp(VK_Left)
else
KeyUp(VK_Right);

FuncEnd:
if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F < 2) then
GoTo Start;
end else if ((X > 1) and (Y > 1)) then
Result := True;

if not Result then
MakeCompass('N');
FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;


I want to kiss you right now!

My flaxpicker is afk-able now ;) No more hiccups with SPS Walking

Haxz
05-06-2013, 02:46 AM
Ok, so through further progressing I advanced the function to use a much more practical method. I hope you'll like what I did here as I'm quite pleased with the ingenuity. :smarty:

Before we had two static DTMs; one of a vertical wall and one of a horizontal wall, both about 12 in length. Like I said this was a sloppy way of doing it.

So, what I've done is created two new functions to aid the 'ForceMapNorth' function. The first of which will find the longest wall on your minimap, no matter what angle you're at. It search both horizontal and vertical. The second function generates an absolute DTM of a straight-line wall. You feed this function what wall type you want (1 for vertical, 2 for horizontal) and the length of the wall and it will generate a perfect wall DTM for you. Later these two function work together to auto-generate a perfect DTM of the longest wall (both vertical and horizontal) on your MM and these two DTMs are fed into the ForceMapNorth function. Now, in this new version of the function I chose to generate DTMs of only 70% of the longest wall but of course this could be changed back to 100% of the longest wall, if one chooses.

Also, in this new version of ForceMapNorth there's a more accurate way of rotating the map and it will not rotate as far as before. Also if the DTM is not found in the first direction it rotates it should try again in the opposite direction, starting from North. If the DTM is not found in either direction it will revert your compass back to the default North position.


{************************************************* ******************************
Function GenerateWallDTM(WallType, WallLength: Integer): Integer;
By: Flight
Description: Creates a DTM of a perfectly straight wall.
-WallType : 1 for vertical, 2 for horizontal
-WallLength: Length of the DTM to be generated
************************************************** *****************************}
function GenerateWallDTM(WallType, WallLength: Integer): Integer;
var
i: Integer;
TempTDTM: TDTM;
mPnt: TDTMPointDef;
sPnts: array of TDTMPointDef;
begin
SetArrayLength(sPnts, (WallLength-1));
mPnt.x := 0;
mPnt.y := 0;
mPnt.AreaSize := 0;
mPnt.AreaShape := 0;
mPnt.Color := 16119287;
mPnt.Tolerance := 40;

for i:=0 to High(sPnts) do
begin
case WallType of
1:
begin
sPnts[i].x := 0;
sPnts[i].y := i+1;
end;
2:
begin
sPnts[i].x := i+1;
sPnts[i].y := 0;
end;
end;
sPnts[i].AreaSize := 0;
sPnts[i].AreaShape := 0;
sPnts[i].Color := 16119287;
sPnts[i].Tolerance := 40;
end;

TempTDTM.MainPoint := mPnt;
TempTDTM.SubPoints := sPnts;
Result := AddDTM(TempTDTM);
end;

{************************************************* ******************************
Function GetLongestWallLength: Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle. This
number is based off both vertical and horizontal walls.
************************************************** *****************************}
function GetLongestWallLength: Integer;
var
B: TBox;
L1,L2: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

{Find all vertical walls and sort by size}
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

SplitTPAExWrap(TPA, 2, 5, ATPA);
SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
L1 := (B.Y2-B.Y1);

{Rinse}
TPA := [];
ATPA := [];
B := IntToBox(0, 0, 0, 0);

{Find all horizontal walls and sort by size}
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

SplitTPAExWrap(TPA, 5, 2, ATPA);
SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
L1 := (B.X2-B.X1);

if (L1 > L2) then
Result := L1
else
Result := L2;
end;

{************************************************* ******************************
Function ForceMapNorth: Boolean;
By: Flight
Description: Using auto-generated wall DTMs, this function will attempt to
rotate the compass to near-perfect north. Should it fail it will revert
back to default north.
************************************************** *****************************}
Function ForceMapNorth: Boolean;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,L: Integer;
label
Start,FuncEnd;
begin
Result := False;
L := GetLongestWallLength;
if (L > 50) then
L := 50;

DTM_VertWall := GenerateWallDTM(1, Round(L*0.7)); //Create a DTM 70% of the length of the longest vertical wall
DTM_HorWall := GenerateWallDTM(2, Round(L*0.7)); //Create a DTM 70% of the length of the longest horizontal wall

if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
begin
Result := True;
GoTo FuncEnd;
end;

StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);

Start:
if (F > 0) then
MakeCompass('N');

KeyDown((Ord(not Left) * 2) + 37);
MarkTime(T);
Repeat
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Until(TimeFromMark(T) >= 1000)

if Left then
KeyUp(VK_Left)
else
KeyUp(VK_Right);

FuncEnd:
if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F < 2) then
GoTo Start;
end else if ((X > 1) and (Y > 1)) then
Result := True;

if not Result then
MakeCompass('N');
FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;


This is genius :surprised:

If possible, can you post an example walking procedure with these functions?

westkevin12
05-06-2013, 04:30 AM
Ok, so through further progressing I advanced the function to use a much more practical method. I hope you'll like what I did here as I'm quite pleased with the ingenuity. :smarty:

Before we had two static DTMs; one of a vertical wall and one of a horizontal wall, both about 12 in length. Like I said this was a sloppy way of doing it.

So, what I've done is created two new functions to aid the 'ForceMapNorth' function. The first of which will find the longest wall on your minimap, no matter what angle you're at. It search both horizontal and vertical. The second function generates an absolute DTM of a straight-line wall. You feed this function what wall type you want (1 for vertical, 2 for horizontal) and the length of the wall and it will generate a perfect wall DTM for you. Later these two function work together to auto-generate a perfect DTM of the longest wall (both vertical and horizontal) on your MM and these two DTMs are fed into the ForceMapNorth function. Now, in this new version of the function I chose to generate DTMs of only 70% of the longest wall but of course this could be changed back to 100% of the longest wall, if one chooses.

Also, in this new version of ForceMapNorth there's a more accurate way of rotating the map and it will not rotate as far as before. Also if the DTM is not found in the first direction it rotates it should try again in the opposite direction, starting from North. If the DTM is not found in either direction it will revert your compass back to the default North position.


{************************************************* ******************************
Function GenerateWallDTM(WallType, WallLength: Integer): Integer;
By: Flight
Description: Creates a DTM of a perfectly straight wall.
-WallType : 1 for vertical, 2 for horizontal
-WallLength: Length of the DTM to be generated
************************************************** *****************************}
function GenerateWallDTM(WallType, WallLength: Integer): Integer;
var
i: Integer;
TempTDTM: TDTM;
mPnt: TDTMPointDef;
sPnts: array of TDTMPointDef;
begin
SetArrayLength(sPnts, (WallLength-1));
mPnt.x := 0;
mPnt.y := 0;
mPnt.AreaSize := 0;
mPnt.AreaShape := 0;
mPnt.Color := 16119287;
mPnt.Tolerance := 40;

for i:=0 to High(sPnts) do
begin
case WallType of
1:
begin
sPnts[i].x := 0;
sPnts[i].y := i+1;
end;
2:
begin
sPnts[i].x := i+1;
sPnts[i].y := 0;
end;
end;
sPnts[i].AreaSize := 0;
sPnts[i].AreaShape := 0;
sPnts[i].Color := 16119287;
sPnts[i].Tolerance := 40;
end;

TempTDTM.MainPoint := mPnt;
TempTDTM.SubPoints := sPnts;
Result := AddDTM(TempTDTM);
end;

{************************************************* ******************************
Function GetLongestWallLength: Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle. This
number is based off both vertical and horizontal walls.
************************************************** *****************************}
function GetLongestWallLength: Integer;
var
B: TBox;
L1,L2: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

{Find all vertical walls and sort by size}
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

SplitTPAExWrap(TPA, 2, 5, ATPA);
SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
L1 := (B.Y2-B.Y1);

{Rinse}
TPA := [];
ATPA := [];
B := IntToBox(0, 0, 0, 0);

{Find all horizontal walls and sort by size}
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

SplitTPAExWrap(TPA, 5, 2, ATPA);
SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
L1 := (B.X2-B.X1);

if (L1 > L2) then
Result := L1
else
Result := L2;
end;

{************************************************* ******************************
Function ForceMapNorth: Boolean;
By: Flight
Description: Using auto-generated wall DTMs, this function will attempt to
rotate the compass to near-perfect north. Should it fail it will revert
back to default north.
************************************************** *****************************}
Function ForceMapNorth: Boolean;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,L: Integer;
label
Start,FuncEnd;
begin
Result := False;
L := GetLongestWallLength;
if (L > 50) then
L := 50;

DTM_VertWall := GenerateWallDTM(1, Round(L*0.7)); //Create a DTM 70% of the length of the longest vertical wall
DTM_HorWall := GenerateWallDTM(2, Round(L*0.7)); //Create a DTM 70% of the length of the longest horizontal wall

if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
begin
Result := True;
GoTo FuncEnd;
end;

StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);

Start:
if (F > 0) then
MakeCompass('N');

KeyDown((Ord(not Left) * 2) + 37);
MarkTime(T);
Repeat
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Until(TimeFromMark(T) >= 1000)

if Left then
KeyUp(VK_Left)
else
KeyUp(VK_Right);

FuncEnd:
if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F < 2) then
GoTo Start;
end else if ((X > 1) and (Y > 1)) then
Result := True;

if not Result then
MakeCompass('N');
FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;


awesome!! can i test this in my script?

Flight
05-06-2013, 04:34 AM
This is genius :surprised:

If possible, can you post an example walking procedure with these functions?

Yeah here's an example script that should walk you from the AlKharid bank to the fire altar, then back to the bank. Unfortunately my current SMART client has radical MM colors and SPS cannot determine my location so I couldn't test this.


{$DEFINE SMART8}
{$i SRL-OSR/SRL.Simba}
{$i SPS/SPS-OSR.simba}


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
LampSkill := Skill_Herblore;
WorldInfo := [];
Member := True;
Active := True;
end;
end;

Function InvertPath(Points: TPointArray): TPointArray;
Var
i, j: integer;
begin
SetLength(Result, Length(Points));
j := 0;
for i := High(Points) downto 0 do
begin
Result[j] := Points[i];
Inc(j);
end;
end;

Function IsMoving_F: Boolean;
begin
Result := PixelShift(IntToBox(MMCX-30, MMCY-30, MMCX+30, MMCY+30), 200) > 200;
end;

{************************************************* ******************************
Function GenerateWallDTM(WallType, WallLength: Integer): Integer;
By: Flight
Description: Creates a DTM of a perfectly straight wall.
-WallType : 1 for vertical, 2 for horizontal
-WallLength: Length of the DTM to be generated
************************************************** *****************************}
function GenerateWallDTM(WallType, WallLength: Integer): Integer;
var
i: Integer;
TempTDTM: TDTM;
mPnt: TDTMPointDef;
sPnts: array of TDTMPointDef;
begin
SetArrayLength(sPnts, (WallLength-1));
mPnt.x := 0;
mPnt.y := 0;
mPnt.AreaSize := 0;
mPnt.AreaShape := 0;
mPnt.Color := 16119287;
mPnt.Tolerance := 40;

for i:=0 to High(sPnts) do
begin
case WallType of
1:
begin
sPnts[i].x := 0;
sPnts[i].y := i+1;
end;
2:
begin
sPnts[i].x := i+1;
sPnts[i].y := 0;
end;
end;
sPnts[i].AreaSize := 0;
sPnts[i].AreaShape := 0;
sPnts[i].Color := 16119287;
sPnts[i].Tolerance := 40;
end;

TempTDTM.MainPoint := mPnt;
TempTDTM.SubPoints := sPnts;
Result := AddDTM(TempTDTM);
end;

{************************************************* ******************************
Function GetLongestWallLength(WallType: Integer): Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle.
-WallType: 1 for vertical walls, 2 for horizontal walls
************************************************** *****************************}
function GetLongestWallLength(WallType: Integer): Integer;
var
B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

if (WallType = 1) then
SplitTPAExWrap(TPA, 2, 5, ATPA)
else
SplitTPAExWrap(TPA, 5, 2, ATPA);

SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
if (WallType = 1) then
Result := (B.Y2-B.Y1)
else
Result := (B.X2-B.X1);
end;

{************************************************* ******************************
Function ForceMapNorth: Boolean;
By: Flight
Description: Using auto-generated wall DTMs, this function will attempt to
rotate the compass to near-perfect north. Should it fail it will revert
back to default north.
************************************************** *****************************}
Function ForceMapNorth: Boolean;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,L1,L2: Integer;
label
Start,FuncEnd;
begin
Result := False;
L1 := GetLongestWallLength(1);
L2 := GetLongestWallLength(2);
if (L1 > 50) then
L1 := 50;
if (L2 > 50) then
L2 := 50;

DTM_VertWall := GenerateWallDTM(1, Round(L1*0.85)); //Create a DTM 85% of the length of the longest vertical wall
DTM_HorWall := GenerateWallDTM(2, Round(L2*0.85)); //Create a DTM 85% of the length of the longest horizontal wall

if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
begin
Result := True;
GoTo FuncEnd;
end;

StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);

Start:
if (F > 0) then
MakeCompass('N');

MarkTime(T);
Repeat
TypeByte((Ord(not Left) * 2) + 37); //No holding down, actually press the arrow key
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Until(TimeFromMark(T) >= 1000)

FuncEnd:
if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F < 2) then
GoTo Start;
end else if ((X > 1) and (Y > 1)) then
Result := True;

if not Result then
MakeCompass('N');
FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;

function WalkPath_F(Path: TPointArray): boolean;
var
I, H, T, D, Fails: integer;
P, MM, MMF: TPoint;
begin
ColorToleranceSpeed(1);
H := High(Path);
T := GetSystemTime + 11000 + Random(2000);
Fails := 0;

ForceMapNorth;
RunEnergy(70);
while (not Result) and (GetSystemTime < T) and (Fails < 5) do
begin
FindNormalRandoms;
if (not LoggedIn()) then
Exit;

P := SPS_GetMyPos();

for I := H downto 0 do
begin
MM := RotatePoint(Point(MMCX + Path[I].X - P.X, MMCY + Path[I].Y - P.Y), 0-(Radians((Round(rs_GetCompassAngleDegrees + DF) mod 360))), MMCX, MMCY);

if MM = MMF then
Inc(Fails);

D := Distance(MM.X, MM.Y, MMCX, MMCY);

if (D < 10) then
break
else
if (D < 70) then
begin
Mouse(MM.X, MM.Y, 0, 0, mouse_left);
WaitFunc(@IsMoving_F, 10, 2500);
MMF := MM;
FFlag(30);

T := getSystemTime + 11000 + Random(2000);
Break;
end;
end;
if (I = H) then
While IsMoving_F do
Wait(1);
Result := (I = H);
end;
end;

Var
Path_BankToAltar: TPointArray;

begin
DeclarePlayers;
SetupSRL;
SRL_CombatRandoms := False;

SPS_Setup(runescape_surface, ['alkharidpath']);
//SPS_AnyAngle := True; //No need

Path_BankToAltar := [Point(75,414), Point(93,408), Point(111,378), Point(120,348),
Point(126,312), Point(130,264), Point(159,228), Point(183,195),
Point(201,162), Point(208,126), Point(225,93), Point(240,72)];

WalkPath_F(Path_BankToAltar);
WalkPath_F(InvertPath(Path_BankToAltar));
end.


And here's the SPS image (you'll need to stick this in with the other 07 SPS maps):

http://i.imgur.com/VP65d62.png

Oh and by the way, I made a slight modification to both 'GetLongestWallLength' as well as ForceMapNorth. Now, we grab the longest wall lengths separately for each wall type rather than the longest wall is made into both a vertical and horizontal wall, instead now the two DTMs will be relevant to their own length. Also in the ForceMapNorth function it no long holds down the arrow key but instead presses it. This is less human-like, yes, but it should give us more accuracy in finding the wall DTMs. I've updated the post above with these two modified functions.

Sjoe
05-08-2013, 01:24 AM
Yeah here's an example script that should walk you from the AlKharid bank to the fire altar, then back to the bank. Unfortunately my current SMART client has radical MM colors and SPS cannot determine my location so I couldn't test this.


ForceMapNorth; is still a bit buggy for me :( it rotates the map a lot of times.

RoflRawr
05-09-2013, 07:22 AM
How do I download the SPS Simba file as a ZIP so I can put it in the folder.......?

Spiker
05-11-2013, 02:35 PM
Yeah here's an example script that should walk you from the AlKharid bank to the fire altar, then back to the bank. Unfortunately my current SMART client has radical MM colors and SPS cannot determine my location so I couldn't test this.


{$DEFINE SMART8}
{$i SRL-OSR/SRL.Simba}
{$i SPS/SPS-OSR.simba}


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
LampSkill := Skill_Herblore;
WorldInfo := [];
Member := True;
Active := True;
end;
end;

Function InvertPath(Points: TPointArray): TPointArray;
Var
i, j: integer;
begin
SetLength(Result, Length(Points));
j := 0;
for i := High(Points) downto 0 do
begin
Result[j] := Points[i];
Inc(j);
end;
end;

Function IsMoving_F: Boolean;
begin
Result := PixelShift(IntToBox(MMCX-30, MMCY-30, MMCX+30, MMCY+30), 200) > 200;
end;

{************************************************* ******************************
Function GenerateWallDTM(WallType, WallLength: Integer): Integer;
By: Flight
Description: Creates a DTM of a perfectly straight wall.
-WallType : 1 for vertical, 2 for horizontal
-WallLength: Length of the DTM to be generated
************************************************** *****************************}
function GenerateWallDTM(WallType, WallLength: Integer): Integer;
var
i: Integer;
TempTDTM: TDTM;
mPnt: TDTMPointDef;
sPnts: array of TDTMPointDef;
begin
SetArrayLength(sPnts, (WallLength-1));
mPnt.x := 0;
mPnt.y := 0;
mPnt.AreaSize := 0;
mPnt.AreaShape := 0;
mPnt.Color := 16119287;
mPnt.Tolerance := 40;

for i:=0 to High(sPnts) do
begin
case WallType of
1:
begin
sPnts[i].x := 0;
sPnts[i].y := i+1;
end;
2:
begin
sPnts[i].x := i+1;
sPnts[i].y := 0;
end;
end;
sPnts[i].AreaSize := 0;
sPnts[i].AreaShape := 0;
sPnts[i].Color := 16119287;
sPnts[i].Tolerance := 40;
end;

TempTDTM.MainPoint := mPnt;
TempTDTM.SubPoints := sPnts;
Result := AddDTM(TempTDTM);
end;

{************************************************* ******************************
Function GetLongestWallLength(WallType: Integer): Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle.
-WallType: 1 for vertical walls, 2 for horizontal walls
************************************************** *****************************}
function GetLongestWallLength(WallType: Integer): Integer;
var
B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

if (WallType = 1) then
SplitTPAExWrap(TPA, 2, 5, ATPA)
else
SplitTPAExWrap(TPA, 5, 2, ATPA);

SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
if (WallType = 1) then
Result := (B.Y2-B.Y1)
else
Result := (B.X2-B.X1);
end;

{************************************************* ******************************
Function ForceMapNorth: Boolean;
By: Flight
Description: Using auto-generated wall DTMs, this function will attempt to
rotate the compass to near-perfect north. Should it fail it will revert
back to default north.
************************************************** *****************************}
Function ForceMapNorth: Boolean;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,L1,L2: Integer;
label
Start,FuncEnd;
begin
Result := False;
L1 := GetLongestWallLength(1);
L2 := GetLongestWallLength(2);
if (L1 > 50) then
L1 := 50;
if (L2 > 50) then
L2 := 50;

DTM_VertWall := GenerateWallDTM(1, Round(L1*0.85)); //Create a DTM 85% of the length of the longest vertical wall
DTM_HorWall := GenerateWallDTM(2, Round(L2*0.85)); //Create a DTM 85% of the length of the longest horizontal wall

if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
begin
Result := True;
GoTo FuncEnd;
end;

StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);

Start:
if (F > 0) then
MakeCompass('N');

MarkTime(T);
Repeat
TypeByte((Ord(not Left) * 2) + 37); //No holding down, actually press the arrow key
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Until(TimeFromMark(T) >= 1000)

FuncEnd:
if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F < 2) then
GoTo Start;
end else if ((X > 1) and (Y > 1)) then
Result := True;

if not Result then
MakeCompass('N');
FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;

function WalkPath_F(Path: TPointArray): boolean;
var
I, H, T, D, Fails: integer;
P, MM, MMF: TPoint;
begin
ColorToleranceSpeed(1);
H := High(Path);
T := GetSystemTime + 11000 + Random(2000);
Fails := 0;

ForceMapNorth;
RunEnergy(70);
while (not Result) and (GetSystemTime < T) and (Fails < 5) do
begin
FindNormalRandoms;
if (not LoggedIn()) then
Exit;

P := SPS_GetMyPos();

for I := H downto 0 do
begin
MM := RotatePoint(Point(MMCX + Path[I].X - P.X, MMCY + Path[I].Y - P.Y), 0-(Radians((Round(rs_GetCompassAngleDegrees + DF) mod 360))), MMCX, MMCY);

if MM = MMF then
Inc(Fails);

D := Distance(MM.X, MM.Y, MMCX, MMCY);

if (D < 10) then
break
else
if (D < 70) then
begin
Mouse(MM.X, MM.Y, 0, 0, mouse_left);
WaitFunc(@IsMoving_F, 10, 2500);
MMF := MM;
FFlag(30);

T := getSystemTime + 11000 + Random(2000);
Break;
end;
end;
if (I = H) then
While IsMoving_F do
Wait(1);
Result := (I = H);
end;
end;

Var
Path_BankToAltar: TPointArray;

begin
DeclarePlayers;
SetupSRL;
SRL_CombatRandoms := False;

SPS_Setup(runescape_surface, ['alkharidpath']);
//SPS_AnyAngle := True; //No need

Path_BankToAltar := [Point(75,414), Point(93,408), Point(111,378), Point(120,348),
Point(126,312), Point(130,264), Point(159,228), Point(183,195),
Point(201,162), Point(208,126), Point(225,93), Point(240,72)];

WalkPath_F(Path_BankToAltar);
WalkPath_F(InvertPath(Path_BankToAltar));
end.


And here's the SPS image (you'll need to stick this in with the other 07 SPS maps):

http://i.imgur.com/VP65d62.png

Oh and by the way, I made a slight modification to both 'GetLongestWallLength' as well as ForceMapNorth. Now, we grab the longest wall lengths separately for each wall type rather than the longest wall is made into both a vertical and horizontal wall, instead now the two DTMs will be relevant to their own length. Also in the ForceMapNorth function it no long holds down the arrow key but instead presses it. This is less human-like, yes, but it should give us more accuracy in finding the wall DTMs. I've updated the post above with these two modified functions.

I can't seem to get it to work over in Port Phasmatys around the bank. :(

Hoodz
05-11-2013, 05:28 PM
i always get: SPS returns -1, -1

any tips?

Flight
05-12-2013, 12:21 PM
ForceMapNorth; is still a bit buggy for me :( it rotates the map a lot of times.


I can't seem to get it to work over in Port Phasmatys around the bank. :(

Ok you guys, replace your 'GetLongestWallLength' with this one:


{************************************************* ******************************
Function GetLongestWallLength(WallType: Integer): Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle.
-WallType: 1 for vertical walls, 2 for horizontal walls
************************************************** *****************************}
function GetLongestWallLength(WallType: Integer): Integer;
var
B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

RAaSTPA(TPA, 1);
if (WallType = 1) then
SplitTPAExWrap(TPA, 2, 3, ATPA)
else
SplitTPAExWrap(TPA, 3, 2, ATPA);

SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
if (WallType = 1) then
Result := (B.Y2-B.Y1)
else
Result := (B.X2-B.X1);
end;



i always get: SPS returns -1, -1

any tips?

Yeah, you're better off making custom SPS maps. The '07 maps that come with that unofficial OSR-SPS are really low quality compared to the real RS minimap. If you're really determined to use SPS then I'd suggest you take a look at this RSPS map-editor. (http://www.rune-server.org/runescape-development/rs2-client/tools/327467-map-editor-3-prerelease.html) It's a cache version of the RS map from sometime in 2006 so it contains most of the current 07 map. You'll have to load areas region by region and take snapshots of the minimap printed then peice them together but it's faster than using the minimap in OSR and it's very high quality compared to the SPS maps.

Hoodz
05-12-2013, 12:38 PM
Ok you guys, replace your 'GetLongestWallLength' with this one:


{************************************************* ******************************
Function GetLongestWallLength(WallType: Integer): Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle.
-WallType: 1 for vertical walls, 2 for horizontal walls
************************************************** *****************************}
function GetLongestWallLength(WallType: Integer): Integer;
var
B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;

RAaSTPA(TPA, 1);
if (WallType = 1) then
SplitTPAExWrap(TPA, 2, 3, ATPA)
else
SplitTPAExWrap(TPA, 3, 2, ATPA);

SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
if (WallType = 1) then
Result := (B.Y2-B.Y1)
else
Result := (B.X2-B.X1);
end;




Yeah, you're better off making custom SPS maps. The '07 maps that come with that unofficial OSR-SPS are really low quality compared to the real RS minimap. If you're really determined to use SPS then I'd suggest you take a look at this RSPS map-editor. (http://www.rune-server.org/runescape-development/rs2-client/tools/327467-map-editor-3-prerelease.html) It's a cache version of the RS map from sometime in 2006 so it contains most of the current 07 map. You'll have to load areas region by region and take snapshots of the minimap printed then peice them together but it's faster than using the minimap in OSR and it's very high quality compared to the SPS maps.
Thanks im going to try that! Are there also other ways to walk? ddtm walking dont seem to work because its a green/brown colour only area.

Flight
05-12-2013, 01:40 PM
Thanks im going to try that! Are there also other ways to walk? ddtm walking dont seem to work because its a green/brown colour only area.

In OSR it's very difficult to walk, mainly due to the violent color changes after every region change. But actually there's 3 weapons used against color bots for the minimap alone. First is the angle will change degrees at random times, whether your map region changes or not. The second is, as I stated before, the extreme changes in MM colors. And the last anti-bot measure for the MM is the zoom; you'll notice that the MM will actually zoom in/out a small amount at random times as well.

Between these 3 it's an absolute pain to make a minimap-walker both accurate and stable. There's a few ways to walk in OSR but none really classify as both accurate and stable. You can use (D)DTMs, RadialWalking (this in combination with AutoColoring I heard works well), ObjectDTMs (made for the current RS but you can modify them to work for OSR; still not 100% stable though) and SPS (highly suggest using custom maps). It's frustrating I know; I couldn't get my Naturez script to run for more than 30 minutes before SPS start walking to odd places, and that's using 2 separate high-quality area maps.

It's a reason why I've been spending time trying to understand reflection & getting it to work in SMART.

Hoodz
05-12-2013, 02:22 PM
In OSR it's very difficult to walk, mainly due to the violent color changes after every region change. But actually there's 3 weapons used against color bots for the minimap alone. First is the angle will change degrees at random times, whether your map region changes or not. The second is, as I stated before, the extreme changes in MM colors. And the last anti-bot measure for the MM is the zoom; you'll notice that the MM will actually zoom in/out a small amount at random times as well.

Between these 3 it's an absolute pain to make a minimap-walker both accurate and stable. There's a few ways to walk in OSR but none really classify as both accurate and stable. You can use (D)DTMs, RadialWalking (this in combination with AutoColoring I heard works well), ObjectDTMs (made for the current RS but you can modify them to work for OSR; still not 100% stable though) and SPS (highly suggest using custom maps). It's frustrating I know; I couldn't get my Naturez script to run for more than 30 minutes before SPS start walking to odd places, and that's using 2 separate high-quality area maps.

It's a reason why I've been spending time trying to understand reflection & getting it to work in SMART.

Mmmh i see.. But if you get reflection to work in smart that would be amazing! It doesnt need all the features like other bots but only walking and maybe random events.

Thanks for the fast responses and good luck on figuring out how reflection works and how to get it working with the smart client!

lordfred23
05-20-2013, 12:12 PM
i have problem i dont got the binaryl file to get it work where i can find thing like that keep getting Exception in Script: Plugin(sps32) has not been found my simba + srl osr working fine but where to find binary to make sps osr work!

BigRedJapan
05-25-2013, 09:12 PM
SPS Still does not work as it supposed to! It runs and clicks non Stop even though it hasn't reached the coords!

rj
05-26-2013, 05:35 PM
SPS Still does not work as it supposed to! It runs and clicks non Stop even though it hasn't reached the coords!

That probably means it didn't find the flag

BigRedJapan
05-27-2013, 10:11 PM
Oh it found the flag it just kept clicking none stop until all the cords are done! It doesnt wait until it reaches the flag is what im trying to say!

SeanStar
05-28-2013, 09:21 PM
I haven't been active here for a couple months, if anyone would like to add this to a new github page to continue development, I'll update the OP.

Also, Flight, I was actually thinking about making a procedure that attempted to do perfect north based on walls. Depending on how it is used, would definitely increase stability.

BigRedJapan
05-29-2013, 06:47 PM
Would Love to see what you have come up with Star!! and not only make attempt to do a perfect north based wall but make sure it waits long enough until it reaches the FFlag before it clicks the other point!

@Flight, It would work so much better if the FFlag(30), would work! It doesnt wait long enough and causes the script to click random points no matter where its at!

slaskmakke
06-19-2013, 11:52 AM
Exception in Script: Unable to find file 'SPS/sps-osr.simba' used from 'C:\Simba\Scripts\ineedbot's AIO Chopper[2.1].simba'


I keep getting this error but the SPS file is where the script file is. I've installed everything correctly and I still can't make it work.

Athylus
08-14-2013, 07:04 PM
procedure WalkToField;
begin
ToPotatoes := [Point(207, 493), Point(236, 489), Point(242, 472), Point(242, 446),
Point(241, 422), Point(243, 398), Point(249, 377), Point(255, 354),
Point(257, 344), Point(262, 326), Point(268, 310), Point(284, 310),
Point(310, 303), Point(327, 301), Point(346, 305), Point(369, 306),
Point(387, 307), Point(405, 315)];
SPS_WalkPath(ToPotatoes);
end;

begin
DeclarePlayers;
SetupSRL;
ActivateClient;
Wait(2000);
if (not LoggedIn) then LoginPlayer;
MakeCompass(5);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['0_1','0_0','1_0']);
MyLoc:=SPS_GetMyPos;
WalkToField;
end.

Doesn't work. It just stands still. What did I do wrong?

Khp
10-07-2013, 09:32 AM
I was using this and it worked really good for me until about a little while ago. I updated and it asked me if i wanted to override plugins and i have can't get it to work now. If anyone knows how i can revert back, or some other way to fix this please let me know.

Flight
10-07-2013, 09:55 AM
What problems are having exactly?

Khp
10-09-2013, 07:41 PM
What problems are having exactly?

Me?
Well after I updated i had no sps32 plugin, with the new sps32 i get:
[Error] C:\Simba\Includes\SPS\sps-osr.simba(396:55): Invalid number of parameters at line 396
Compiling failed.

stickyninja
10-23-2013, 05:10 PM
This is the error I get when I try and run OldSchool scripts.
Has anyone else had this error? If so how do you fix it?

Exception in Script: Unknown declaration "getTClient" at line 52, column 10 in file "C:\Simba\Includes\SPS\sps-osr.simba"

Nightwing
11-01-2013, 09:42 AM
Same here, Exception in Script: Unknown declaration "getTClient" at line 52, column 10 in file "C:\Simba\Includes\SPS\sps-osr.simba"

Heterodox
11-10-2013, 10:53 AM
Getting the same error.

Olly
11-10-2013, 02:39 PM
Use pascalscript, script > interpreter > pascalscript

kitchenrange
12-11-2013, 04:54 AM
Is this still working properly? It has been a long time for me so maybe I'm missing something, but when running a test script:

program TestSPS;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
var
MyLoc: TPoint;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'name';
Players[0].Pass :='pass';
Players[0].Nick :='nick';
Players[0].Active:=True;
End;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(2000);
MakeCompass(5);
SPS_Setup(runescape_surface, ['5_7']);
SPS_AnyAngle := True;
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
SPS_WalkPath([]);
end.

I'm getting the error of Exception: Access violation at line 609 of sps-osr.simba

This script is being run at fishing guild, I'm pretty sure I put the right areas in the script.

exceedinglife
12-24-2013, 07:41 AM
i get this error when i try to run woodcut bot AIO Chopper

[Error] C:\Simba\Includes\SPS\sps-osr.simba(396:55): Invalid number of parameters at line 396

Codex
12-29-2013, 08:03 PM
i get this error when i try to run woodcut bot AIO Chopper

[Error] C:\Simba\Includes\SPS\sps-osr.simba(396:55): Invalid number of parameters at line 396

Same here

war_god215
01-02-2014, 11:12 PM
Same here

I'm also getting this error, does anybody have an idea of what's going on?

shaezy
01-07-2014, 10:08 AM
Yep I'm getting this error aswell.. :(


i get this error when i try to run woodcut bot AIO Chopper

[Error] C:\Simba\Includes\SPS\sps-osr.simba(396:55): Invalid number of parameters at line 396

lasse48
01-13-2014, 08:25 AM
i am getting one error :(



[Error] C:\runescape\Simbanew\Includes\SPS\sps-osr.simba(396:55): Invalid number of parameters at line 396
Compiling failed.

slacky
01-13-2014, 07:51 PM
A simple quickfix is needed. As the function has changed in to a procedure...
Should work: 22709

lasse48
01-13-2014, 08:16 PM
A simple quickfix is needed. As the function has changed in to a procedure...
Should work: 22709

Thanks now it dont say thant anymore.


now i am getting:


[Hint] C:\runescape\Simbanew\Includes\SPS\sps-osr.simba(483:3): Variable 'Z' never used at line 482
[Hint] C:\runescape\Simbanew\Includes\SPS\sps-osr.simba(485:3): Variable 'DEGREEFIX' never used at line 484
[Hint] C:\runescape\Simbanew\Includes\SPS\sps-osr.simba(486:3): Variable 'FINDPOINT' never used at line 485
Compiled successfully in 562 ms.

it says its successfully, but the 3 lines say it was never used. Does that matter?

Thanks

slacky
01-13-2014, 09:01 PM
Thanks now it dont say thant anymore.
now i am getting:
...

Should not matter.

lasse48
01-19-2014, 06:33 PM
sps is max bug out.. 1/100 it will go to the right loc.

iwantgpz
04-13-2014, 10:33 AM
[Error] C:\Simba\Includes\SPS\sps-osr.simba(396:55): Invalid number of parameters at line 396
Compiling failed.

mariothecashcow
09-28-2014, 05:05 PM
A simple quickfix is needed. As the function has changed in to a procedure...
Should work: 22709

this has been the solution for me thanks!
to try and be of some help, just replace the SPS-ORS.simba file which is already in your includes/SPS folder with the one slacky has put for download, all i ahve to do now is get to grips with how SPS works, if I come across problems il be sure to post up so we can find answers. thanks slack :D

Blunt Sage
11-15-2014, 12:47 PM
where do i get this Simba folder to put all the .zips into?