WarPie90

MIniDrop

Dec 30th, 2022
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.39 KB | None | 0 0
  1. procedure TMiner.IntenseDrop();
  2. var
  3.   p: TPoint;
  4.   slots: TIntegerArray;
  5.   n: Int32 = 3;
  6. begin
  7.   if Random(5) = 0 then
  8.     n := Random(2,4);
  9.  
  10.   p := Mouse.GetPosition();
  11.   slots := Inventory.GetUsedSlots();
  12.   if (Length(Slots) >= n) then
  13.   begin
  14.     SetLength(slots, Min(Length(Slots), n));
  15.     Inventory.ShiftDrop(Inventory.ErrorPattern(slots,3));
  16.     Mouse.Move(p,25);
  17.   end;
  18. end;
Add Comment
Please, Sign In to add comment