• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    InventoryTransaction

    InventoryTransaction contains a list of actions that will be performed when the transaction is passed to Inventory.CommitTransaction. Because each function returns the InventoryTransaction, they can be chained to quickly add all the actions to the object.

    Methods

    Give

    ServerOnly

    Adds the given quantity of the given item to the holder's inventory.

    Parameters

    holderId
    string
    itemId
    string
    quantity
    number

    GivePlayer

    ServerOnly

    This is the equivalent of calling Give(player.user.id, itemId, quantity).

    Parameters

    player
    itemId
    string
    quantity
    number

    Move

    ServerOnly

    Removes the given quantity of the given item from the from holder's inventory and adds the same quantity of that item to the to holder's inventory.

    Parameters

    fromHolderId
    string
    toHolderId
    string
    itemId
    string
    quantity
    number

    MovePlayers

    ServerOnly

    This is the equivalent of calling Move(fromPlayer.user.id, toPlayer.user.id, itemId, quantity).

    Parameters

    fromPlayer
    toPlayer
    itemId
    string
    quantity
    number

    Release

    ServerOnly

    Removes the given quantity of the given item from the player's reserved items.

    Parameters

    holderId
    string
    itemId
    string
    reservedFor
    string
    quantity
    number

    ReleasePlayer

    ServerOnly

    This is the equivalent of calling Release(player.user.id, itemId, reservedFor, quantity).

    Parameters

    player
    itemId
    string
    reservedFor
    string
    quantity
    number

    Reserve

    ServerOnly

    Adds the given quantity of the given item to the holder's reserved items. Items that are reserved cannot be added or removed with Give, Take or Move. Use Release to remove the items from the reserved items.

    Parameters

    holderId
    string
    itemId
    string
    reservedFor
    string
    quantity
    number

    ReservePlayer

    ServerOnly

    This is the equivalent of calling Reserve(player.user.id, itemId, reservedFor, quantity).

    Parameters

    player
    itemId
    string
    reservedFor
    string
    quantity
    number

    Take

    ServerOnly

    Removes the given quantity of the given item from the holder's inventory.

    Parameters

    holderId
    string
    itemId
    string
    quantity
    number

    TakePlayer

    ServerOnly

    This is the equivalent of calling Take(player.user.id, itemId, quantity).

    Parameters

    player
    itemId
    string
    quantity
    number

    Updated 12 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.