SRL Archive - OSR Help

Right but wrong?


derik

2012-03-26 16:35:54

Hello im currently working on an astral runner and im doing it step by step

so far i made the walking code from bank to altar but it doesnt seem to work when i run it could anyone have a look and see whats wrong?
program lunarislandwalkaltar;

{$DEFINE SMART}

{$i SRL/srl.simba}
{$i SPS/sps.simba}

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

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Set to true if you want to use Player 0
end;
end;



Var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['0_2', '0_3', '1_2']);
myPath := [Point(209, 966), Point(209, 974), Point(223, 974),
Point(233, 974), Point(245, 972), Point(257, 976), Point(259, 984),
Point(259, 994), Point(261, 1002), Point(261, 1008), Point(261, 1018),
Point(261, 1026), Point(259, 1034), Point(261, 1044), Point(261, 1056),
Point(261, 1062), Point(261, 1070), Point(261, 1078), Point(269, 1084),
Point(275, 1090), Point(285, 1098), Point(289, 1108), Point(297, 1110),
Point(303, 1120), Point(309, 1124), Point(321, 1128), Point(327, 1130),
Point(333, 1128), Point(341, 1132), Point(341, 1136), Point(343, 1144),
Point(345, 1154), Point(345, 1162), Point(349, 1172), Point(347, 1182),
Point(347, 1196), Point(355, 1192), Point(365, 1188), Point(373, 1186),
Point(383, 1180), Point(395, 1176), Point(405, 1178), Point(417, 1178),
Point(427, 1176), Point(427, 1176), Point(435, 1172), Point(435, 1172)];

end.

procedure MainLoop;
begin
SPS_WalkPath(mypath)
end;

begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
MainLoop();
end.

Thanks in advance

begginer

2012-03-26 17:42:36

lol, this should be a procedure like this:

Procedure WalkThere;


Var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['0_2', '0_3', '1_2']);
myPath := [Point(209, 966), Point(209, 974), Point(223, 974),
Point(233, 974), Point(245, 972), Point(257, 976), Point(259, 984),
Point(259, 994), Point(261, 1002), Point(261, 1008), Point(261, 1018),
Point(261, 1026), Point(259, 1034), Point(261, 1044), Point(261, 1056),
Point(261, 1062), Point(261, 1070), Point(261, 1078), Point(269, 1084),
Point(275, 1090), Point(285, 1098), Point(289, 1108), Point(297, 1110),
Point(303, 1120), Point(309, 1124), Point(321, 1128), Point(327, 1130),
Point(333, 1128), Point(341, 1132), Point(341, 1136), Point(343, 1144),
Point(345, 1154), Point(345, 1162), Point(349, 1172), Point(347, 1182),
Point(347, 1196), Point(355, 1192), Point(365, 1188), Point(373, 1186),
Point(383, 1180), Point(395, 1176), Point(405, 1178), Point(417, 1178),
Point(427, 1176), Point(427, 1176), Point(435, 1172), Point(435, 1172)];

end;

putonajonny

2012-03-26 18:09:03

program lunarislandwalkaltar; 

{$DEFINE SMART}

{.include SRL/srl.simba}
{.include SPS/sps.simba}

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

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Pin := '';
Active := True; // Set to true if you want to use Player 0
end;
end;
//Everything up to this point is perfect

Function WalkThePath : Boolean; //This is the start of your function, if you don't know what one is check the tutorial section
Var
myPath : TPointArray;
begin

SPS_Setup(RUNESCAPE_SURFACE, ['0_2', '0_3', '1_2']);
myPath := [Point(209, 966), Point(209, 974), Point(223, 974),
Point(233, 974), Point(245, 972), Point(257, 976), Point(259, 984),
Point(259, 994), Point(261, 1002), Point(261, 1008), Point(261, 1018),
Point(261, 1026), Point(259, 1034), Point(261, 1044), Point(261, 1056),
Point(261, 1062), Point(261, 1070), Point(261, 1078), Point(269, 1084),
Point(275, 1090), Point(285, 1098), Point(289, 1108), Point(297, 1110),
Point(303, 1120), Point(309, 1124), Point(321, 1128), Point(327, 1130),
Point(333, 1128), Point(341, 1132), Point(341, 1136), Point(343, 1144),
Point(345, 1154), Point(345, 1162), Point(349, 1172), Point(347, 1182),
Point(347, 1196), Point(355, 1192), Point(365, 1188), Point(373, 1186),
Point(383, 1180), Point(395, 1176), Point(405, 1178), Point(417, 1178),
Point(427, 1176), Point(427, 1176), Point(435, 1172), Point(435, 1172)];

Result := SPS_WalkPath(MyPath);

end;

begin
{$IFDEF SMART}
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ENDIF}
SetupSRL();
ClearDebug();
DeclarePlayers();
LoginPlayer();
WalkThePath; //This makes it do your path walking...
end.