Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Getting the variables
- local tArgs = { ... }
- steps = tonumber(tArgs[1])
- torch = tArgs[2]
- --Assigning defaults
- steps = steps or 1
- torch = torch or "t"[/size]
- --Starting the dig
- for x = 1, steps
- if turtle.forward() == false then
- repeat
- turtle.dig()
- sleep(0.25)
- until turtle.forward() == true
- end
- end
- --Getting into position for the return
- turtle.digUp()
- turtle.up()
- turtle.turnRight()
- turtle.turnRight()
- --Changing the variable to allow for torches to be placed every 8
- steps = steps / 8
- --Starting the return
- for x = 1, steps do
- if torch == "t" then
- turtle.turnLeft()
- turtle.dig()
- turtle.place()
- turtle.turnRight()
- end
- for x = 1, 8 do
- if turtle.forward() == false then
- repeat
- turtle.dig()
- sleep(0.25)
- until turtle.forward() == true
- end
- end
- end
Add Comment
Please, Sign In to add comment