can some1 teach me how to add a break procedure after a few loads in any script?
can some1 teach me how to add a break procedure after a few loads in any script?
Like an exit? Is it in a loop? Wouldn't a simple "Break;" work if it's in a loop?
~Camo
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
You can do it a few ways...
Example:
SCAR Code:repeat
DoLoads;
if (LoadsDone >= 5) then Exit;
until (false);SCAR Code:repeat
DoLoads;
until (LoadsDone >= 5);SCAR Code:while (LoadsDone < 5) do
begin
DoLoads;
end;
Break; is used in a script when you want to break out of a loop.
Example:
SCAR Code:for i := 0 to i <= 5 do
begin
DoStuff;
if(not(DoMoreStuff))then Break; // When it breaks, then it will no longer goto next line.
ThenDoMoreStuff;
end;
CorrectedSCAR Code:repeat
DoLoads;
if (LoadsDone >= 5) then Break;
until (false);.
I mean the script will log out for a few mins and log back in again after a while.
Thx for the help, I'm only a beginner.
I just use TimeFromMark's.
SCAR Code:program Sleeper;
{.include SRL/SRL.scar}
var
Running, _SleepEvery : Integer;
const
Sleeper = True; // Use sleeping?
SleepEvery = 11; // Sleep every (xx) minutes
SleepFor = 0; // Sleep for (xx) minutes (0 = a random amount of seconds _below_ 1 minute)
procedure _Sleep;
var
t : Integer;
begin
if Not Sleeper then
Exit;
if TimeFromMark(Running) >= (SleepEvery * 60000) then
begin
Logout;
if SleepFor = 0 then
t := Random(59999)
else
t := SleepFor * 60000;
Inc(Players[CurrentPlayer].Integers[3]);
IncEx(Players[CurrentPlayer].Integers[4], t);
Wait(t);
LoginPlayer;
SetAngle(True);
MakeCompass('N');
MarkTime(Running);
end;
end;
begin
SetupSRL;
_SleepEvery := (SleepEvery * 60000) + Random(30000);
MarkTime(Running);
repeat
DoLoop;
_Sleep;
until(False);
end.
Ce ne sont que des gueux
There are currently 1 users browsing this thread. (0 members and 1 guests)