Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- costruisce un edificio di x per y con altezza z con tetto piatto
- -- il primo piano è il pavimento.
- -- Slot 1 carburante Slot 2 pavimento slot 3 pareti slot 4 tetto
- x = 5
- y = 4
- z = 4
- local function mura ()
- turtle.select(3)
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.up()
- for altezza = 1, z do
- for n = 1, x do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnRight()
- for n = 1, (y-1) do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnRight()
- for n = 1, (x-1) do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnRight()
- for n = 1, (y-2) do
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- end
- turtle.up()
- turtle.turnRight()
- turtle.back()
- end
- end
- local function pavimento()
- print ("poso il pavimento...")
- turtle.select (2)
- for n = 1, x do
- for n = 1, y do
- turtle.digDown()
- turtle.dig()
- turtle.placeDown()
- turtle.forward()
- end
- if n < x then prossima_fila (n ) end
- end
- end
- function prossima_fila(n)
- if (n % 2 == 0) then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- end
- end
- --pavimento()
- mura ()
Advertisement
Add Comment
Please, Sign In to add comment