SRL Archive - RS3 Script Requests

Slight problem -- HELP


Ranny

2013-02-06 18:28:03

Hey all, I have lots of different types of scripts but it just takes time to keep coming and set them up etc so I was wandering if it was possible to make the script automatically start at a certain time and end at a certain time as long as Simba is running.
Please, any help would be much appreciated.
Also, a code of closing the squeel of fortune box will help a ton, I had it just forgot lol was something like (closerandoms) or something.
Thanks in advance.


~~Ranny

Ian

2013-02-06 18:32:25

FindNormalRandoms should close the SoF button. No idea if you can make something start your scripts automatically, I think you'll just have to take a few minutes to do it manually :p

Recursive

2013-02-06 18:34:45

Use a macro, remember to tape the mouse or unplug it

Ranny

2013-02-06 18:54:01

I don't want to use a macro as I want to run like 3 clients at the same time so I will have to use smart
@ [Re]Cursive

BmWxi, could you give me the whole line lol, it's been time since I used Simba and I need to get my head back together lol.

Justin

2013-02-06 18:56:08

From: Ranny
I don't want to use a macro as I want to run like 3 clients at the same time so I will have to use smart
@ [Re]Cursive

BmWxi, could you give me the whole line lol, it's been time since I used Simba and I need to get my head back together lol.


Just add:


FindNormalRandoms;
in your mainloop

Ian

2013-02-06 18:57:31

 
FindNormalRandoms;

Ranny

2013-02-07 02:26:27

Thanks a ton also, is it possible to make the script auto log me in from lobby since sometimes my CPU gets flooded and like 1 rs client logs off to lobby.

Chris!

2013-02-07 03:07:11

if not (LoggedIn) then
LoginPlayer;

That should log you into the game from the lobby, IIRC.

Ranny

2013-02-07 13:59:29

Thanks a ton, so it is not possible to make the script start automatically with like a timer or something? :/

ForMyFutures

2013-02-07 15:33:50

If you have a specific time in mind then yes, it is possible.
For example: Say it is 3PM and you want to run your script at 5PM. However, you know you will not be home at 5PM, so instead you do this in your main loop.


procedure StartScriptAt(t: String);
begin

repeat
TheTime;
until (TheTime = t);

end;



begin

StartScriptAt('05:00:00 PM');
WriteLn('Script Successfully Started at 05:00:00 PM!');

end.

So in the above example you must write the time as a string in the following format. All in one string by the way.


StartScriptAt('HH:MM:SS A/PM'); //The A/PM must be written as either AM or PM.
// HH is the hours. If the hours is only a single digit then there must be a zero before it. Like 01, 02, 03 and so on.
// MM is the minutes, and must have two digits as well.
// SS is seconds and can usually be left at 00 unless you prefer to start at a very specific time within the minute.

By the way, this is not a procedure within SRL so you must add the procedure to your script, before the

begin
end.
Like shown in the first example.

Edit: To be clear, this Delays the start of the script. It keeps grabbing the time until the time you specified is grabbed, and then it will continue on with your main loop.

Gucci

2013-02-07 15:38:46

From: ForMyFutures
If you have a specific time in mind then yes, it is possible.
For example: Say it is 3PM and you want to run your script at 5PM. However, you know you will not be home at 5PM, so instead you do this in your main loop.


procedure StartScriptAt(t: String);
begin

repeat
TheTime;
until (TheTime = t);

end;



begin

StartScriptAt('05:00:00 PM');
WriteLn('Script Successfully Started at 05:00:00 PM!');

end.

So in the above example you must write the time as a string in the following format. All in one string by the way.


StartScriptAt('HH:MM:SS A/PM'); //The A/PM must be written as either AM or PM.
// HH is the hours. If the hours is only a single digit then there must be a zero before it. Like 01, 02, 03 and so on.
// MM is the minutes, and must have two digits as well.
// SS is seconds and can usually be left at 00 unless you prefer to start at a very specific time within the minute.

By the way, this is not a procedure within SRL so you must add the procedure to your script, before the

begin
end.
Like shown in the first example.


How exactly does that procedure even start the script?

And I'm sure there isn't anyway to do it unless it's manual unless you run the script and add a wait before the SetupSRL and the other stuff in the mainloop

King

2013-02-07 15:39:58

I agree this would be a good way to start the script like that, however I would stagger them so that the CPU does not lag when starting them all, especially if you already have lag when one logs off. You can also write a program to launch them if you want, there should be a tutorial for using commands like that in your script, i've never done it, however it is possible

King

2013-02-07 15:41:00

From: Gucci
How exactly does that procedure even start the script?


You would add this in, it doesnt start the script it delays the start of the script, it should be named elsewise, Like Procedure DelayStart;

The Killer

2013-02-07 15:43:05

From: ForMyFutures
If you have a specific time in mind then yes, it is possible.
For example: Say it is 3PM and you want to run your script at 5PM. However, you know you will not be home at 5PM, so instead you do this in your main loop.


procedure StartScriptAt(t: String);
begin

repeat
TheTime;
until (TheTime = t);

end;



begin

StartScriptAt('05:00:00 PM');
WriteLn('Script Successfully Started at 05:00:00 PM!');

end.

So in the above example you must write the time as a string in the following format. All in one string by the way.


StartScriptAt('HH:MM:SS A/PM'); //The A/PM must be written as either AM or PM.
// HH is the hours. If the hours is only a single digit then there must be a zero before it. Like 01, 02, 03 and so on.
// MM is the minutes, and must have two digits as well.
// SS is seconds and can usually be left at 00 unless you prefer to start at a very specific time within the minute.

By the way, this is not a procedure within SRL so you must add the procedure to your script, before the

begin
end.
Like shown in the first example.


Use GetSystemTime to grab the time. Also use TheTime =< t as u theres a chance it could miss it for some reason.

ForMyFutures

2013-02-07 15:44:40

Well it doesn't specifically start the script, but it will run through the procedure until the desired time in which case if he did this before DeclarePlayers; then it would "start" at a specific time.

From: The Killer
Use GetSystemTime to grab the time. Also use TheTime =< t as u theres a chance it could miss it for some reason.

Doesn't GetSystemTime return a string? So if you want to use any type of operators you would have to convert it to an integer. Correct me if I'm wrong, cause I'd like to know.

Edit: Agreed, DelayedStart would be a better name. The procedure can be modified to fit your liking obviously. :P

Gucci

2013-02-07 15:45:12

From: SRLKing
You would add this in, it doesnt start the script it delays the start of the script, it should be named elsewise, Like Procedure DelayStart;


The procedure that he has shown wouldn't work, look at my suggestion.

Also don't double post.

@OP
Something like:

procedure Start;
begin
Time:= GetSystemTime;

repeat
Wait(1000);
until(Time = whatever you want)
end;

King

2013-02-07 15:48:00

From: Gucci
The procedure that he has shown wouldn't work, look at my suggestion.

Also don't double post



Sorry and I didnt read through it very well, I'm on my phone :P

ForMyFutures

2013-02-07 15:53:16

From: Gucci
The procedure that he has shown wouldn't work, look at my suggestion.


I checked to see if it would work, in which case when I put my herblore script to start at '03:44:00 PM' it ran on as expected.
After I saw that I terminated it because I only wanted to see if it would run correctly after the aforementioned procedure.


03:44:00 PM
=====================
FUTURES HERBLORE
Time Running 34 Seconds
Potions Made: 0
Exp Gained:0
=====================