PDA

View Full Version : SPS for OldSchool RS(RS 07)



CynicRus
03-01-2013, 07:52 AM
Hey I prepared a SPS version for P07Include. It works with Custom SPS maps, the truth is not quite stable. But still works.

How to use:

1) Place p07sps.simba to your_simba_directory/SPS/

2)


{$I SRL/SRL.Simba}
{$I SRL/P07Include.Simba}
{$I SPS/p07sps.simba}


Enjoy.

How to use SPS see in to official SPS thread.

Cheers, Cynic.

Ashur2Good
03-01-2013, 08:02 AM
Thanks for this. I'll try it out now.

Itankbots
03-01-2013, 09:58 AM
Interesting, ill defiantly bookmark this incase i decide to make any 07 scape scripts. Cheers

Sjoe
03-01-2013, 10:07 AM
This is gonna help a lot of people nice job!

rj
03-01-2013, 11:42 AM
Nice.

Olly
03-01-2013, 04:56 PM
Good luck, overtime you will lose accuracy and such :(

Silentcore
03-01-2013, 04:59 PM
Thank you for your work..

J J
03-01-2013, 05:04 PM
Good luck, overtime you will lose accuracy and such :(
Indeed, stupid Jagex messing with angles and colors :S

Olly
03-01-2013, 05:08 PM
Indeed, stupid Jagex messing with angles and colors :S

Eh its not too much the colors, more of the fact you look round and your compass says north but the compass minimap angle is like at a 20 degree angle haha.

kiwiownage
03-01-2013, 11:02 PM
:spot::spot::spot::spot::spot::spot::spot::spot:

Thank you sir!

BoxxyBabee
03-01-2013, 11:47 PM
Looks very good. Currently making my own Map for 2007 slowly with paint. Are there any pre-existing 2007 surface maps(such as with an official 2007 include) or is it going to be everyone makes their own?

Le_don
03-01-2013, 11:55 PM
Looks very good. Currently making my own Map for 2007 slowly with paint. Are there any pre-existing 2007 surface maps(such as with an official 2007 include) or is it going to be everyone makes their own?

There's a tutorial somewhere on how to make an sps map.. what your doing certainly is not the way to do it. You gotta use the minimap and line it up in photoshop.

BoxxyBabee
03-02-2013, 12:02 AM
I am using about 20 png frames and using paint to put them together as I do not own photoshop yet

Sjoe
03-02-2013, 05:53 AM
I am using about 20 png frames and using paint to put them together as I do not own photoshop yet

use Gimp

DaWu
03-02-2013, 02:17 PM
Something I noticed that points it returns in game arent the same (no idea why) as the ones you would get in pathmaker or MS paint, whatever you guys use to get your points. Instead you guys should make your paths by looping something along the lines:


MyLoc:=sps_getMyPos;
writeln('sps returns '+inttostr(myloc.x)+','+inttostr(myloc.y));

Points returned this way are pretty much constant.

also heres a modified SPS_walkpath more suitable for 07 ( made max distance 70, min distance 5, added ismoving which works in 07 just fine )



// Edited For P07Include by Cynic // more edits for better usability in 07 by Dwu
// Author: marpis & Coh3n
// Walks the path "Path"; always walks to the furthest point possible
function SPS_WalkPath(Path: TPointArray): boolean;
var
I, H, T, D, Fails: integer;
P, MM, MMF: TPoint;
begin
if (not SPS_IsSetup) then
begin
writeln('SPS ERROR: SPS_Setup was never called');
exit;
end;

P07_MakeCompassNorth;

H := High(Path);
T := GetSystemTime + 20000 + Random(5000);
Fails := 0;

while (not Result) and (GetSystemTime < T) and (Fails < 5) do
begin
if (not P07_LoggedIn) then
Exit;

P := SPS_GetMyPos();

for I := H downto 0 do
begin
MM := RotatePoint(Point(P07_MMCX + Path[I].X - P.X, P07_MMCY + Path[I].Y - P.Y),0, P07_MMCX, P07_MMCY);

if MM = MMF then
Inc(Fails);

D := Distance(MM.X, MM.Y, P07_MMCX, P07_MMCY);

if (D < 5) then
break
else
if (D < 70) then
begin
P07_MouseBox(MM.X-2, MM.Y-2, MM.X+2, MM.Y+2, mouse_left);
while(ismoving) do begin
wait(10+random(100));
end;
MMF := MM;
P07_FindMMFlag;

T := getSystemTime + 20000 + Random(1000);
Break;
end;
end;

Result := (I = H);
end;
end;

Ricky
03-02-2013, 08:09 PM
If I would make a custom map and flip it, would it work with the compass on east?

Le_don
03-02-2013, 08:50 PM
lmfao..
>spend 20 minutes making first map
>compass is like, random degrees east

Zorgatone
03-02-2013, 08:59 PM
Does it support SPS_AnyAngle?





lmfao..
>spend 20 minutes making first map
>compass is like, random degrees east

you need to adjust the map manually every time you are making a screenshot

Olly
03-02-2013, 09:46 PM
no sps_anyangle will not work.

Zorgatone
03-02-2013, 10:14 PM
no sps_anyangle will not work.

For me it is not working anything..


Error: Exception: The bitmap[0] does not exist at line 664
The following DTMs were not freed: [0, 1, 2, 3]

It gives this error when calling SPS_WalkPath

Xeronate
03-03-2013, 04:27 AM
There's a tutorial somewhere on how to make an sps map.. what your doing certainly is not the way to do it. You gotta use the minimap and line it up in photoshop.

For anyone interested, I think this is the tutorial being talked about.

http://villavu.com/forum/showthread.php?t=84360

Zorgatone
03-03-2013, 12:22 PM
For me it is not working anything..


Error: Exception: The bitmap[0] does not exist at line 664
The following DTMs were not freed: [0, 1, 2, 3]

It gives this error when calling SPS_WalkPath

Solved the error... My script still returns negative coordinates in Al Kharid with my custom map.

greg_nc
03-03-2013, 02:21 PM
Hi there,

I am having a problem whereby my game screen freezes after about 1-2 seconds until i stop the script allowing it to un freeze.

Any advice?

Thanks greg


Im using a mildly edited version of the tutorial script


Program TestPath;
//{$DEFINE SMART} //< Edit this out if using Rs Client
{$I SRL/SRL.Simba}
{$i P07Include.simba}
{$I SPS/p07sps.simba}

var //{path name}
//{delcare the sps variable}
togarden: tpointarray;

status: string;

procedure paths;
begin
togarden := [Point(41, 143), Point(46, 141), Point(53, 136), Point(62, 135), Point(69, 135), Point(73, 135), Point(82, 131), Point(87, 131), Point(94, 131), Point(99, 131), Point(107, 136), Point(116, 136), Point(124, 136), Point(132, 136), Point(136, 135), Point(143, 132), Point(150, 132), Point(155, 132), Point(160, 132), Point(167, 130)]
end;
procedure testpath;
begin
if sps_walkpath(togarden) then
status := 'walking to the garden'
else begin
status :='failed walking to the garden';
writeln(status + ' + time running:' +timerunning);
end;
writeln(status + ' + time running:' +timerunning);
end;
begin

setupsrl;
SetupP07Include;

//{call path variables here}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_other,['Fally_west_bank']);

P07_MakeCompassNorth;
writeln('lookingnorth')
paths;
writeln('Walking')
//testpath;
//writeln('testing walk')

repeat
until P07_InvFull ;

end.

BRBCarbon
03-03-2013, 03:11 PM
I am having a bit of trouble with this, just wondering if anyone could help me.

I made a custom map, it looks like this:

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

I then made a path using a path generator, this is the path:


BankToFlaxPath := [Point(90, 85), Point(89, 95), Point(90, 103), Point(91, 113), Point(91, 119), Point(91, 130), Point(94, 136), Point(95, 145), Point(98, 155), Point(98, 163), Point(98, 177), Point(100, 188), Point(100, 201), Point(103, 207), Point(103, 212), Point(103, 216), Point(103, 228), Point(107, 237), Point(107, 242), Point(111, 251), Point(111, 258), Point(111, 268), Point(111, 271), Point(112, 281), Point(114, 285), Point(118, 291), Point(127, 295), Point(135, 295), Point(143, 293), Point(150, 288), Point(144, 279)];

My procedure to walk is:


procedure WalkBankToFlax;
Begin
writeln('Walking to flax...');

if (SPS_WalkPath(BankToFlaxPath)) then
writeln('Walking...')
else
writeln('Failed...');
End;

When the procedure is called, I get this in the log:


Walking to flax...
Failed...
Successfully executed.


It takes about 30seconds to a minute for 'Failed...' to come up, after 'Walking to flax...'.

Does anyone know what I am doing wrong?

I have called SPS_Setup correctly, I believe.


SPS_Setup(RUNESCAPE_OTHER, ['seers_flax']);

Thanks!

CynicRus
03-03-2013, 05:25 PM
Show me a SPS_GetMyPos output.

BRBCarbon
03-03-2013, 06:25 PM
Show me a SPS_GetMyPos output.

68, 64 is what I get when I have my character at what I think is the starting spot.

mcbain
03-03-2013, 09:11 PM
Something I noticed that points it returns in game arent the same (no idea why) as the ones you would get in pathmaker or MS paint, whatever you guys use to get your points. Instead you guys should make your paths by looping something along the lines:


MyLoc:=sps_getMyPos;
writeln('sps returns '+inttostr(myloc.x)+','+inttostr(myloc.y));

Points returned this way are pretty much constant.


Yes, doing this makes the walking much more accurate. :D Thanks for posting that.

kiwiownage
03-04-2013, 04:07 AM
program new;

{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}
Var
myPath:TpointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['11_7']);
SetupP07Include;
ActivateClient;

myPath := [Point(141, 58), Point(144, 81), Point(194, 84), Point(228, 90), Point(239, 125), Point(239, 164), Point(242, 203), Point(242, 232), Point(241, 259), Point(249, 306), Point(275, 330), Point(307, 325)];
if SPS_WalkPath(myPath) then
Sps_WalkPath(myPath);
end.

Does nothing and just says "Successfully executed", I can't figure out what I'm doing wrong, I've followed the guide :s

Ashaman88
03-04-2013, 04:19 AM
program new;

{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}
Var
myPath:TpointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['11_7']);
SetupP07Include;
ActivateClient;

