Advertisement
Lukas1234

Mine

Mar 27th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. j=0
  2.  
  3. function fforward()
  4.   while(turtle.forward()==false) do
  5.     turtle.dig()
  6.   end
  7. end
  8.  
  9. function fdigUp()
  10.   while(turtle.detectUp()) do
  11.     turtle.digUp()
  12.     sleep(0.4)
  13.   end
  14. end
  15.  
  16. function placeTorch()
  17.   turtle.turnRight()
  18.   turtle.turnRight()
  19.   turtle.select(2)
  20.   turtle.place()
  21.   turtle.turnRight()
  22.   turtle.turnRight()
  23.   j=0
  24. end
  25.  
  26. function step()
  27.   fforward()
  28.   fdigUp()
  29.   turtle.select(1)
  30.   turtle.placeDown()
  31.   if(j>12) then
  32.     placeTorch()
  33.   end
  34.   j=j+1
  35. end
  36.  
  37. write("Laenge ?")
  38. l = tonumber(read())
  39.  
  40. write("Wiederholungen ?")
  41. wdh = tonumber(read())
  42.  
  43. for o=1, wdh do
  44.  
  45. for w=1, l do
  46.   step()
  47. end
  48.  
  49. turtle.turnRight()
  50.  
  51. for x=1, 3 do
  52.   step()
  53. end
  54.  
  55. turtle.turnRight()
  56.  
  57. for y=1, l do
  58.   step()
  59. end
  60.  
  61. turtle.turnLeft()
  62.  
  63. for z=1, l do
  64.   step()
  65. end
  66.  
  67. turtle.turnLeft()
  68.  
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement