loot
Takes everything a container holds (a chest, a body’s remains, a pile of bones: an id from placeables) in one call. The looter walks to target (like travel, opening doors on the way), uses it to open the game’s loot panel, and takes everything like the panel’s Take All button, which closes the panel. Without target, it takes from the loot panel open now.
The looter is the creature you control, or id, another party member, who is given control for the looting and gives it back afterwards (controlled says who has it).
The answer includes looted, reason, the container, what was taken and what is left (each item in brief), whether the backpack was full (the rest then stays, and so does the panel), whether the panel closed, and the walk. It stops and says why when the container does not open: it is locked, a fight or conversation starts, a message box appears, or there is nothing to take (empty: an emptied body’s remains open no loot panel at all).
With radius instead of target, it loots every placeable within that many meters whose use is a loot or an unlock (action in placeables), nearest first. The answer has one report each in containers, the count looted, and what else was there in skipped. It passes locked or empty containers, and stops (stopped) at a fight, a conversation, a question or a full pack.
Some containers choose their treasure only when opened, so one that read as empty may not be. Read the events from cursor (events or wait_for) to see what followed: opening a container may start a fight or a plot step.
A call may take up to budgetMs milliseconds, 300000 by default.
Arguments
| Name | Type | Required | What |
|---|---|---|---|
target | string | The container, by id. Default: the loot panel open now. | |
id | string | The party member who loots, by creature id. Default: the creature you control. | |
radius | number (≥ 0) | Loot every container within this many meters, instead of one target. | |
budgetMs | integer (≥ 1000, ≤ 600000) | The longest the whole call may take, in milliseconds. Default 60000, or 300000 with radius. | |
showMs | integer (≥ 0, ≤ 10000) | How long to linger on the panel before Take All, in milliseconds, so whoever watches sees it. Default 1000; 0 for none. |
Call it as loot over MCP, or POST /api/tool/loot with the arguments as JSON.