Inventory

Inventory functions

isAnyScreenOpened()

Returns true if any screen opened.

Returns:

  • (boolean).

-- Example code showing how to use the function
local isOpened = player.inventory.isAnyScreenOpened()

isSignOpened()

Returns true if sign opened.

Returns:

  • (boolean).

-- Example code showing how to use the function
local isOpened = player.inventory.isSignOpened()

getSignText(line)

Returns line of sign.

Returns:

  • (string).

setSignText(line, text)

Returns true if success.

Returns:

  • (boolean) return true is successfully.

getChestTitle()

Returns chest title.

Returns:

  • (string).

getStack(slot)

Returns the item in the slot.

Parameters:

  • slot (number) - Slot id.

Returns:

Example Usage:

getStackFromContainer(slot)

Returns the item in the slot.

Parameters:

  • slot (number) - Slot id.

Returns:

Example Usage:

getContainerSlots()

Returns the number of slots in an open container.

Returns:

  • (number) - Int.

Example Usage:

leftClick(slot)

Returns true if successfully.

Parameters:

  • slot (number) - Slot id.

Returns:

  • (boolean).

Example Usage:

rightClick(slot)

Returns true if successfully.

Parameters:

  • slot (number) - Slot id.

Returns:

  • (boolean).

Example Usage:

dropAll(slot)

Returns true if successfully.

Parameters:

  • slot (number) - Slot id.

Returns:

  • (boolean).

Example Usage:

closeScreen()

Closes an open screen (chest, inventory, etc.)

Returns:

  • (boolean).

Example Usage:

Last updated