SRL Archive - OSR Help

SPS Walking problem, newbie Question, Please help


johnbrown8976

2012-03-31 21:51:44

Hi,
This is my first script which is supposed to walk from Varrock Loadstone to Bank, but it does not do anything i.e does not walk at all.
I made sure that the correct map tile is loaded 11_7, but still cannot move. I tried in different places, but looks like I am missing something, Please help


program myFirstScript;
{$DEFINE SMART} // This is how we include SMART; it HAS to be called BEFORE SRL!
{$i srl/srl.simba}
{$i sps/sps.simba}


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

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
end;


Var
myPath:TPointArray;


function VarrockLoadstoneToBank : TPointArray;
begin
SetLength(Result, 6);
Result := [
Point(4050, 2725), Point(4050, 2685), Point(4225, 2630),
Point(4450, 2705), Point(4380, 2680), Point(4055, 2675)
];
end;

begin

// These 4 lines HAVE to be set BEFORE you call SetupSRL;
Smart_Server := 5;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

ClearDebug;
SetupSRL;
DeclarePlayers; // Calls the procedure, you can't forget this!
LoginPlayer; // You want your player to login, right?

SPS_Setup(RUNESCAPE_SURFACE,['11_7']);//SPS Areas
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
SPS_WalkPath(VarrockLoadstoneToBank);
end.


Gucci

2012-03-31 22:13:10

Declare it like this:

procedure VarrockLoadstoneToBank;
var
myPath: TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['11_7']);
myPath:= [Point(4050, 2725), Point(4050, 2685), Point(4225, 2630),
Point(4450, 2705), Point(4380, 2680), Point(4055, 2675)];
SPS_WalkPath(myPath);
end;

johnbrown8976

2012-04-01 20:55:16

Ok, I applied your procedure, but still not working, could you test on your simba if it works for you. I started my character at Varrock loadstone but not working.

I got the location Points from Simple Pathmaker script.
http://villavu.com/forum/showthread.php?t=72353

I hope his script is not giving me invalid point locations.

This is my updated script after your suggestion.

program movePlayer;
{$DEFINE SMART} // This is how we include SMART; it HAS to be called BEFORE SRL!
{$i srl/srl.simba}
{$i sps/sps.simba}

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

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
end;

procedure VarrockLoadstoneToBankProc;
Var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['10_7','11_7']);
myPath:= [Point(4050, 2725), Point(4050, 2685), Point(4225, 2630),
Point(4450, 2705), Point(4380, 2680), Point(4055, 2675)];
SPS_WalkPath(myPath);
end;

begin
// These 4 lines HAVE to be set BEFORE you call SetupSRL;
Smart_Server := 5;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;

ClearDebug;
SetupSRL;
DeclarePlayers; // Calls the procedure, you can't forget this!
LoginPlayer; // You want your player to login, right?

VarrockLoadstoneToBankProc;

end.

iBlank

2012-04-03 01:34:42


myPath := [Point(4680, 3139), Point(4680, 3103), Point(4679, 3049), Point(4681, 2985), Point(4685, 2963)];

This is the path I get when going from the Lodestone to the fountain in the middle (don't know which bank you are going to). Not sure why your path is so different. Try downloading the path creator at this link. He gives instructions and it is very useful.

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

johnbrown8976

2012-04-03 23:59:21

From: alevere4

myPath := [Point(4680, 3139), Point(4680, 3103), Point(4679, 3049), Point(4681, 2985), Point(4685, 2963)];

This is the path I get when going from the Lodestone to the fountain in the middle (don't know which bank you are going to). Not sure why your path is so different. Try downloading the path creator at this link. He gives instructions and it is very useful.

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


Thanks a lot for your assistance. I looked at that path creator software before but it does not run on Windows 7 64 bit even after installing Microsoft .NET 4.0, I tried 2 computers.

About the difference between our path, I walked from VARROCK LOADSTONE, all the way south of varrock by the champion's guild, to the WEST VARROCK BANK. Everything is fine now because I got my code working.

The problem was with the SPS_SETUP. Even though I only used the map 10_7 and 11_7, it still required me to add surrounding areas map to work properly.

This is what I had (The NON-working code)
SPS_Setup(RUNESCAPE_SURFACE,['10_7','11_7']);

This is how it I made it work. (The working code)
SPS_Setup(RUNESCAPE_SURFACE,['10_7','11_7','10_6','11_6','10_8','11_8']);