Paste #18740: Edit of P#18737 - my_inventory_menu

Date: 2015/07/27 12:56:34 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


my_inventory_menu:
    type: inventory
    title: My Inventory Menu
    size: 27
    slots:
    - "[i@my_inventory_menu_slot1] [] [] [] [] [] [] [] []"
    - "[i@my_inventory_menu_slot2] [] [] [] [] [] [] [] []"
    - "[] [] [] [] [] [] [] [] []"

my_inventory_menu_slot1:
    type: item
    material: red_wool
    display name: Click to go to a far away place

my_inventory_menu_slot2:
    type: item
    material: black_wool
    display name: Click to tp back to spawn

my_inventory_menu_handler:
    type: world
    events:
        on player right clicks torch:
        - if <context.item.slot> <= 9 {
          - inventory open d:in@my_inventory_menu
          } else {
          - narrate "Clicked in a different inventory!"
                  }
        on player clicks in my_inventory_menu:
        - determine cancelled
        on player drags in my_inventory_menu:
        - determine cancelled
        on player clicks my_inventory_menu_slot1 in my_inventory_menu:
        - execute as_player "tp 999 999 999"
        on player clicks my_inventory_menu_slot2 in my_inventory_menu:
        - execute as_player "warp spawn"