Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sSnow = 1
- local sPlate = 5
- local sRep = 9
- local sPist = 13
- function fwd()
- while not turtle.forward() do turtle.attack() end
- end
- function placeSnow(dir)
- while turtle.getItemCount(sSnow) <= 0 and sSnow <= 16 do
- sSnow = sSnow + 1
- end
- if sSnow >= sPlate then
- error("Out of snow")
- end
- turtle.select(sSnow)
- if dir == -1 then
- turtle.placeDown()
- elseif dir == 1 then
- turtle.placeUp()
- else
- turtle.place()
- end
- end
- function placePlate(dir)
- while turtle.getItemCount(sPlate) <= 0 and sPlate <= 16 do
- sPlate = sPlate + 1
- end
- if sPlate >= sRep then
- error("Out of pressure plates")
- end
- turtle.select(sPlate)
- if dir == -1 then
- turtle.placeDown()
- elseif dir == 1 then
- turtle.placeUp()
- else
- turtle.place()
- end
- end
- function placeRep(dir)
- while turtle.getItemCount(sRep) <= 0 and sRep <= 16 do
- sRep = sRep + 1
- end
- if sRep >= sPist then
- error("Out of repeaters")
- end
- turtle.select(sRep)
- if dir == -1 then
- turtle.placeDown()
- elseif dir == 1 then
- turtle.placeUp()
- else
- turtle.place()
- end
- end
- function placePist(dir)
- while turtle.getItemCount(sPist) <= 0 and sPist <= 16 do
- sPist = sPist + 1
- end
- if sPist > 16 then
- error("Out of pistons")
- end
- turtle.select(sPist)
- if dir == -1 then
- turtle.placeDown()
- elseif dir == 1 then
- turtle.placeUp()
- else
- turtle.place()
- end
- end
- function segment()
- for i = 1, 13 do
- placeSnow(-1)
- fwd()
- end
- turtle.back()
- turtle.turnRight()
- fwd()
- turtle.turnRight()
- for i = 1, 13 do
- turtle.turnRight()
- fwd()
- fwd()
- fwd()
- placePist(1)
- turtle.back()
- placeSnow(-1)
- placeSnow(0)
- placeSnow(1)
- turtle.back()
- placeRep(0)
- turtle.back()
- placePlate(0)
- turtle.turnLeft()
- fwd()
- end
- turtle.turnLeft()
- turtle.back()
- turtle.down()
- for i = 1, 4 do
- placeSnow(1)
- fwd()
- end
- end
- turtle.up()
- segment()
- turtle.turnLeft()
- fwd()
- turtle.up()
- for i = 1, 12 do
- fwd()
- end
- turtle.turnLeft()
- fwd()
- turtle.turnLeft()
- segment()
Add Comment
Please, Sign In to add comment