Code:
program RyasPowerChopTillYaDrop;
{.include SRL\SRL.scar}
procedure DeclarePlayers;
begin
HowManyPlayers := 2; //How many Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0; //Starting Player
Players[0].Name := '';
Players[0].Name := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Integers[0]:= 17; // Loads to Do.
Players[0].strings[0] := 'normal' // tree to cut
Players[0].Strings[1] := 'True'; // Is your axe equipped?
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := 'king';
Players[1].Active := True;
Players[1].Integers[0]:= 13; // Loads to Do.
Players[1].strings[0] := 'normal' // tree to cut
Players[1].Strings[1] := 'True'; // Is your axe equipped?
end;
var x, y, i, Dropped, Loads, LoadsCompleted, LoadsUntilSwitch, Wc: integer;
procedure AntiRandoms;
begin
if not LoggedIn then
Exit;
FindNormalRandoms;
if FindFight then
begin
writeln('found fight');
RunAway('E', True, 1, 6500);
writeln('Ran away should be safe');
end;
end;
procedure ClickStyle;
var
U, P: Integer;
begin
if (not (LoggedIn)) then
Exit;
U := 0;
p := 1 + Random(4);
if (p = 2) then
begin
Mouse(x, y, 2, 2, False);
repeat
wait(50 + Random(25))
Inc(U);
until (ChooseOption('hop')) or (U > 10)
end
else
Mouse(x, y, 2, 2, True)
end;
procedure Cutnormal;
begin
case lowercase(Players[CurrentPlayer].Strings[1]) of
'normal' :begin
repeat
if not LoggedIn then
Exit;
if (FindObjCustom(X, Y, ['Tree', 'ee', 'ree', 'Tre'], [4355179, 1330237, 2903623, 4419944], 4)) then
MMouse(X, Y, 4, 4);
Wait(100 + Random(200));
ClickStyle;
AntiRandoms;
repeat
Wait(100)
until not (IsUpText('ree'))
until (InvFull)
end;
'willow' :begin
repeat
if not LoggedIn then
Exit;
if (FindObjCustom(X, Y, ['Tree', 'ee', 'ree', 'Tre'], [1784876, 3627360, 5995372, 8105624], 4)) then
MMouse(X, Y, 4, 4);
Wait(100 + Random(200));
ClickStyle;
AntiRandoms;
repeat
Wait(100)
until not (IsUpText('ree'))
until (InvFull)
end;
end;
end;
procedure Logo;
begin
WriteLn('Thank you for using')
Wait(300)
WriteLn(' _______ ')
Wait(300)
WriteLn(' / Ryas \ ')
Wait(300)
WriteLn(' / Power \ ')
Wait(300)
WriteLn(' | Cutter | ')
Wait(300)
WriteLn(' \_______/ ')
Wait(300)
WriteLn(' | | ')
Wait(300)
WriteLn(' | | ')
Wait(300)
WriteLn(' | | ')
Wait(300)
WriteLn(' | | ')
Wait(300)
WriteLn(' ____|___|____________ ')
WriteLn('| Please post | ')
WriteLn('| ProgressReport | ')
WriteLn('| and ideas | ')
WriteLn('| My first one :) ')
Wait(4000)
end;
procedure PowerDrop;
begin
if not LoggedIn
then Exit;
case lowercase(Players[CurrentPlayer].Strings[1]) of
'true': begin
DropAll;
IncEx(Dropped,28)
end;
'false': begin
for i := 2 to 28 do
DropItem(i);
IncEx(Dropped,27)
end;
end;
end;
procedure DoOnce;
begin
ClearDebug;
Logo;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;
procedure ProgressReport;
begin
ClearDebug;
Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,');
Writeln('/\ Time Running : ' + TimeRunning + ' /\');
Writeln('/\ Done ' + IntToStr(Loads) + ' loads /\');
Writeln('/\ Dropped ' + IntToStr(Dropped) + ' logs /\');
Writeln('`````````````````````````````````````````````````');
end;
procedure MainLoop;
begin
LoadsCompleted := 0;
SetAngle(True);
Wait(1000);
SetRun(True);
repeat
repeat
LoadsUntilSwitch := Players[CurrentPlayer].integers[0];
Cutnormal;
if Invfull then
begin
PowerDrop;
Inc(Loads);
end;
Inc(LoadsCompleted);
ProgressReport;
until (LoadsCompleted = LoadsUntilSwitch) or (not LoggedIn)
if LoadsCompleted = LoadsUntilSwitch then
NextPlayer(False);
if (not LoggedIn) then
NextPlayer(False);
ProgressReport;
LoginPlayer;
until (AllPlayersInactive);
ProgressReport;
TerminateScript;
end;
begin
DoOnce;
MainLoop;
ProgressReport;
end.