Paste #21159: Untitled Paste

Date: 2015/10/18 05:14:57 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Backpack Script:
    type: world
    events:
        on player right clicks with Backpack:
        - determine cancelled passively
        - if <player.has_flag[Backpack_Noted]>
            {
            - inventory open d:in@<player.name>_backpack
            - queue clear
            }
            else
            {
            - note in@Backpack_inventory as:<player.name>_backpack
            - inventory open d:in@<player.name>_backpack
            - flag <player> Backpack_Noted
            - queue clear
            }
        on player clicks backpack in inventory:
        - if <c.inventory.title> == <gold>Backpack
            {
            - narrate "<red>You cannot move your backpack while using it.."
            - inventory close d:in@<player.name>_backpack
            - determine cancelled
            }

Backpack_inventory:
    type: inventory
    inventory: chest
    title: <gold>Backpack
    size: 36
    slots:
    - "[] [] [] [] [] [] [] [] []"
    - "[] [] [] [] [] [] [] [] []"
    - "[] [] [] [] [] [] [] [] []"
    - "[] [] [] [] [] [] [] [] []"
Backpack:
    type: item
    material: saddle
    display name: <gold>Backpack
    lore:
    - <blue>The backpack will help 
    - <blue>you carry more stuff!