Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Inventory Script Containers #27

Open
GershonR opened this issue May 21, 2017 · 0 comments
Open

Inventory Script Containers #27

GershonR opened this issue May 21, 2017 · 0 comments
Labels

Comments

@GershonR
Copy link

Allow to create virtual inventories for GUI use

D1: https://one.denizenscript.com/denizen/lngs/#inventory_system

Example:

# The name of the script is the same name that you can use to construct a new 
# dInventory based on this inventory script. For example, an inventory script named 'Super Cool Inventory' 
# can be referred to as 'in@Super Cool Inventory'. 
Inventory Script Name: 
  
  type: inventory 
  
  # Must be a valid inventory type. 
  # Valid inventory types: BREWING, CHEST, DISPENSER, ENCHANTING, ENDER_CHEST, HOPPER, PLAYER, WORKBENCH 
  inventory: inventory type 
  
  # The title can be anything you wish. Use color tags to make colored titles. 
  # Note that titles only work for some inventory types, including CHEST, DISPENSER, FURNACE, ENCHANTING, and HOPPER. 
  title: custom title 
  
  # The size must be a multiple of 9. It is recommended not to go above 54, as it will not show 
  # correctly when a player looks into it. Tags are allowed for advanced usage. 
  size: 27 
  
  # You can use definitions to define items to use in the slots. These are not like normal 
  # script definitions, and do not need %'s around them. 
  definitions: 
    my item: i@item 
    other item: i@item 
  
  # Procedural items can be used to specify a list of dItems for the empty slots to be filled with. 
  # Each item in the list represents the next available empty slot. 
  # When the inventory has no more empty slots, it will discard any remaining items in the list. 
  # A slot is considered empty when it has no value specified in the slots section. 
  # If the slot is filled with air, it will no longer count as being empty. 
  procedural items: 
    - define list li@ 
    - foreach <server.list_online_players>: 
      - define item i@human_skull[skull_skin=<def[value].name>] 
      - define list <def[list].include[<def[item]>]> 
    - determine <def[list]> 
  
  # You can specify the items in the slots of the inventory. For empty spaces, simply put 
  # an empty "slot". Note the quotes around the entire lines. 
  slots: 
    - "[] [] [] [my item] [i@item] [] [other item] [] []" 
    - "[my item] [] [] [] [] [i@item] [i@item] [] []" 
    - "[] [] [] [] [] [] [] [] [other item]" 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants