SRL Archive - Help

Adding SPS to Script


digitalninja

2013-02-04 14:25:04

Hi Folks,

I tried the IRC channel but it was like crickets in there. I am basically done with my script and have tested all the individual components which work and now just need to add 2 procedure to walk to a tree and then walk back to a bank. I am not sure how to add these to an already existing script? I used Google's SPS guide to test the walking works (which they do).

Here is my code to walk to a tree:


Program TestPath;
{$DEFINE SMART8} //< Edit this out if using Rs Client
{$i srl/srl.Simba}
{$i sps/sps.simba}

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

status: string;

procedure paths;
begin
totree := [Point(276, 130), Point(275, 131), Point(268, 131), Point(259, 131), Point(249, 128), Point(241, 130), Point(230, 130), Point(219, 130), Point(208, 130), Point(198, 130), Point(188, 130), Point(177, 128), Point(163, 124), Point(150, 124), Point(140, 122), Point(130, 120), Point(117, 114), Point(105, 109), Point(94, 101)]
end;
procedure mahogtree;
begin
if sps_walkpath(totree) then
status := 'walking to the tree'
else begin
status :='failed walking to the tree';
writeln(status + ' + time running:' +timerunning);
end;
writeln(status + ' + time running:' +timerunning);
end;
begin
srl_sixhourfix := true;
smart_fixspeed := true;

setupsrl;
paths; //{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,['ApeAtoll']);

clicknorth(srl_angle_high);

mahogtree;

repeat
until(false)
end.


Here is my code to walk to a bank:


Program TestPath;
{$DEFINE SMART8} //< Edit this out if using Rs Client
{$i srl/srl.Simba}
{$i sps/sps.simba}

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

status: string;

procedure paths;
begin
tobank := [Point(84, 84), Point(83, 85), Point(93, 93), Point(104, 101), Point(120, 109), Point(136, 120), Point(156, 124), Point(169, 127), Point(186, 128), Point(198, 129), Point(214, 130), Point(229, 132), Point(244, 132)]
end;
procedure bankwalk;
begin
if sps_walkpath(tobank) then
status := 'walking to the bank'
else begin
status :='failed walking to the bank';
writeln(status + ' + time running:' +timerunning);
end;
writeln(status + ' + time running:' +timerunning);
end;
begin
srl_sixhourfix := true;
smart_fixspeed := true;

setupsrl;
paths; //{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,['ApeAtoll']);

clicknorth(srl_angle_high);

bankwalk;

repeat
until(false)
end.

I just dont really know how to add these to my core script? I have added the code and variables but am unable to compile for various reasons (ie invalud number of parameters).

Can anyone help?

Thanks!!!

Sjoe

2013-02-04 14:34:05

Probably the version you got of SPS is wrong.
i have no idea where the right version is, maybe force-update it or smthing

http://villavu.com/forum/showthread.php?t=66266
Or try this.

digitalninja

2013-02-04 16:05:59

From: Sjoekeloe
Probably the version you got of SPS is wrong.
i have no idea where the right version is, maybe force-update it or smthing

http://villavu.com/forum/showthread.php?t=66266
Or try this.


Thanks Sjoekeloe!! This is EXACTLY what I needed! Now in the final testing phase for my membership application script!! THANKS!

Sjoe

2013-02-04 16:15:24

From: digitalninja
Thanks Sjoekeloe!! This is EXACTLY what I needed! Now in the final testing phase for my membership application script!! THANKS!


Cool, didn't think it was the right solution, glad I could help lol