myPath := [Point(141, 58), Point(144, 81), Point(194, 84), Point(228, 90), Point(239, 125), Point(239, 164), Point(242, 203), Point(242, 232), Point(241, 259), Point(249, 306), Point(275, 330), Point(307, 325)];
if SPS_WalkPath(myPath) then
Sps_WalkPath(myPath);
end.

Does nothing and just says "Successfully executed", I can't figure out what I'm doing wrong, I've followed the guide :s

I suggest to not use a path creator, instead just have it call sps getmypos every second or so and make it live in game (start script at start of path, get the point, pause script, disable smart, walk a little bit within site of last point, enable smart, press play, get point, repeat until path is done)\

kiwiownage
03-04-2013, 04:23 AM
I suggest to not use a path creator, instead just have it call sps getmypos every second or so and make it live in game (start script at start of path, get the point, pause script, disable smart, walk a little bit within site of last point, enable smart, press play, get point, repeat until path is done)\

Thanks for the reply, Will try :D

kiwiownage
03-04-2013, 04:32 AM
I have the path but now I'm confused as to what to put into the SPS_Setup parameters

edit: if i put in the varrock square png, it just spazzes out and runs all over the place :/

Ashur2Good
03-04-2013, 04:47 AM
I suggest to not use a path creator, instead just have it call sps getmypos every second or so and make it live in game (start script at start of path, get the point, pause script, disable smart, walk a little bit within site of last point, enable smart, press play, get point, repeat until path is done)\

