Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i=0 --for the first for loop
- x=0 --for the main loop
- y=1 --for item slot checker
- turtle.select(1)
- print("How long do you want the sides to be?")--put any text here to ask how long the side will be
- length=read("9")--this retrieves to reply
- --this function will make the walls
- function Side()
- for i=0,(length-2) do
- CheckFences()
- if turtle.placeDown() == false then
- turtle.digDown()
- turtle.placeDown()
- end
- if turtle.forward() == false then
- turtle.dig()
- end
- end
- end
- function SideBreak()
- for i=0,(length-2) do
- CheckFences()
- turtle.digDown()
- turtle.forward()
- end
- end
- function SideBreakfirstandlast()
- for i=0,(length-3) do
- CheckFences()
- turtle.digDown()
- turtle.forward()
- end
- end
- function CheckFences()
- while turtle.getItemCount(y)<1 do
- y=y+1
- turtle.select(y)
- end
- end
- --main loop
- while x<4 do
- CheckFences()
- Side()
- turtle.turnLeft()
- x=x+1
- end
- turtle.forward()
- print("Are you ready SMASH SOME FENCES!!!!!?")
- if read("yes") then
- x=0
- SideBreakfirstandlast()
- turtle.turnLeft()
- while x<2 do
- SideBreak()
- turtle.turnLeft()
- x=x+1
- end
- SideBreakfirstandlast()
- turtle.digDown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement