Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --アイテム補充
- function item()
- local X
- X = 1
- while true do
- turtle.select( X )
- if turtle.getItemCount() >= 1 then break
- end
- X = X + 1
- end
- end
- --床を作成
- for x = 1,10 do
- while turtle.detect() do
- turtle.dig()
- end
- if turtle.detectDown() then
- else
- turtle.placeDown()
- end
- turtle.forward()
- item()
- end
- --壁を作成
- for n = 1,8 do
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.up()
- turtle.placeDown()
- item()
- end
- --天井を作成
- for n = 1,2 do
- turtle.turnRight()
- end
- for n = 1,10 do
- if turtle.detect then
- turtle.dig()
- end
- turtle.forward()
- if turtle.detectDown() then
- else turtle.placeDown()
- end
- end
- for n = 1,2 do
- turtle.turnRight()
- end
- turtle.back()
- --元の位置に戻る
- for n = 1,8 do
- if turtle.detectDown()
- then turtle.digDown()
- end
- turtle.down()
- end
- turtle.turnRight()
- while turtle.detect() do
- turtle.dig()
- end
- turtle.forward()
- turtle.turnLeft()
- while turtle.detect() do
- turtle.dig()
- end
- turtle.forward()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement