ventmarkercmd: debug: false type: command name: ventmarker description: Toggles the status of a block as a vent usage: /ventmarker script: - if !: - narrate "<&c>No can do, my friend." - stop - if : - flag ventmarkerflag:! - narrate "<&e>[D] <&f>Vent marker <&c>off" - stop - else: - if < 1: - narrate "<&e>[D] <&7>(This needs an argument)" - stop - flag ventmarkerflag: - narrate "<&e>[D] <&f>Vent marker <&a>on<&f>, level " - stop ventmarkerpunch: type: world debug: false events: on player breaks block: - if : - determine cancelled passively - if : - flag ventlevel:! - narrate "<&e>[D] <&c>Unlabeled as a vent!" - stop - flag ventlevel: - narrate "<&e>[D] <&a>Labeled as a vent, difficulty !" ventopeninputitem1: type: item material: emerald_block display name: <&a>Left click! flags: click: LEFT ventopeninputitem2: type: item material: emerald_block display name: <&c>Right click! flags: click: RIGHT ventopeninputitem3: type: item material: emerald_block display name: <&b>Drop! flags: click: DROP ventopeninputitem4: type: item material: emerald_block display name: <&d>Press <&f>4<&d>! flags: click: NUMBER4 ventopeninventory: type: inventory inventory: HOPPER title: hoo gui: true definitions: inputitem: ventopeninputitem slots: - [] [] [inputitem] [] [] ventmarkeropen: type: world debug: false events: on player right clicks block: - if : - determine cancelled passively - inventory open destination:ventopeninventory - flag ventdifficulty: - flag ventprogress:0 - flag theventinquestion: - define progressbar ]><&1>]>]>]> - inventory adjust lore:]>]> destination: slot:3 on player closes ventopeninventory: - flag ventdifficulty:! - flag ventprogress:! on player clicks item in ventopeninventory: - stop if:! - ratelimit 1t - stop if: - if == NUMBER_KEY: - if NUMBER == : - flag ventprogress:+:1 - if >= 20: - flag ventdifficulty:! - inventory close - define oldblock: - define oldblockloc: - flag theventinquestion:! - modifyblock <[oldblockloc]> air - wait 15s - modifyblock <[oldblockloc]> <[oldblock]> - stop - wait 1t - inventory set origin:ventopeninputitem destination: slot:3 - define progressbar ]><&1>]>]>]> - inventory adjust lore:]> slot:3 - playsound sound:item_spyglass_use pitch: - stop - else: - if == : - flag ventprogress:+:1 - if >= 20: - flag ventdifficulty:! - inventory close - define oldblock: - define oldblockloc: - modifyblock <[oldblockloc]> air - flag theventinquestion:! - wait 15s - modifyblock <[oldblockloc]> <[oldblock]> - stop - wait 1t - inventory set origin:ventopeninputitem destination: slot:3 - define progressbar ]><&1>]>]>]> - inventory adjust lore:]> slot:3 - playsound sound:item_spyglass_use pitch: - stop #- failed - playsound sound:block_anvil_place - flag ventfailcooldown expire:50t - if < 0: - flag ventprogress:0 on tick every:2: - foreach : - if <[value].flag[ventprogress]> > 0: - flag <[value]> ventprogress:-:<[value].flag[ventdifficulty].mul[2].div[28]||0> - if <[value].flag[ventprogress]> < 0: - flag <[value]> ventprogress:0 - if <[value].has_flag[ventfailcooldown]>: - define progressbar ]><&4>]>]>]> - else: - define progressbar ]><&1>]>]>]> - if <[value].open_inventory> != <[value].inventory>: - inventory adjust lore:]> destination:<[value].open_inventory> slot:3