SRL Archive - Jr. Member General Help and Discussion

Need help once again guys!


henryuscola

2015-05-05 07:17:36

Hello guys , okay I just want help with getting smart client to automatically close and reload somewhere between 5-8 hours so like if time is around 5-8 Hours script running it will close the client and reload another client and start again automatically. How do I go about this ?

footballjds

2015-05-05 10:14:14

From: henryuscola
Hello guys , okay I just want help with getting smart client to automatically close and reload somewhere between 5-8 hours so like if time is around 5-8 Hours script running it will close the client and reload another client and start again automatically. How do I go about this ?


Look in the SRL include. There are functions/procedures to kill or load the client. Then simply place a time check somewhere in your main loop.

The Mayor

2015-05-05 10:39:18

From: henryuscola
Hello guys , okay I just want help with getting smart client to automatically close and reload somewhere between 5-8 hours so like if time is around 5-8 Hours script running it will close the client and reload another client and start again automatically. How do I go about this ?



if (getTimeRunning() > 21600000) then // 6 hours in ms
begin
writeLn('Going to reload the client');
sixHourFix();
end;

henryuscola

2015-05-05 11:58:05

It does stop the script and the error shows is no active players , no use in reloading client . How do I write it so that it kills the current client and reloads a new one.

The Mayor

2015-05-05 12:00:24

From: henryuscola
It does stop the script and the error shows is no active players , no use in reloading client . How do I write it so that it kills the current client and reloads a new one.


What is the code you are trying to run?

henryuscola

2015-05-05 12:07:23

if (getTimeRunning() > 300000) then
begin
WriteStatus('Going to reload client');
SetupSrl();
SixHourFix();
if (waitClientReady()) then
writeln('Client is ready.');
mainloop();
end;

This is what I have so far, is there a function to call that can terminate the current client?

3Garrett3

2015-05-05 14:44:19

Does the line:


smartReloadClient({Some int goes here, SMART ID maybe?});

Work for you? I have no idea how to use it, I just happened to see it in some code earlier today. It appears as though it should restart SMART.

henryuscola

2015-05-05 19:39:08

Just to update you guys sixhourfix(); not working out too well however I did manage to write it so it loads up another client and sets focus on it after the runtime limit has been passed. Although it still doesn't close up old client and logout

The Mayor

2015-05-06 07:02:22

From: henryuscola
if (getTimeRunning() > 300000) then
begin
WriteStatus('Going to reload client');
SetupSrl();
SixHourFix();
if (waitClientReady()) then
writeln('Client is ready.');
mainloop();
end;

This is what I have so far, is there a function to call that can terminate the current client?


All you need is the code I showed you above. I asked to too see your whole script because you probably were not setting any players to active (hence that error).

henryuscola

2015-05-08 09:31:37

Sixhourfix(); wont spawn a client, and my script is very big i dont want to post the whole thing but this is what i get.

– TPlayer.login(): True
– Succesfully logged in after client was reloaded
sixHourFix()
sixHourFix():
– Reset attempt #1
– Succesfully freed SMART[7656]
– Killed our current client. Waiting 5m & 4s before reloading
– initSmart():
—- Attempting to spawn a new client..
—- smartCreateClient():
—— ERROR: Error while grabbing parameters
—— HINT: Make sure you can reach the RS website, and no active firewall is blocking Simba
—- Failed to grab parameters
– initSmart()
smartReloadClient()
Waiting up to 5 minutes for RS to load…
Client succesfully loaded after reload
TPlayer.login()
– Already logged in
TPlayer.login(): True
Succesfully logged in after client was reloaded
sixHourFix()
sixHourFix():
Reset attempt #1
Succesfully freed SMART[7656]
Killed our current client. Waiting 5m & 8s before reloading


No client gets spawned.

KeepBotting

2015-05-08 17:08:51

---- smartCreateClient():
------ ERROR: Error while grabbing parameters
------ HINT: Make sure you can reach the RS website, and no active firewall is blocking Simba
usually means it's a problem on your end OR Jagex's end.

Does SMART always fail to (re)spawn?

E: although
smartReloadClient()
Waiting up to 5 minutes for RS to load...
Client succesfully loaded after reload
shouldn't happen if no client was spawned … post the routine that reloads your client.

henryuscola

2015-05-10 11:39:44

Hello , I've now only used the gettimerunning function and sixhourfix(); and it is able to load up a smart client however , now I'm being Bombarded with unable to find lobby playbutton after it logs into lobby so it just closes the newly spawned client.

KeepBotting

2015-05-10 13:16:49

From: henryuscola
Hello , I've now only used the gettimerunning function and sixhourfix(); and it is able to load up a smart client however , now I'm being Bombarded with unable to find lobby playbutton after it logs into lobby so it just closes the newly spawned client.
Ensure your graphics options are correct.

From: KeepBotting
post the routine that reloads your client.

henryuscola

2015-05-11 02:33:33

Alright I'll give it a shot one last time and update you all