inventory

drop()

Drops a given slot id from the inventory

drop(slot_id: int, stack: boolean): void

Parameters

nametypedescription
slot_idintThe slot id to drop
stackbooleanWhether to drop the entire stack or a singular item

shift()

Shifts a slot id in the inventory

shift(slot_id: int): void

Parameters

nametypedescription
slot_idintThe slot id to shift

swap()

Swaps a given slot id with a given hot-bar slot

swap(slot_id: int, hot_bar_slot: int): void

Parameters

nametypedescription
slot_idintThe slot id to swap with
hot_bar_slotintThe hot-bar slot to swap with

window_click()

Provides full access to window clicks, used to move around items in inventories

window_click(window_id: int, slot_id: int, mouse_button_clicked: int, mode: int): void

Parameters

nametypedescription
window_idintThe window id
slot_idintThe slot id
mouse_button_clickedintThe mouse button clicked
modeintThe clicking mode

get_item_in_window()

Gets an item out of the given window id

get_item_in_window(window_id: int, slot_id: int): item

Parameters

nametypedescription
window_idintThe window id
slot_idintThe slot id

get_item()

Gets an item out of the players inventory

get_item(slot_id: int): item

Parameters

nametypedescription
slot_idintThe slot id

get_damage_reduction()

Gets the damage reduction of the given armor item. Returns 0 if the item is not an armor item

get_damage_reduction(slot_id: int): double

Parameters

nametypedescription
slot_idintThe slot id

get_damage_amount()

Gets the damage amount of the given item

get_damage_amount(slot_id: int): double

Parameters

nametypedescription
slot_idintThe slot id

get_harvest_level()

Gets the harvest level of the given item

get_harvest_level(slot_id: int): double

Parameters

nametypedescription
slot_idintThe slot id

upper_container_id()

Returns the upper chest inventory if a chest gui is currently open

upper_container_id(): int

This method does not have any parameters

lower_container_id()

Returns the lower chest inventory if a chest gui is currently open

lower_container_id(): int

This method does not have any parameters

player_inventory_id()

Returns the player's inventory id

player_inventory_id(): int

This method does not have any parameters

current_inventory()

Returns the current inventory the player is in, returns NIL if player is out of inventory

current_inventory(): string

This method does not have any parameters