PDA

View Full Version : [Resolved] How to fix 6 hour reset?



NiteLeaf
02-25-2014, 09:50 AM
Hello I made an alching script but idk how to fix the 6 hr reset? ty

Coh3n
02-25-2014, 06:35 PM
If your script is written correctly SRL will restart SMART automatically when the login error message is found. If it's not working for you, make sure you have "if (not isLoggedIn()) then exit();" at the beginning of each procedure.

NiteLeaf
02-26-2014, 02:57 AM
If your script is written correctly SRL will restart SMART automatically when the login error message is found. If it's not working for you, make sure you have "if (not isLoggedIn()) then exit();" at the beginning of each procedure.

So if I have this the script and smart will restart? Cause I made my own login command and it just logins at the start thanks.

Coh3n
02-26-2014, 04:10 AM
So if I have this the script and smart will restart? Cause I made my own login command and it just logins at the start thanks.Yeah.

What SRL does is check for any login errors (i.e. the messages that pop up if your player can't login) and handles each of them differently. If one of the "Game expired" messages pops up, SRL will restart SMART and log your player in.

For this to work properly, though, your script needs to properly loop through it's procedures so that if you're disconnected your script won't get stuck at the login screen. The most effective way of doing this is like I said in my last post (add if (not isLoggedIn()) then exit();) to the beginning of all your procedures.

NiteLeaf
02-26-2014, 04:18 AM
Yeah.

What SRL does is check for any login errors (i.e. the messages that pop up if your player can't login) and handles each of them differently. If one of the "Game expired" messages pops up, SRL will restart SMART and log your player in.

For this to work properly, though, your script needs to properly loop through it's procedures so that if you're disconnected your script won't get stuck at the login screen. The most effective way of doing this is like I said in my last post (add if (not isLoggedIn()) then exit();) to the beginning of all your procedures.

When I include it in my commands it doesn't login. :(

Going to try and make my own, brb.

Coh3n
02-26-2014, 05:55 PM
When I include it in my commands it doesn't login. :(

Going to try and make my own, brb.Well you wouldn't want to put it in your login procedure. :p That's silly. I'm talking about procedures like, findTree, chopDownTree, depositItems -- functions that get called repeatedly.

NiteLeaf
02-27-2014, 04:58 AM
Well you wouldn't want to put it in your login procedure. :p That's silly. I'm talking about procedures like, findTree, chopDownTree, depositItems -- functions that get called repeatedly.

Umm I haven't gotten around to learning those yet, can't find a good tutorial.

Well I put it in my alching procedure.


procedure Alch;
begin
if (not isLoggedIn()) then exit();
MoveMouse(467, 401);
Wait (350);
ClickMouse(467, 401, 1);
Wait (350);
MoveMouse(604, 338);
Wait (350);
ClickMouse(604, 338, 1);
Wait (350);
end

So basically when it's logged out the client should restart right? Or am I doing something wrong, cause when I log out then enable smart again, the client does nothing.

Google
02-27-2014, 05:11 AM
procedure Alch;
begin
if (not isLoggedIn()) then exit();
MoveMouse(467, 401);
Wait (350);
ClickMouse(467, 401, 1);
Wait (350);
MoveMouse(604, 338);
Wait (350);
ClickMouse(604, 338, 1);
Wait (350);
end

All this is doing is saying if your player is not logged in exit the procedure. You need to have your login function in your loop for it to re-log you in.

So something like this.

program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

procedure declarePlayers();
begin
setlength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := true;
bankPin := '';
end
currentPlayer := 0;
end;

procedure Alch;
begin
if (not isLoggedIn()) then
exit();
MoveMouse(467, 401);
Wait(350);
ClickMouse(467, 401, 1);
Wait(350);
MoveMouse(604, 338);
Wait(350);
ClickMouse(604, 338, 1);
Wait(350);
end;

begin
setupSRL;
declarePlayers;
repeat //repeat until is your loop
if not isLoggedIn() then //After it exits the alch procedure its going to re-loop and this is where it checks if you are logged in.
players[currentPlayer].login(); // If your not logged in then it will log your current player back in.
Alch;
until (false)
end.

NiteLeaf
02-27-2014, 09:09 AM
procedure Alch;
begin
if (not isLoggedIn()) then exit();
MoveMouse(467, 401);
Wait (350);
ClickMouse(467, 401, 1);
Wait (350);
MoveMouse(604, 338);
Wait (350);
ClickMouse(604, 338, 1);
Wait (350);
end

All this is doing is saying if your player is not logged in exit the procedure. You need to have your login function in your loop for it to re-log you in.

So something like this.

program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

procedure declarePlayers();
begin
setlength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
isMember := true;
bankPin := '';
end
currentPlayer := 0;
end;

procedure Alch;
begin
if (not isLoggedIn()) then
exit();
MoveMouse(467, 401);
Wait(350);
ClickMouse(467, 401, 1);
Wait(350);
MoveMouse(604, 338);
Wait(350);
ClickMouse(604, 338, 1);
Wait(350);
end;

begin
setupSRL;
declarePlayers;
repeat //repeat until is your loop
if not isLoggedIn() then //After it exits the alch procedure its going to re-loop and this is where it checks if you are logged in.
players[currentPlayer].login(); // If your not logged in then it will log your current player back in.
Alch;
until (false)
end.


Thank you very much. Will test it out and tell you how it goes! :)

Turpinator
05-29-2014, 01:11 PM
I'm looking at my memory footprint and it seems that it gradually increases, while loading a DTM I'm guessing.

I've freed them in every procedure they need to be freed at but the memory usage still increases.

Are there any common memory leak traps I should be aware of?
wat?

what are you on about? Thread is dead.

hackingislol133
05-29-2014, 08:10 PM
wrong thread :/