Inventory
Inventory functions
isAnyScreenOpened()
isAnyScreenOpened()Returns true if any screen opened.
Returns:
(boolean).
-- Example code showing how to use the function
local isOpened = player.inventory.isAnyScreenOpened()isSignOpened()
isSignOpened()Returns true if sign opened.
Returns:
(boolean).
-- Example code showing how to use the function
local isOpened = player.inventory.isSignOpened()getSignText(line)
getSignText(line)Returns line of sign.
Returns:
(string).
-- Example code showing how to use the function
if player.inventory.isSignOpened() then
local line = player.inventory.getSignText(0)
endsetSignText(line, text)
setSignText(line, text)Returns true if success.
Returns:
(boolean) return true is successfully.
-- Example code showing how to use the function
if player.inventory.isSignOpened() then
local status = player.inventory.setSignText(0, "1000")
end
getChestTitle()
getChestTitle()Returns chest title.
Returns:
(string).
-- Example code showing how to use the function
local title = player.inventory.getChestTitle()getStack(slot)
getStack(slot)Returns the item in the slot.
Parameters:
slot(number) - Slot id.
Returns:
(item data).
Example Usage:
-- Example code showing how to use the function
local item = player.inventory.getStack(36)getStackFromContainer(slot)
getStackFromContainer(slot)Returns the item in the slot.
Parameters:
slot(number) - Slot id.
Returns:
(item data).
Example Usage:
-- Example code showing how to use the function
local item = player.inventory.getStackFromContainer(36)getStackFromId(id)
getStackFromId(id)Create the item from id.
Parameters:
id(string) - Hypixel API ID.
Returns:
(item data).
Example Usage:
-- Example code showing how to use the function
local item = player.inventory.getStackFromId("HYPERION")getContainerSlots()
getContainerSlots()Returns the number of slots in an open container.
Returns:
(number) - Int.
Example Usage:
-- Example code showing how to use the function
local slots = player.inventory.getContainerSlots()leftClick(slot)
leftClick(slot)Returns true if successfully.
Parameters:
slot(number) - Slot id.
Returns:
(boolean).
Example Usage:
-- Example code showing how to use the function
player.inventory.leftClick(0)rightClick(slot)
rightClick(slot)Returns true if successfully.
Parameters:
slot(number) - Slot id.
Returns:
(boolean).
Example Usage:
-- Example code showing how to use the function
player.inventory.rightClick(0)dropAll(slot)
dropAll(slot)Returns true if successfully.
Parameters:
slot(number) - Slot id.
Returns:
(boolean).
Example Usage:
-- Example code showing how to use the function
player.inventory.dropAll(0)closeScreen()
closeScreen()Closes an open screen (chest, inventory, etc.)
Returns:
(boolean).
Example Usage:
-- Example code showing how to use the function
player.inventory.closeScreen()Last updated