SCAR Code:
procedure WithrawIngredients;
begin
if not (LoggedIn) then Exit;
if OpenTheBank and not InvFull then
begin
if not IngredientsExist('bank') then
begin
CloseBank;
LogOut;
Exit;
end else
begin
//Withraw Anchovies.
if FindDTM(Anchovies, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(X, Y, 3, 3, False);
Wait(200+Random(100));
if not ChooseOption('14') then
begin
ChooseOption('X');
MarkTime(WH);
while not InViewEnterAmount and not (TimeFromMark(WH)>7000) do Wait(50+random(50));
if (TimeFromMark(WH)>7000) then
begin
if FindDTM(Anchovies, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(X, Y, 3, 3, False);
Wait(200+Random(100));
if not ChooseOption('14') then
begin
ChooseOption('X');
MarkTime(WH);
while not InViewEnterAmount and not (TimeFromMark(WH)>7000) do Wait(50+random(50));
if (TimeFromMark(WH)>7000) then
begin
CloseBank;
LogOut;
Exit;
end;
TypeSend('14');
MarkTime(WH);
while not FindDTM(X, Y, Anchovies, MIX1, MIY1, MIX2, MIY2) and not (TimeFromMark(WH)>7000) do Wait(100+random(50));
if (TimeFromMark(WH)>7000) then
begin
CloseBank;
LogOut;
Exit;
end;
end else
while not FindDTM(X, Y, Anchovies, MIX1, MIY1, MIX2, MIY2) do Wait(100+random(50));
//Withraw Plain Pizzas.
if FindDTM(PlainPizza, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(X, Y, 3, 3, False);
Wait(200+Random(100));
if not ChooseOption('14') then
begin
ChooseOption('X');
MarkTime(WH);
while not InViewEnterAmount and not TimeFromMark(WH>7000) do Wait(50+random(50));
if TimeFromMark(WH>7000) then
begin
if FindDTM(PlainPizza, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(X, Y, 3, 3, False);
Wait(200+Random(100));
if not ChooseOption('14') then
begin
ChooseOption('X');
MarkTime(WH);
while not InViewEnterAmount and not (TimeFromMark(WH)>7000) do Wait(50+random(50));
if TimeFromMark(WH>7000) then
begin
CloseBank;
LogOut;
Exit;
end;
TypeSend('14');
MarkTime(WH);
while not FindDTM(X, Y, PlainPizza, MIX1, MIY1, MIX2, MIY2) and not (TimeFromMark(WH)>7000) do Wait(100+random(50));
if (TimeFromMark(WH)>7000) then
begin
CloseBank;
LogOut;
Exit;
end;
end;
end else
while not FindDTM(X, Y, PlainPizza, MIX1, MIY1, MIX2, MIY2) and not (TimeFromMark(WH)>7000) do Wait(100+random(50));
if (TimeFromMark(WH)>7000) then
begin
CloseBank;
LogOut;
Exit;
end;
end;
end;
CloseBank;
end;