Skip to content

GetActorPocket

What an NPC actor’s pockets hold now.

GetActorPocket(actorId)
Parameter Type
actorId number the NPC actor

table, number - the stacks - {{class, amount, health}, ...} - and the money in Groschen; nil when the actor has no pockets

local items, money = GetActorPocket(merchant)
if items and #items == 0 and money == 0 then SetActorPocket(merchant, {{class = BREAD, amount = 2}}, 5) end -- refilled

SetActorPocket · the Pickpocketing group of the index