> For the complete documentation index, see [llms.txt](https://atiysus-organization.gitbook.io/aty-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atiysus-organization.gitbook.io/aty-scripts/inventory/features/airdrops.md).

# Airdrops

## Airdrops

Crates the whole server hears about.

```lua
Config.Airdrop = { enabled = true, every = 45, minutes = 15 }
```

`enabled` is the timer, and it is off by default: without it a crate only lands when `invairdrop` or the `SpawnAirdrop` export calls one. `every` is the minutes between crates, `minutes` how long one stays.

#### How one runs

A crate is called and appears as a real container, with a blip everybody sees and a marker on the ground. There is no plane or parachute: a resource that wants the theatre gets the coordinates from the `aty_inventory:airdropSpawned` event. Anyone who reaches it can open it; the loot is drawn from a loot table and written to the ledger with `airdrop` as the actor and the crate named in the reason, and every item taken out is an ordinary move.

Crates sweep themselves away when their time is up or once they are empty, and anything left inside goes with them — which the ledger records too, so the accounting stays closed. A crate lives in memory only and does not survive a restart.

#### Loot tables

Edited from the admin panel's **Airdrops** tab, live. Each line names an item, a count range and a chance (1-100); the item field suggests from the catalogue, and a save is refused, naming the line, if any line names an item the server does not have — otherwise a typo would simply be missing from every crate.

#### Commands

```
invairdrop [x y z]    call one now, at a configured spot or where you say
invairdrops           list live crates
invairdropwrite       SELF-TEST — drives the loot-table editor through the
                      panel's endpoint, then puts the configuration back
invairdroptest        self-test
```

{% hint style="warning" %}
`invairdropwrite` does not persist anything, despite the name — it is a test of the editor's endpoint. It restores the configuration when it finishes, because a self-test that leaves a server dropping crates every two minutes is one nobody runs twice.
{% endhint %}

#### Reaching the crate

A crate opens with the inventory key (F2) from within `Config.OpenRadius`, and with a target zone when `Config.Target.enabled` is on; its label and zone come and go with it. A crate is deliberately not a world point, and an early version never taught the key about crates — the marker and blip were there but nobody could open it. `invairdrops` shows whether the server still has the crate.
