Code:
program Flax;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
var
x, y, tries1, tries2: Integer;
point1: TPoint;
const
WorldNumber = 111;
procedure Setup;
begin
SmartSetupEx(WorldNumber, True, True, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'hairyduncan'; //username
Players[0].Pass := ''; //password
Players[0].Nick := 'ydun'; //3-4 letters from your username
Players[0].Loc := 'Bank';
Players[0].Active := True;
if not LoggedIn then LoginPlayer;
end;
procedure Flax; forward;
begin
if Players[CurrentPlayer].Loc = 'Flax' then PickFlax;
if Players[CurrentPlayer].Loc = 'Bank' then BankToFlax;
if Players[CurrentPlayer].Loc = 'Path' then LocationToBank;
if Players[CurrentPlayer].Loc = 'Flax' and InvFull then FlaxToBank;
end;
procedure FindFlax;
begin
if FindColorSpiral(x, y, 12149870, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, true);
FFlag(10);
Writeln('Now at flax.');
Players[CurrentPlayer].Loc := 'Flax';
Flax;
end;
end;
procedure BankToFlax;
begin
if FindSymbolIn(x, y, 'tree', 568, 79, 708, 155) then
begin
Mouse(x, y, 2, 2, true);
Writeln('Walking to flax.');
Players[CurrentPlayer].Loc := 'Path';
FFlag(10);
Mouse(605, 152, 3, 3, true);
FFlag(10);
Mouse(667, 136, 3, 3, true);
FFlag(10);
Flax;
end;
end;
procedure GetLocation;
begin
if FindSymbol(x, y, 'bank') then
begin
Mouse(x, y, 2, 2, true);
Players[CurrentPlayer].Loc := 'Bank';
FFlag(10);
end;
if FindColorSpiral(x, y, 12149870, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, true);
Players[CurrentPlayer].Loc := 'Flax';
FFlag(10);
end;
if FindSymbol(x, y, 'tree') then
begin
if not FindSymbol(x, y, 'bank') then
begin
if not FindColorSpiral(x, y, 12149870, MMX1, MMY1, MMX2, MMY2) then
begin
Players[CurrentPlayer].Loc := 'Path';
end;
end;
end;
end;
procedure RClick;
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ick');
end;
procedure LClick;
begin
Mouse(x, y, 2, 2, true);
end;
procedure PickFlax;
begin
FindObjCustom(x, y, ['la', 'ax'], [14999694, 14736509, 15065748, 15460528, 14934156, 941067], 5);
case random(2) of
0: RClick;
1: LClick;
end;
Wait(250 + random(750));
Flax;
end;
procedure LocationToBank;
begin
FindSymbolIn(x, y, 'tree', 615, 16, 669, 114);
Mouse(x, y, 2, 2, true);
FFlag(10);
Mouse(657, 27, 2, 2, true);
FFlag(10);
FindSymbol(x, y, 'bank');
FFlag(15);
Players[CurrentPlayer].Loc := 'Bank';
Flax;
end;
begin
Setup;
DeclarePlayers;
if not LoggedIn then LoginPlayer;
MakeCompass('N');
GetLocation;
Flax;
end.
Any solutions anybodyy?