Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- e = 0
- x = 5
- z = 5
- ------------------
- state = 0
- statex = 0
- statez = 0
- startingpos = 1
- turtle.select(1);
- turtle.suckUp(64);
- turtle.select(2);
- turtle.suckUp(61);
- function placeRight() --Commence a poser des blocks, tourne a droite
- i = 0
- while i < x-1 do
- turtle.back()
- place()
- i = i + 1
- print (i)
- end
- turtle.turnRight()
- turtle.back()
- place()
- turtle.turnRight()
- end
- function placeLeft() --Commence a poser des blocks, tourne a droite
- i = 0
- while i < x-1 do
- turtle.back()
- place()
- i = i + 1
- print (i)
- end
- turtle.turnLeft()
- turtle.back()
- place()
- turtle.turnLeft()
- end
- function place() --place des blocks
- if turtle.getItemCount(1) > 0 then
- turtle.place()
- turtle.select(1)
- else turtle.select(2)
- turtle.place()
- end
- end
- ----------------
- function position() --Se met en position
- e = 0
- turtle.dig()
- print (s)
- while e < x+startingpos do
- turtle.forward()
- print (e)
- e = e + 1
- end
- turtle.turnLeft()
- e = 0
- while e < x-1 do --Se met en position
- turtle.forward()
- e = e + 1
- end
- end
- position()
- startingpos=0
- while statez < z do
- while statex < x do
- if state == 0 then
- placeRight()
- state = 1
- else
- placeLeft()
- state = 0
- end
- statex = statex + 1
- end
- turtle.digUp()
- turtle.up()
- turtle.turnLeft()
- statez = statez + 1
- if statez < z then
- position()
- end
- statex = 0
- state = 0
- end
- e = 0
- turtle.select(3)
- while e < z+1 do
- turtle.placeUp()
- turtle.down()
- e = e + 1
- end
- turtle.back()
- turtle.place()
- -- 2HrQXhEq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement