Paste #62661: Waystone

Date: 2019/12/10 12:59:29 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


waystone_gui:
    type: inventory
    title: Waystone
    size: 9
    slots:
    - "[] [] [] [] [] [] [] [] [warp_home]"
waystone_handler:
    type: world
    events:
        on player drags in waystone_gui:
        - wait 1t
        - determine cancelled
        on player right clicks barrier:
        - wait 1t
        - inventory open d:in@waystone_gui
keystone_moving:
    type: world
    events:
        on player clicks:
        - wait 2t
        - if <player.has_flag[graceperiodmoving].not>:
          - flag <player> moving duration:3s
        on player damages entity:
        - wait 2t
        - if <player.has_flag[graceperiodmoving].not>:
          - flag <player> moving duration:3s
        on player walks:
        - wait 2t
        - if <player.has_flag[graceperiodmoving].not>:
          - flag <player> moving duration:3s
keystone_handler:
    type: world
    events:
        on player right clicks with keystone_item:
        - wait 1t
        - if <player.has_flag[cooldownkeystone]>:
          - stop
        - flag <player> cooldownkeystone duration:4s
        - flag <player> graceperiodmoving duration:2s
        - playsound <player> sound:ENTITY_ARROW_HIT_PLAYER
        - if <player.has_flag[moving]||false> == true:
          - stop
        - wait 1
        - playsound <player> sound:ENTITY_ARROW_HIT_PLAYER
        - if <player.has_flag[moving]||false> == true:
          - stop
        - wait 1
        - playsound <player> sound:ENTITY_ARROW_HIT_PLAYER
        - if <player.has_flag[moving]||false> == true:
          - stop
        - wait 1
        - playsound <player> sound:ENTITY_ARROW_HIT_PLAYER
        - if <player.has_flag[moving]||false> == true:
          - stop
        - wait 1
        - playsound <player> sound:ENTITY_ARROW_HIT_PLAYER
        - if <player.has_flag[moving]||false> == true:
          - stop
        - wait 1
        - playsound <player> sound:ENTITY_ARROW_HIT_PLAYER
        - if <player.has_flag[moving]||false> == true:
          - stop
        - wait 1
        - if <player.has_flag[moving]||false> == true:
          - stop
        - playsound <player> sound:ENTITY_ARROW_HIT_PLAYER pitch:10
        - inventory open d:in@waystone_gui
        on player walks:
        - define moved:true
keystone_item:
    type: item
    material: diamond
    display name: <reset>Keystone