Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function place(n)
- turtle.select(n)
- turtle.placeDown()
- end
- function fwd(n)
- if n == nil do
- n=1
- end
- for i=1, n do
- turtle.forward()
- end
- end
- function placeFwd(n)
- place(n)
- fwd()
- end
- function pyr()
- turtle.up()
- placeFwd(1)
- placeFwd(2)
- place(3)
- turtle.turnRight()
- turtle.turnRight()
- fwd(3)
- placeFwd(2)
- place(3)
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.down()
- placeFwd(4)
- place(5)
- turtle.up()
- placeFwd(3)
- placeFwd(2)
- place(3)
- turtle.turnLeft()
- fwd()
- turtle.turnLeft()
- fwd()
- place(3)
- -- Done first half off bottom layer
- turtle.turnLeft()
- fwd(4)
- place(3)
- turtle.turnLeft()
- fwd()
- turtle.turnLeft()
- fwd()
- place(3)
- turtle.turnLeft()
- fwd()
- placeFwd(2)
- place(3)
- -- Finished Bottom layer, now doing 2nd layer
- turtle.up()
- turtle.turnLeft()
- turtle.turnLeft()
- fwd()
- placeFwd(3)
- turtle.turnLeft()
- fwd()
- place(3)
- turtle.turnLeft()
- fwd()
- placeFwd(2)
- place(3)
- turtle.turnRight()
- fwd()
- turtle.turnRight()
- fwd()
- place(3)
- -- Finished 2nd layer, now on final layer
- turtle.up()
- turtle.turnRight()
- fwd()
- place(3)
- end
- pyr()
Advertisement
Add Comment
Please, Sign In to add comment