Paste #16303: Untitled Paste

Date: 2015/06/05 06:59:22 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Chocolate:
    type: item
    material: i@nether_brick_item
    display name: Chocolate Bar
    recipe:
        - i@sugar|i@sugar|i@sugar
        - i@cocoa_beans|i@cocoa_beans|i@cocoa_beans
        - i@sugar|i@sugar|i@sugar
    lore:
        - Gives you a sugar rush!
        - Allows you to run fast, break blocks fast!!
        - But then you crash and slow down a lot too...

Eat Chocolate:
    type: world
    events:
        on player right clicks with Chocolate:
            - if !<player.has_flag[Chocolate]> {
                - ^take iteminhand
                #- narrate "You ate a Chocolate Bar and gained a sugar rush!" targets:<player>
                - adjust <player> 'food_level:<player.food_level.add[3].min[20]>'
                - cast SPEED d:10 power:2 <player>
                - cast FAST_DIGGING d:10s <player>
                - cast JUMP d:5s <player>
                - wait 10s
                #- narrate "You crash from your sugar rush and slow down!"
                - cast SLOW d:4s <player>
                - cast SLOW_DIGGING d:4s <player>
                - flag player Chocolate d:14s
            }
            else {
                - narrate "You can't eat more chocolate yet!" targets:<player>
            }