execute unless entity @s[nbt={Dimension:"minecraft:the_nether"}] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You must take the counteroffensive to the Tyrant's home world!","color":"white","bold":false}]
execute if entity @s[nbt={Dimension:"minecraft:the_nether"},y=0,dy=50] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You are too low to start the counteroffensive. You must build higher!","color":"white","bold":false}]
execute if entity @s[nbt={Dimension:"minecraft:the_nether"},predicate=nitco:near_nether_roof] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You are too near the Nether Roof to start the counteroffensive.","color":"white","bold":false}]
execute if entity @e[tag=nitCWS,distance=..500] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You cannot attack so close to another fortress. Venture out farther!","color":"white","bold":false}]
execute if entity @s[nbt={Dimension:"minecraft:the_nether"},y=51,dy=128,predicate=!nitco:near_nether_roof] unless entity @e[tag=nitCWS,distance=..500] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You begin to build your fortress...","color":"white","bold":false}]
execute if entity @s[nbt={Dimension:"minecraft:the_nether"},y=51,dy=128,predicate=!nitco:near_nether_roof] unless entity @e[tag=nitCWS,distance=..500] run function nitco:contract
scoreboard players set @s nitContract 0
execute if entity @e[tag=nitCWS,distance=..20] run gamerule sendCommandFeedback true