Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This program will make a turtle
- --dig down to preset number, and
- --then mine again for X times
- X = 0 --Shafts to dig
- H = 0 --height
- S = false --direction the turtle will move next
- print("How many shafts would you like to dig?")
- X = tonumber(read())
- print("What is the height(Z) of the turtle?")
- H = tonumber(read())
- for k,X do
- for i,H do
- for j,4 do
- turtle.dig()
- turtle.turnRight()
- end
- turtle.digDown()
- turtle.down()
- end
- for l,H do
- turtle.up()
- end
- turtle.forward()
- turtle.forward()
- if S = false then
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- S = true
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- S = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement