SRL Archive - OSR Help

why does my script stop?


tristen8878

2012-05-22 07:29:19

smart starts up it logs in but then it says successfully executed.

program SPSTut;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}

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

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;

Procedure Antiban;
Begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
Case Random(100) Of
1: HoverSkill('magic', False);
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: HoverSkill('smithing', False);
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
end;
end;

Procedure walkingtest;
Var
myPath:TPointArray;
begin
FindNormalRandoms;
SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','10_7','12_7','12_6']);
myPath := [Point(234, 211), Point(243, 181), Point(254, 150), Point(261, 119), Point(273, 93), Point(304, 87), Point(325, 71), Point(314, 57), Point(336, 28)];
SPS_WalkPath(myPath);
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
end.

Justin

2012-05-22 07:50:51

After

LoginPlayer;

Add


While not RsReady do
Wait(100);
walkingtest;

See how that goes

riwu

2012-05-22 08:19:01

You did not include ur walkingtest procedure in your mainloop. All that is in ur mainloop is
 
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
end.
which means after LoginPlayer it will terminate.

When you make any procedures, u must always include it in ur mainloop for it to work ;)