Paste #17680: Untitled Paste

Date: 2015/07/09 05:49:39 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


# Name: Navigator
# Author: Xenmai
# Version 0.1

NavigatorItem:  
    type: item
    display name: <&f><&l><&o>THE NAVIGATOR
    material: nether_star
    lore:
        - <&b>Click while holding the <&e>Navigator
        - <&b>in your hand to select a lobby
        - <&b>destination

NavigatorMenuOption1:
    type: item
    display name: <&c>Shop
    material: gold_ingot

NavigatorMenuOption2:
    type: item
    display name: <&a>Survival
    material: raw_beef

NavigatorMenuOption3:
    type: item
    display name: <&e>Minigames
    material: sugar

NavigatorMenuOption4:
    type: item
    display name: <&e>Spawn
    material: sapling

NavigatorMenuOption5:
    type: item
    display name: <&e>Minigames
    material: arrow

NavigatorMenu:
    type: inventory
    title: Navigator Menu
    size: 27
    slots:
        - "[] [] [] [] [i@NavigatorMenuOption4] [] [] [] []"
        - "[] [] [] [i@NavigatorMenuOption1] [i@NavigatorMenuOption2] [i@NavigatorMenuOption3] [] [] []"
        - "[] [] [] [] [i@NavigatorMenuOption5] [] [] [] []"

GamesMenuOption1:
    type: item
    display name: <&c>Shop
    material: diamond_block

GamesMenuOption2:
    type: item
    display name: <&a>Survival
    material: watermelon

GamesMenuOption3:
    type: item
    display name: <&e>Minigames
    material: tnt

GamesMenuOption4:
    type: item
    display name: <&e>Spawn
    material: stone

GamesMenu:
    type: inventory
    title: Gane Menu
    size: 27
    slots:
        - "[] [] [] [] [i@GameMenuOption4] [] [] [] []"
        - "[] [] [] [i@GameMenuOption1] [i@GameMenuOption2] [i@NavigatorMenuOption3] [] [] []"
        - "[] [] [] [] [] [] [] [] []"

NavigatorListener:
    type: world
    events:
        on navigator command:
            - give i@NavigatorItem
            - narrate "<&b>You received the <&e>navigator<&b>!"
        on player right clicks block with NavigatorItem:
            - inventory open d:in@NavigatorMenu
        on player clicks with NavigatorItem:
            - inventory open d:in@NavigatorMenu
        on player clicks in NavigatorMenu:
            - if <context.slot> == 13 {
                - narrate "<&b>Teleporting to Shopping District"
                - execute as_op "warp shop"
            }
            else if <context.slot> == 14 {
                - narrate "<&b>Teleporting to Survival"
                - execute as_op "warp survival"
            }
            else if <context.slot> == 15 {
                - narrate "<&b>Teleporting to Minigames"
                - execute as_op "warp minigames"
            }
            else if <context.slot> == 5 {
                - narrate "<&b>Teleporting to Minigames"
                - execute as_op "spawn"
            }
            else if <context.slot> == 23 {
                - inventory open d:in@NGameMenu
            }
            - inventory close
            - determine CANCELLED
        on player drags in NavigatorMenu:
            - determine CANCELLED