My SRL or Scar isn't working correctly so I can't test this yet.
But it does compile. ;)
Test please.
It random drops the MinPos inventory slot to the MaxPos inventory slot.
It makes it more.... human like :)
SCAR Code:program RandDrop;
{.include SRL/SRL.scar}
procedure RandDrop(MinPos, MaxPos: integer);
var
Done : array of boolean;
A : integer;
begin
SetArrayLength(Done, 28);
while ((MaxPos - MinPos) >= A) do
begin
case RandomRange(MinPos, MaxPos) of
1: begin if (Done[1] = False) then DropItem(1); Done[1] := True; A := A + 1; end;
2: begin if (Done[2] = False) then DropItem(2); Done[2] := True; A := A + 1; end;
3: begin if (Done[3] = False) then DropItem(3); Done[3] := True; A := A + 1; end;
4: begin if (Done[4] = False) then DropItem(4); Done[4] := True; A := A + 1; end;
5: begin if (Done[5] = False) then DropItem(5); Done[5] := True; A := A + 1; end;
6: begin if (Done[6] = False) then DropItem(6); Done[6] := True; A := A + 1; end;
7: begin if (Done[7] = False) then DropItem(7); Done[7] := True; A := A + 1; end;
8: begin if (Done[8] = False) then DropItem(8); Done[8] := True; A := A + 1; end;
9: begin if (Done[9] = False) then DropItem(9); Done[9] := True; A := A + 1; end;
10: begin if (Done[10] = False) then DropItem(10); Done[10] := True; A := A + 1; end;
11: begin if (Done[11] = False) then DropItem(11); Done[11] := True; A := A + 1; end;
12: begin if (Done[12] = False) then DropItem(12); Done[12] := True; A := A + 1; end;
13: begin if (Done[13] = False) then DropItem(13); Done[13] := True; A := A + 1; end;
14: begin if (Done[14] = False) then DropItem(14); Done[14] := True; A := A + 1; end;
15: begin if (Done[15] = False) then DropItem(15); Done[15] := True; A := A + 1; end;
16: begin if (Done[16] = False) then DropItem(16); Done[16] := True; A := A + 1; end;
17: begin if (Done[17] = False) then DropItem(17); Done[17] := True; A := A + 1; end;
18: begin if (Done[18] = False) then DropItem(18); Done[18] := True; A := A + 1; end;
19: begin if (Done[19] = False) then DropItem(19); Done[19] := True; A := A + 1; end;
20: begin if (Done[20] = False) then DropItem(20); Done[20] := True; A := A + 1; end;
21: begin if (Done[21] = False) then DropItem(21); Done[21] := True; A := A + 1; end;
22: begin if (Done[22] = False) then DropItem(22); Done[22] := True; A := A + 1; end;
23: begin if (Done[23] = False) then DropItem(23); Done[23] := True; A := A + 1; end;
24: begin if (Done[24] = False) then DropItem(24); Done[24] := True; A := A + 1; end;
25: begin if (Done[25] = False) then DropItem(25); Done[25] := True; A := A + 1; end;
26: begin if (Done[26] = False) then DropItem(26); Done[26] := True; A := A + 1; end;
27: begin if (Done[27] = False) then DropItem(27); Done[27] := True; A := A + 1; end;
28: begin if (Done[28] = False) then DropItem(28); Done[28] := True; A := A + 1; end;
end;
end;
end;
begin
SetupSRL;
RandDrop(2, 3); //Drops Slots 2 to 3
end.
