GetActorPocket
What an NPC actor’s pockets hold now.
Syntax
Section titled “Syntax”GetActorPocket(actorId)| Parameter | Type | |
|---|---|---|
actorId |
number | the NPC actor |
Returns
Section titled “Returns”table, number - the stacks - {{class, amount, health}, ...} - and the money in Groschen; nil when the actor has no pockets
Example
Section titled “Example”local items, money = GetActorPocket(merchant)if items and #items == 0 and money == 0 then SetActorPocket(merchant, {{class = BREAD, amount = 2}}, 5) end -- refilledSee also
Section titled “See also”SetActorPocket · the Pickpocketing group of the index
