Paste #18783: Untitled Paste

Date: 2015/07/28 16:18:19 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 
    debug: true
    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.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"