or, better yet, have it on repeat.

kiwiownage
03-04-2013, 04:50 AM
I've got my path down, but when i run, it just walks nowhere near where I set the co-ords...


program new;

{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}
Var
myPath:TpointArray;
MyLoc:Tpoint;



begin
SPS_Setup(RUNESCAPE_SURFACE,['11_7']);
SetupP07Include;
ActivateClient;
myPath := [Point(4556,3044),Point(4552,3020),Point(4804,3052) ,Point(4620,2912)]
SPS_walkPath(myPath);
end.


Any ideas? Am i supposed to be putting the varrock square png in the setup? (11_7)

CynicRus
03-04-2013, 05:37 AM
I've got my path down, but when i run, it just walks nowhere near where I set the co-ords...


program new;

{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}
Var
myPath:TpointArray;
MyLoc:Tpoint;



begin
SPS_Setup(RUNESCAPE_SURFACE,['11_7']);
SetupP07Include;
ActivateClient;
myPath := [Point(4556,3044),Point(4552,3020),Point(4804,3052) ,Point(4620,2912)]
SPS_walkPath(myPath);
end.


Any ideas? Am i supposed to be putting the varrock square png in the setup? (11_7)

You need to create your own custom sps map for using sps with OldSchoolRS. Defalt SPS maps doesn't supported by RS 07.

BRBCarbon
03-05-2013, 06:09 PM
I made a new custom map as I was having trouble with my old one, it looks like this:

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

I made a quick script to output SPS_GetMyPos() every second but it always prints out the same value (72, 60), no matter where I stand.

Some pictures:

http://i.imgur.com/roFw5L0.png
http://i.imgur.com/x96aCmh.png

Anyone know why this is?

rj
03-05-2013, 09:34 PM
I made a new custom map as I was having trouble with my old one, it looks like this:

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

I made a quick script to output SPS_GetMyPos() every second but it always prints out the same value (72, 60), no matter where I stand.

Some pictures:

http://i.imgur.com/roFw5L0.png
http://i.imgur.com/x96aCmh.png

Anyone know why this is?
SPS is debugging your position

ineedbot
03-05-2013, 10:19 PM
SPS is debugging your position

wat? It maybe debugging his pos, but its spitting out the same coords all the time.

I have the same problem, or near, the coords its spitting out varies from large amounts everytime i rerun the script, I think Jagex did a good job of covering up the minimap from color.

blockay
03-06-2013, 03:39 AM
nvm

The Killer
03-06-2013, 08:43 PM
Thanks :), going to implent this into my lobster fisher :)

DannyRS
03-07-2013, 12:05 AM
wat? It maybe debugging his pos, but its spitting out the same coords all the time.

I have the same problem, or near, the coords its spitting out varies from large amounts everytime i rerun the script, I think Jagex did a good job of covering up the minimap from color.

They did a pretty good job, but it's not the colors so much as the compass not matching the actual minimap rotation after a while, that means it's hard to make the map north because north could actually be off by 30 degrees in either direction,

There are alternatives for walking, all the ways color walked back then in 07, their just no where near as user friendly as SPS :/

vizzyy
03-08-2013, 08:54 PM
Hello,

I am having trouble getting this SPS to work. I've followed the previously posted and lurked around several pages of responses as well and have gotten it to "work." But it doesn't do what I want. It gets me about half way to where I set it up to go, and seems to cycle through the points really really fast. I think it's clicking through all the points but there's nothing to slow it down so it only gets halfway.


program spstest2;
{$DEFINE SMART8}
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}

var //{path name}
//{delcare the sps variable}
togarden: tpointarray;

status: string;
Procedure P07_DeclarePlayer;
Begin
P07_PlayerName:='';
P07_PlayerPass:='';
end;
procedure paths;
begin
togarden := [point(252, 44),point(252, 44),point(252, 56),point(240, 60),point(228, 72),point(208, 76),point(192, 76),point(160, 80),point(132, 92),point(108, 92),point(72, 80),point(72, 80),point(64, 80)];
end;

begin
SetupSRL;
P07_DeclarePlayer;
SetupP07Include;
sps_setup(runescape_other,['yewrun1']);
ActivateClient;
wait(2000)

If (Not P07_LoggedIn) Then
begin
P07_LogInPlayer;
end;

P07_MakeCompassNorth;
p07_makecameraanglehigh;
writeln('lookingnorth')
sps_walkpath(togarden);
writeln('Walking')

end.

http://i50.tinypic.com/1or2mx.png

Output when run:
SRL Compiled in 0 msec
Paired with SMART[664]
Checking P07Include VersionNumber
Local : 1.7 / Latest : 1.7
You Have The Latest Version of P07Include
lookingnorth
After this point it just sits there, and does nothing until I terminate manually.

Iambubbleman
03-09-2013, 12:05 AM
Thank you very much, been having to radial walk long distances, this should really help.

rj
03-09-2013, 01:44 AM
Hello,

I am having trouble getting this SPS to work. I've followed the previously posted and lurked around several pages of responses as well and have gotten it to "work." But it doesn't do what I want. It gets me about half way to where I set it up to go, and seems to cycle through the points really really fast. I think it's clicking through all the points but there's nothing to slow it down so it only gets halfway.


program spstest2;
{$DEFINE SMART8}
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}

var //{path name}
//{delcare the sps variable}
togarden: tpointarray;

status: string;
Procedure P07_DeclarePlayer;
Begin
P07_PlayerName:='';
P07_PlayerPass:='';
end;
procedure paths;
begin
togarden := [point(252, 44),point(252, 44),point(252, 56),point(240, 60),point(228, 72),point(208, 76),point(192, 76),point(160, 80),point(132, 92),point(108, 92),point(72, 80),point(72, 80),point(64, 80)];
end;

begin
SetupSRL;
P07_DeclarePlayer;
SetupP07Include;
sps_setup(runescape_other,['yewrun1']);
ActivateClient;
wait(2000)

If (Not P07_LoggedIn) Then
begin
P07_LogInPlayer;
end;

P07_MakeCompassNorth;
p07_makecameraanglehigh;
writeln('lookingnorth')
sps_walkpath(togarden);
writeln('Walking')

end.

http://i50.tinypic.com/1or2mx.png

Output when run:
SRL Compiled in 0 msec
Paired with SMART[664]
Checking P07Include VersionNumber
Local : 1.7 / Latest : 1.7
You Have The Latest Version of P07Include
lookingnorth
After this point it just sits there, and does nothing until I terminate manually.

Your map is a little sloppy that's why lol

litoris
03-09-2013, 07:29 AM
Hello,

I am having trouble getting this SPS to work. I've followed the previously posted and lurked around several pages of responses as well and have gotten it to "work." But it doesn't do what I want. It gets me about half way to where I set it up to go, and seems to cycle through the points really really fast. I think it's clicking through all the points but there's nothing to slow it down so it only gets halfway.
-snip-
After this point it just sits there, and does nothing until I terminate manually.

From experience, the best way to use SPS is to do

repeat
Wait(600);
until(SPS_Blindwalk(Point(###,###)));

for each point you have.
This way, you don't need to gather millions of points for a straight path, and you can think of each path as a combination of straight paths an gather points this way.
I always use SPS with blindwalk, it's much more fail-safe this way.

vizzyy
03-09-2013, 05:12 PM
From experience, the best way to use SPS is to do

repeat
Wait(600);
until(SPS_Blindwalk(Point(###,###)));

for each point you have.
This way, you don't need to gather millions of points for a straight path, and you can think of each path as a combination of straight paths an gather points this way.
I always use SPS with blindwalk, it's much more fail-safe this way.

Thank you for your feedback, I really appreciate it. I'll try that later today and post results.

vizzyy
03-09-2013, 11:00 PM
I ended up getting it to work perfectly with a new map and this bit of experimental syntax I produced while fucking around.


paths;
count:=0;
While count<16 do //length of TPointArray, "toTrees" in this case
begin
test:=[toTrees[count]];
writeln(count);
SPS_WalkPath(test);
Wait(3000);
count:=count+1;
end;

The SPS_WalkPath function without the loop with the waits would not work. It would display the symptoms I explained in my previous post where it would cycle through the points too quickly and only arrive about halfway to the destination.

this is how I picked my points

count:=0;
repeat
count:=count+1;
points:=points+(toStr(SPS_GetMyPos));
wait(6000);
writeln('1sec left');
wait(1000);
writeln(count);
until (count=10)
writeln(points);

And I would basically just turn SMART on/off to move before the time displayed 1 second left. Kind of a sketchy way to do it, but it worked.


ALSO: SPS_BlindWalk is not a function in the 07sps include. I tried copy and pasting the version from the older SPS straight into 07sps and changing some of the variables to match the 07include to no avail. This is how I ended up casting individual points from the whole Path array into a temporary array just so I could put "wait" in between them

Gh0stt
03-10-2013, 12:26 AM
Thanks for this. Will bookmark :)

nickyvh
03-13-2013, 12:21 PM
Not working for me

made 3 maps and none of them works.
Something wrong ?

program new;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$I SPS/p07sps.simba}
Var
myPath:TpointArray;


begin
DeclarePlayers;
SetupSRL;
SPS_Setup(RUNESCAPE_OTHER,['walk']);
SetupP07Include;
ActivateClient;
P07_LoginPlayer;
SPS_GetMyPos;
myPath := [Point(202, 89), Point(202, 94), Point(203, 99), Point(204, 105), Point(204, 109), Point(205, 115), Point(201, 116), Point(197, 118), Point(192, 119), Point(182, 119), Point(178, 120), Point(174, 118), Point(167, 121), Point(160, 124), Point(155, 124), Point(147, 118), Point(140, 120), Point(129, 122), Point(125, 124), Point(123, 137), Point(123, 145), Point(123, 150), Point(126, 156)];
if SPS_WalkPath(myPath) then
Sps_WalkPath(myPath);
end.

198941989519896

Hoodz
03-18-2013, 07:27 PM
Idk if its real but look at player name and pass.
Just saying to remove this line because other people can say it. I wont touch your account, just to warn you!

larsi37
03-26-2013, 04:51 PM
when i try to compile the script i made it opens the p07sps.simba and i get the error:
[Error] C:\Simba\Includes\SPS/p07sps.simba(51:35): Unknown identifier 'P07_MMCX' at line 50
Compiling failed.
what should i do?

litoris
03-26-2013, 06:17 PM
when i try to compile the script i made it opens the p07sps.simba and i get the error:
[Error] C:\Simba\Includes\SPS/p07sps.simba(51:35): Unknown identifier 'P07_MMCX' at line 50
Compiling failed.
what should i do?

This is for use with the P07 include. If you'd rather use SRL-OSR, the official include, try this thread (http://villavu.com/forum/showthread.php?t=98324).