xabbo-scripts/Scripts/Inventory Reducer.csx
Administrator 7a548130a3 Move all scripts into Scripts/ subfolder
Keeps the repo root clean - only README.md visible on landing page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 09:49:37 +01:00

24 lines
463 B
C#

const int Limit = 100;
OnIntercept(
(In.InventoryPush, In.InventoryInvalidate, Out.GetInventory),
e => e.Block()
);
OnIntercept(In.InventoryPush, e => {
var total = e.Packet.ReadInt();
var current = e.Packet.ReadInt();
Log($"Loading {current+1}/{total}...");
});
foreach (var fragment in
EnsureInventory(120000)
.GroupBy(x => x.GetDescriptor())
.SelectMany(x => x.Take(Limit))
.Fragmentize())
{
Send(In.InventoryPush, fragment);
}
Wait();