Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- local selected_slot = 1
- if #tArgs < 2 then
- print( "Usage: floor <x> <y>" )
- return
- local x = tonumber(tArgs[1])
- local y = tonumber(tArgs[2])
- for i=1,x do
- turtle.select(selected_slot)
- for j=1,y do
- while turtle.getItemCount() == 0 do
- selected_slot++
- turtle.select(selected_slot)
- end
- turtle.digDown()
- turtle.placeDown()
- turtle.forward()
- end
- if flip then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- flip = false
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- flip = true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement