Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /fence <world>:
- permission: skript.op
- trigger:
- set {_Loc} to location at (-49.5), 255, (-49.5) of (arg-1)
- while block at {_Loc} is air:
- set {_Loc} to location 1 below {_Loc}
- loop 100 times:
- add 1 to {_Total}
- loop blocks from block at {_Loc} to block at location 100 east of {_Loc}:
- add 1 to {_Time}
- if {_Time} is 100:
- set {_Time} to 0
- broadcast "[Fenced] %{_Total}%/100"
- wait 1 tick
- add 1 to {_Count}
- if {_Count} is 2:
- set {_Fence} to location at ((x-coordinate of loop-block), 255, (z-coordinate of loop-block))
- while block at {_Fence} is air:
- set {_Fence} to location 1 below {_Fence}
- if y-coordinate of {_Fence} is less than 3:
- stop loop
- set block at location 1 above {_Fence} to fence
- set {_Count} to 0
- set {_Loc} to location 1 south of {_Loc}
- broadcast "[Fenced] Generation completed!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement