Category:Inventory Functions

From NWN Lexicon
Jump to: navigation, search

Inventory Function Category

Functions that deal with a character's inventory.



Functions

Name Brief Description

ActionEquipItem

Puts an item in possesion into an inventory slot.

ActionEquipMostEffectiveArmor

Causes the calling creature to equip the best armor in its inventory.

ActionGiveItem

Gives a specified item to a target creature.

ActionPickUpItem

Causes subject to run to an item and place it in inventory.

ActionPutDownItem

Causes the subject to place an item on the ground at it's feet.

ActionTakeItem

Takes an item from an object

ActionUnequipItem

Makes the executing creature unequip an object and place it in their inventory.

CheckPartyForItem

Check party for possession of an item.

CopyObject

Duplicates the object specified.

CreateItemOnObject

Create a specific item in an objects inventory

GetBackpackMatch

Determines if the PC carries the proper items to create a new item.

GetDroppableFlag

Determines if an item can be dropped.

GetFirstItemInInventory

Determines the first item in an object's inventory.

GetHasInventory

Determine whether an object has an inventory.

GetInventoryDisturbItem

Returns the disturbing item in an inventory OnDisturbed event.

GetInventoryDisturbType

Determines the type of disturbance of an inventory.

GetIsItemPossessedByParty

Check to see if any character in the party has the specified item.

GetItemInSlot

Retrieve the item in a given inventory slot of a creature.

GetItemPossessedBy

Get an item with a specific tag in a given creature or placeable's inventory.

GetItemPossessedByParty

Check to see if the specified item belongs to anyone in the party.

GetItemPossessor

Get the creature or object who possesses a specified item.

GetItemStackSize

Determines the number of stacked items contained within an inventory object.

GetLastDisturbed

Determine who last disturbed the inventory of an object or creature.

GetLastOpener

Gets the creature that last opened or destroyed the container calling this script.

GetLootable

Returns the lootable state of a creature

GetModuleItemAcquired

Get the item acquired on an OnAcquiredItem event.

GetModuleItemAcquiredBy

Retrieves an object that acquired a module item.

GetModuleItemAcquiredFrom

Get the last owner of the item acquired on an OnAcquiredItem event.

GetModuleItemAcquiredStackSize

Determines the stack size of an item belonging to a module that was just acquired.

GetModuleItemLost

Get the object that was dropped on an OnUnAcquiredItem event.

GetModuleItemLostBy

Get the creature that lost the item on an OnUnAcquiredItem event.

GetNextItemInInventory

Determines the first item in an object's inventory.

GetNumItems

Gets the number of the item that the target carries.

GetNumStackedItems

Determines the number of stacked items contained within an inventory object.

GetPCItemLastEquipped

Returns the last equipped item

GetPCItemLastEquippedBy

Returns the PC that last equipped an item

GetPCItemLastUnequipped

Returns the last unequipped item

GetPCItemLastUnequippedBy

Get the PC who last unequipped an item

GetPickpocketableFlag

Determines if the item can be pickpocketed.

GetStolenFlag

Determine if an item has been stolen.

GetWeight

Retrieves the weight of an individual item, or the weight of all objects carried by a single creature.

GiveNumItems

Gives the target the number of items specified.

HasAnyItemOfBaseType

Cycles through the players inventory looking for any item that has a certain Base Item Type. If the Base Item Type is Armor, make sure the AC matches.

HasGold

Determines if a player has more than a certain amount of gold on them.

HasItem

Determines if a creature possesses an item.

LootInventory

Strip everything droppable in the regular, non-equipped, inventory.

LootInventorySlots

Loot all the droppable items from the inventory slots of the victim into the inventory of the corpse object.

OpenInventory

Opens a player's inventory panel.

RemoveItemFromParty

Removes the specified item from whichever member of the party has it.

SetItemCharges

Sets the number of charges left on a given item.

SetItemStackSize

Set the number of items in a given stack.

SetLootable

Sets whether a creature leaves a lootable corpse upon death

SetPickpocketableFlag

Sets the pickpocketable flag on the item.

SetStolenFlag

Set whether the item is stolen

SKIN_SupportEquipSkin

Forces a creature to equip a skin item in its creature armor inventory slot.

SKIN_SupportGetSkin

Retrieves a creature's skin item or creates a new one and forces an equip if the creature does not already have one.

StripAllPersonalItemsFromEveryone

Removes henchmen 'hired' items for use in the original campaign.

TakeArtifactItem

Removes the item returned by GetArtifactItem from the player's inventory.

TakeComplexItem

Removes the plot related item from a player's inventory.

TakeFetchItem

Removes the plot related item from a player's inventory.

TakeGold

Removes a given amount of gold from the targets inventory, and optionally removes it from the game.

TakeNumItems

Takes the number of items specified from the target.

TakeStoryItem

Removes the plot related item from a player's inventory.

TalentBuffSelf

Used for Potions of Enhancement and Protection

author: NWN Lexicon Group, editor: Mistress, contributor: Axe Murderer