SRL Archive - OSR Help

Am I using FindNormalRandoms correctly?


Wreck

2012-06-12 11:29:06

Am I using FindNormalRandoms correctly and if no how should it be used?

procedure FindRandoms;
begin
If FindNormalRandoms Then
If Not LoggedIn Then
begin
writeln('We might be stuck in a random.');
writeln('Ending Script.');
TerminateScript;
end;
end;

repeat
if (LoggedIn) then
begin
ProgressReport;
RunEnergy(RUNATENERGY);
while IsChopping do
begin
FindRandoms;
AntiBan;
end;
if InvFull then
begin
FindRandoms;
DropLogs(Trees[a]);
end else
begin
FindRandoms;
if (fs >= 5) then
begin
ProgressReport;
writeln('')
writeln('We are stuck.')
writeln('Ending Script.')
Logout;
TerminateScript;
end;
if TreeFindLocation(x, y, Trees[a]) then
begin
fs := 0;
if TreeCheckClick(x, y, Trees[a]) then
IsChoppingWait;
end else
IncEx(fs, 1);
RandomCompass;
end;
end else
begin
ProgressReport;
TerminateScript;
end;
until(false);

putonajonny

2012-06-12 11:34:49

Yeah, that is correct :) though you might want to do SwapPlayer(False); instead of TerminateScript, if you do stick with TerminateScript then do ExitToLobby before it :)I'm an idiot

Edit:
The OCD in me made me fix up your standards:
 
repeat
if(LoggedIn)then
begin
ProgressReport;
RunEnergy(RUNATENERGY);
while IsChopping do
begin
FindRandoms;
AntiBan;
end;
if InvFull then
begin
FindRandoms;
DropLogs(Trees[a]);
end
else
begin
FindRandoms;
if (fs >= 5) then
begin
ProgressReport;
writeln('')
writeln('We are stuck.')
writeln('Ending Script.')
Logout;
TerminateScript;
end;
if TreeFindLocation(x, y, Trees[a]) then
begin
fs := 0;
if TreeCheckClick(x, y, Trees[a]) then
IsChoppingWait;
end
else
IncEx(fs, 1);
RandomCompass;
end;
end
else
begin
ProgressReport;
TerminateScript;
end;
until(false);

Wreck

2012-06-12 12:14:26

From: putonajonny
Yeah, that is correct :) though you might want to do SwapPlayer(False); instead of TerminateScript, if you do stick with TerminateScript then do ExitToLobby before it :)


Thank you :)

putonajonny

2012-06-12 12:17:40

From: Wreck
From: putonajonny
Yeah, that is correct :) though you might want to do SwapPlayer(False); instead of TerminateScript, if you do stick with TerminateScript then do ExitToLobby before it :)


Thank you :)

You are welcome, see my edit though, I made a bit of a bobo..

Gucci

2012-06-13 15:57:56

You should call LogOut; before TerminateScript;, actually I'm not sure if TerminateScript; logs you out but yeah you should add LogOut;

putonajonny

2012-06-13 17:13:14

From: Gucci
You should call LogOut; before TerminateScript;, actually I'm not sure if TerminateScript; logs you out but yeah you should add LogOut;


The thing was the way that it new to terminate the script is because it is logged out, so there is no point in trying to log out…