Log in

View Full Version : Auto logging off?



smartiederek
08-22-2007, 05:14 AM
Hi...i'm a long time runescape member but a first time SRL user

i have very little scripting expertise but i'm trying to write some basic scripts

i was just wondering if there's a way to auto log off your character once the script has already started

or a way to terminate the script (after a period of time) without having to manually do it

i hate leaving my account unattended for so long...so i'm looking for a countdown timer that will shut down the script after a few hours.

thanks!

HyperSecret
08-22-2007, 05:33 AM
yea search the forum and also dl the srl manual it helps alot,

but killscript w/ how many hours you want it to run

procedure KillScript(hours: Integer);

or you could use a repeat until statement like

repeat
AttackingProcedure;
until (killed >= HowManyToKill)

using ^^, you also have to do killed as a integer var and also define killed := 0 before the begin and also after the attacking procedure you have to put killed := killed + 1 , for that though just look at other scripts and you will understand that more or look at tuts, also define howmanytokill as a const, but if you SEARCH the forums all this is explained

rotflmfwao
08-22-2007, 04:51 PM
To terminate the script automatically, useTerminateScript;
To logout automatically, useLogoutPlayer; but you have to have SRL included and a declare player proc. Here is my logout procedure in case you aren't doing multiplayer:Repeat
FindFastRandoms;
Wait(3000);
Until(Not(LoggedIn));
but you have to have srl included.

smartiederek
08-22-2007, 06:18 PM
ok i'm trying to write a script that will log out my player and then randomly switch to another world. so far i have this :

program New;
{.include SRL\SRL\core\Login.scar}
{.include SRL\SRL\misc\SCSS.scar}

Function Logout: Boolean;
Var
c, i: Integer;
Begin
If(LoggedIn)then
Begin
GameTab(10);
Wait(200 + Random(100));
While (LoggedIn) or (c < 10) do
Begin
Inc(c);
If(ClickText('here', UpChars, MIX1, MIY1, MIX2, MIY2, True))then
Begin
For i := 0 to 10 do
Begin
Wait(1000);
If not(LoggedIn)then
Begin
Result := True;
Break;
end;
end;
end;
end;
end else
Result := True;
end;

procedure SCSSLoadRandomWorld(Members: boolean; SetHandle: boolean);
begin
if SCSSDebug then WriteLn('Loading random world in SCSS.');
SendInterSCARMessage('SCSSHandle', '');
if Members then
SendInterSCARMessage('SCSS', 'randomworld,true')
else
SendInterSCARMessage('SCSS', 'randomworld,false');
if (SetHandle) then begin Wait(2500); SCSSSetHandle; end;
end.

i get an error message:

Line 47: [Error] (50:57): Unknown identifier 'FindText' in script E:\SCAR 3.11\includes\SRL\SRL\core\Login.scar

so yeah...can anyone help me. thanks

rotflmfwao
08-22-2007, 06:38 PM
Gotta have {.Include SRL/SRL.scar}


Offtopic: Happy 400 posts to me :D