SCAR Code:
program PiePcAirRuneBuyer;
{.include SRL/SRL.scar}
//Start in Pest Control bank have your money in your first inv.Spot.
//Face North, Highest angle.
//Stand at the very western bank booth.
//The script will keep on buying airs until it would be stoped by the user.
const
Player0 = 0;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
{///////////////////Set up your player//////////////////////}
Players[0].Name := '';// your user name
Players[0].Pass := '';//your password
Players[0].Nick := '';// your nick name
Players[0].Active := True;
end;
Procedure Bank;
var
x, y, fs, fs2 : Integer;
begin
repeat
Flag;
if (FindObj(x, y, 'booth', 607324, 10)) then
Mouse(x, y, 4, 4, False)
else
if (FindObj3(x, y, 'booth', 7243412, 10)) then
Mouse(x, y, 4, 4, False)
else
if (FindObj3(x, y, 'booth', 6324369, 10)) then
Mouse(x, y, 4, 4, False);
Wait(250+random(20));
if (ClickOption('quickly', 1)) then
begin
Flag;
repeat
Wait(100+random(20));
fs := fs + 1;
until (BankScreen) or (fs >= 50);
end;
fs2 := fs2 + 1;
until (BankScreen) or (fs2 > 5);
end;
Procedure LetsDebug;
begin
WriteLn(' Running Time: ' + (TimeRunning) + '')
end;
Procedure GoToRuneShop;
begin
if FindColor(x,y,2497522,520,90,524,94)then
Mouse(x,y,1,1,true);
Wait(7000);
FindColor(x,y,7444935,0,0,500,500);
Wait(500);
Mouse(x,y,1,1,false);
Wait(1000);
ChooseOption(x,y,'e s');
Wait(1000);
end;
Procedure Buying100Airs;
begin
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(187,85,3,3,false);
Wait(1000);
ChooseOption(x,y,'10');
Wait(1000);
Mouse(487,40,2,2,true);
end;
Procedure GoBackToBank;
begin
if FindColor(x,y,982782,674,83,680,95)then
Mouse(x,y,2,2,true);
Wait(8000);
end;
Procedure DepositAirs;
begin
Mouse(626,229,3,3,false);
Wait(1000);
ChooseOption(x,y,'all');
Wait(1000);
Mouse(487,41,2,2,true);
end;
Function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
///////////////////////////////////////////////////////////////////////////
procedure FindRandoms;
begin
FindFastRandoms;
FindNormalRandoms;
begin
SetupSRL;
declareplayers;
CurrentPlayer:= Player0;
activateclient;
loginplayer;
repeat
GoToRuneShop;
Buying100Airs;
FindRandoms;
GoBackToBank;
Bank;
DepositAirs;
until(false);
end. // thats the line where the error is.