Advertisement
Hammi

Gang mit absicherung

Apr 12th, 2015
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. function forward()
  2.   while (not turtle.forward()) do
  3.     turtle.dig()
  4.   end
  5. end
  6. function digUp()
  7.   while (turtle.detectUp()) do
  8.     turtle.digUp()
  9.     sleep(0.4)
  10.   end
  11. end
  12. function safe()
  13.   turtle.turnRight()
  14.   turtle.place()
  15.   turtle.turnLeft()
  16.   turtle.turnLeft()
  17.   turtle.place()
  18.   turtle.turnRight()
  19.   turtle.placeDown()
  20. end
  21. write("Wie lang?")
  22. l = tonumber(read())
  23. for i = 1,l do
  24.   safe()
  25.   forward()
  26.   digUp()
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement