program Buyer;
{$I SRL\SRL.Simba}
{$I P07Include.Simba}
var n, x, y, amount: integer;
var start: boolean;
procedure Learn;
begin
if (IsMouseButtonDown(1) = true) then
begin
GetMousePos(x,y);
start := true
end;
end;
procedure Buy;
begin
MMouse(x, y, 5, 5);
wait(RandomRange(20,70))
ClickMouse2(mouse_right);
P07_ChooseOptionMulti(['10']);
end;
begin
SetupSRL;
SetupP07Include;
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
IsMouseButtonDown(1); //the command is flawed and it needs to update using this)
amount := 110; // this must be a multiple of ten
WriteLn('Double click the item you wish the buy/sell ' + IntToStr(amount) + ' of.')
n :=0
repeat
Learn;
wait(RandomRange(200, 500));
until(start)
repeat
n := (1+n)
Buy;
writeln('Bought or Sold: ' + IntToStr(n*10),
wait(RandomRange(500, 1000)),
until((10*n)=amount)
end.