Paste #22254: Untitled Paste

Date: 2015/11/04 21:22:23 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


CommandItemConfig:
    type: yaml data
    commandItems:
        371:
            0:
                name: "Shiny Coin"
                lore: "Test|Test"
                command: eco give <player.name> 10
        348:
            0:
                name: "Pile of Coins"
                lore: "Test|Test"
                command: eco give <player.name> 100
        388:
            0:
                name: "Emerald Coin"
                lore: "Test|Test"
                command: eco give <player.name> 1000
        410:
            0:
                name: "Diamond Coins"
                lore: "Test|Test"
                command: eco give <player.name> 10000
        399:
            0:
                name: "Asterism"
                lore: "Test|Test"
                command: eco give <player.name> 100000


CommandItem:
    type: world
    events:
        On Player Right Clicks With Item:

        - define commandItemName <s@CommandItemConfig.yaml_key[commandItems.<context.item.id>.<context.item.data>.name]>
        - narrate "<parse:<def[commandItemName]>.is[==].to[<context.item.display.substring[3]>]>"
        - if "<parse:<def[commandItemName]>.is[==].to[<context.item.display.substring[3]>]>" {
            - narrate "Yes"
                   }