Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local arg = ...
- local arg1 = tonumber(arg)
- arg1 = arg1-1
- local counter = 0
- local last = ""
- function placeUpLeft()
- turtle.placeUp()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function placeUpRight()
- turtle.placeUp()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- function up()
- turtle.forward()
- turtle.up()
- end
- function back()
- if last == "left" then
- turtle.turnLeft()
- elseif last == "right" then
- turtle.turnRight()
- end
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.up()
- turtle.forward()
- if last == "left" then
- turtle.turnRight()
- elseif last == "right" then
- turtle.turnLeft()
- end
- for i=0, arg1 do
- turtle.forward()
- turtle.down()
- end
- turtle.forward()
- os.reboot()
- end
- for j = 1, arg1 do
- placeUpLeft()
- placeUpLeft()
- turtle.placeUp()
- last = "left"
- up()
- counter = counter + 1
- print(counter)
- if counter > arg1 then
- print("Back()")
- back()
- end
- placeUpRight()
- placeUpRight()
- turtle.placeUp()
- last = "right"
- up()
- counter = counter + 1
- print(counter)
- if counter > arg1
- then
- print("Back()")
- back()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment