SRL Archive - OSR Help

Learning SPS Walking


HardRockers

2011-12-28 22:41:58

Hey I am trying to learn how to use SPS to walk from a site to the bank. I have written a script that will just do the walking and nothing else, and I am still having trouble. Can someone help me out a little?

And basically I have just taken the SPS tutorial thread and used it but with my own information and position.

[PHP]program WalkingTester;
{$i SRL\SRL.scar}
{$i sps/sps.simba} // has to be included after SRL
{$i SRL\SRL\Misc\Stats.simba}



var
t: integer;
pts: TPointArray;
begin
smart_server := 1;
smart_members := false;
smart_signed := true;
smart_superDetail := false;

clearDebug();
setupSRL();

SPS_Debug := true;


SPS_Setup(RUNESCAPE_SURFACE, ['5_10']);
pts := [Point(2336, 4074), Point(2314, 4123), Point(2295, 4181), Point(2264, 4230), Point(2262, 4262)];
{
repeat
inc(t);

if (SPS_WalkPath(pts)) then
writeLn(format('Walked %d times', [t]));

invertTPA(pts);
until(t = 50);
}
SPS_GetMyPos();
end.




begin
SPS_WalkPath
SPS_Continue := true;
end. [/PHP]

Jhangir

2011-12-28 22:50:01

Can you tell me if you get errors. Or if its walking the wrong way?
Read this it may help you.
http://villavu.com/forum/showthread.php?t=66266&highlight=wolygon

Also use this tool very helpful.
http://villavu.com/forum/showthread.php?t=64891&highlight=pathmaker

HardRockers

2011-12-28 22:56:35

Yes, that is what I have been using, and I am just kind of stuck at this point because I am just not very good at scripting yet.

But It basically almost locked down my computer when I tried to run it, and it just stood there and moved the mouse a little bit. Which is why I am confused….

Edit: I just tried it again and got this

Exception in Script: Out of memory
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
Exception in Script: Out of memory

Jhangir

2011-12-28 23:02:25

Procedure WalkToBank;
var
ToBanker:TPointArray;
Begin

If Not FindNormalRandoms Then
Begin
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
ToBanker := [Point(5608, 1844), Point(5622, 1803), Point(5620, 1778), Point(5617, 1763)];


Wait(3000);
SPS_WalkPath(ToBanker);
End;
End;


Try this change the pts and change the surface. Also delete all the extra stuff in your script and add this.

HardRockers

2011-12-28 23:11:20

Ok, now i think I am Missing something. I am getting an unknown Identifier Error for this line

If Not FindNormalRandoms Then

So Obviously I am missing a FindNormalRandoms Procedure or Variable correct? Or am i just way off.

Jhangir

2011-12-28 23:16:40

just delete that line you dont need it right now

HardRockers

2011-12-28 23:18:10

Ok, I did that and got this:

[Hint] C:\Simba\Includes\SRL/SRL/core/gametab.scar(1607:3): Variable 'PREVIOUS' never used at line 1606
[Error] (1:1): Unexpected end of file at line 0
Compiling failed.

weequ

2011-12-28 23:21:26

From: HardRockers
Ok, I did that and got this:

[Hint] C:\Simba\Includes\SRL/SRL/core/gametab.scar(1607:3): Variable 'PREVIOUS' never used at line 1606
[Error] (1:1): Unexpected end of file at line 0
Compiling failed.
You are missing a begin somewhere or you have too many end; somewhere, I think.

Edit: Try with this (I have never used SPS so I wouldn't know)

procedure WalkToBank;
var
ToBanker:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['13_4']);
ToBanker := [Point(5608, 1844), Point(5622, 1803), Point(5620, 1778), Point(5617, 1763)];
Wait(3000);
SPS_WalkPath(ToBanker);
end;

HardRockers

2011-12-28 23:26:33

ok this is all I am trying to compile right now.

[PHP]
program WalkingTester;
{$i SRL\SRL.scar}
{$i sps/sps.simba}



Procedure WalkToBank;
var
ToBanker:TPointArray;

Begin
SPS_Setup(RUNESCAPE_SURFACE, ['5_10']);
ToBanker := [Point(2324, 4071), Point(2323, 4126), Point(2292, 4181), Point(2259, 4231), Point(2240, 4267), Point(2262, 4267)];


Wait(3000);
SPS_WalkPath(ToBanker);
End; [/PHP]

euphemism

2011-12-28 23:27:35

At the end you need to add:


begin

WalkToBank;
end.

Jhangir

2011-12-28 23:29:48

From: euphemism
At the end you need to add:


begin

WalkToBank;
end.


Yea thats too i forgot that.

euphemism

2011-12-28 23:31:20

From: euphemism
At the end you need to add:


begin

SetupSRL;
WalkToBank;
end.


Forgot to add the SRL setup line. :duh:

HardRockers

2011-12-28 23:32:13

Fixed, except my points are off I guess, So I will work on that.

Thanks guys, I am catching on a little :) My next project is banking.

Jhangir

2011-12-28 23:52:37

if you need help with banking check my snapegrass picker script. It will help you.

HardRockers

2011-12-28 23:54:11

Ya, I have been checking it out. It was actually one of the first ones i was trying to learn from.

Hey, do you know where I can get the new map for the Path creator? All of my points are coming up about 15 tiles or so off to the NE.

Jhangir

2011-12-28 23:56:57

From: HardRockers
Ya, I have been checking it out. It was actually one of the first ones i was trying to learn from.

Hey, do you know where I can get the new map for the Path creator? All of my points are coming up about 15 tiles or so off to the NE.


Are you having problems because of the snow? Where are you walking to? If its the snow you have to wait for snow to go away. idk where to get new map. But you could try dtm walking or radial. Ive never used those though.

HardRockers

2011-12-28 23:59:58

Just from the iron by yanille to the yanille bank. there is no snow, the points are just not in the right spots, I tried adjust the points to compensate and it still didn't work.

Maybe I am doing something wrong, and I would really like to use SPS now that I have kind of learned a little bit more about it.

HardRockers

2011-12-29 00:48:31

I can't get it to get the path right still. I have no clue. I am going to bed for now, and hopefully it miraculously fixes itself by tomorrow morning…


Edit: Sorry, did not mean to double post.

Hero

2011-12-29 01:44:25

*I coulda swore I posted in this earlier* Anyways I regret to inform you that more and more SPS areas seem to be getting broken. Hopefully most paths return to normal once this snow map is gone. I have a Yanille Miner that ran great until the snow hit. What you can do as a temp fix is just click a weird path in the Path maker until your guy hits the right points you want.


Also the latest pre-built map that I can direct you to is in simba/includes/sps/img/runescape_surface

HardRockers

2011-12-29 09:50:35

ok thank you, ya its just off completely. I have tried 100 different paths and no matter what i try he still never ends up in the bank. Its ok I suppose, I will learn another method.

Ok i am starting on Radial. I got my first little radial thing that I want it to use, and it just sits there.



program WalkingTester;
{$i SRL\SRL.scar}
{$i sps/sps.simba}



procedure RadialWalking(RadialWalkin: Integer);
begin
case RadialWalkin of
1: RadialWalk(2442604, 160, 210, 60, 5, 5);

end;
end;

procedure WalkToBank;
var
i: Integer;

begin
Setrun(true); //this turns run on
for i := 1 to 5 do //if you don't know what this is, look up my tut on loops ;)
begin
RadialWalking(i); //this means that the first loop through it will use RadialWalking(1), then the second time through, RadialWalking(2), etc. Remember, this is the procedure we made before?
end;
end;

Begin
WalkToBank;
end.