Paste #49168: Untitled Paste

Date: 2018/08/18 16:11:10 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


WaterBubble: 
    type: world 
    debug: true
    events: 
        on player right clicks with item:
            - if <player.has_flag[element_toggled]> {
                - queue clear 
            } 
            - if <player.flag[element].is[!=].to[water]> { 
                - queue clear 
            } 
            - if <player.has_flag[WaterBubble]> { 
                - flag <player> WaterBubble:!
                - queue clear
            } 
            - if <player.location.material.name.is[==].to[stationary_water]> { 
                - if !<player.has_flag[WaterBubble]> { 
                    - flag <player> WaterBubble 
                } 
            } 
            - wait 1t 
            - while <player.has_flag[WaterBubble]> && !<player.has_flag[element_toggled]> {
                - define bubble ellipsoid@<player.location.simple>,<player.flag[WaterIndex]>,<player.flag[WaterIndex]>,<player.flag[WaterIndex]>
                - if !<def[old].blocks.exclude[<def[bubble].blocks>].is_empty||false> {
                    - modifyblock <def[old].blocks.exclude[<def[bubble].blocks[air]>]> stationary_water no_physics
                }
                - modifyblock <def[bubble].blocks[stationary_water|air]> air no_physics
                - define old <def[bubble]>
                - wait 1t
            }