Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local currentInventorySlot = 1
- local size = 0 + read()
- function square( dimension )
- if dimension == 1 then
- turtle.placeDown()
- else
- dimension = dimension - 1
- for i = 1, 4 do
- for j = 1, dimension do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnRight()
- end
- end
- end
- function checkInv( size )
- while turtle.getItemCount( currentInventorySlot ) == ( size * 4 - 4 ) do
- currentInventorySlot = currentInventorySlot + 1
- turtle.select( currentInventorySlot )
- if currentInventorySlot == 16 then
- turtle.select( 1 )
- currentInventorySlot = 1
- end
- end
- end
- turtle.select( 1 )
- while size > 1 do
- checkInv( size )
- square( size )
- turtle.up()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- size = size - 2
- end
- checkInv()
- turtle.placeDown()
Add Comment
Please, Sign In to add comment