GetContainer

Prototype: GemRB.GetContainer (PartyID[, autoselect])

Description: Gets the current container’s type and other basic header information. The player is always the first selected player. If PartyID is 0 then the default PC is the first multiselected PC. Autoselect will always select a groundpile. If there is no container at the feet of the PC autoselect will create the container.

Parameters:

  • PartyID - the PC’s position in the party
  • autoselect - is 1 if you call this function from a player inventory (so you select the pile at their feet)

Return value: dictionary

  • ‘Type’ - the container’s type, numeric (see IESDP)
  • ‘ItemCount’ - the number of items in the container

See also: GetStore, GameGetFirstSelectedPC, GetContainerItem


Back to function index, GUIScript introduction.