Advertisement
Guest User

LivingRock

a guest
May 22nd, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. intervallo = 80
  2.  
  3. function compara()
  4.   turtle.select(16)
  5.   if turtle.compareDown() then
  6.     turtle.digDown()
  7.     turtle.select(1)
  8.     turtle.placeDown()
  9.   end
  10. end
  11.  
  12. function ronda()
  13.   compara()
  14.   turtle.forward()
  15.   compara()
  16.   turtle.forward()
  17.   compara()
  18.   turtle.turnRight()
  19.   turtle.forward()
  20.   compara()
  21.   turtle.forward()
  22.   compara()
  23.   turtle.turnRight()
  24.   turtle.forward()
  25.   compara()
  26.   turtle.forward()
  27.   compara()
  28.   turtle.turnRight()
  29.   turtle.forward()
  30.   compara()
  31.   turtle.forward()
  32.   turtle.turnRight()
  33. end
  34.  
  35. function scarica()
  36.   for x=2,15 do
  37.     turtle.select(x)  
  38.     turtle.drop()
  39.   end
  40.   turtle.select(1)
  41.   turtle.suckUp()
  42.   turtle.select(2)
  43.   turtle.dropUp()
  44.   turtle.select(1)
  45. end
  46.  
  47.  
  48.  
  49. while true do
  50.   turtle.select(1)
  51.   ronda()
  52.   turtle.turnRight()
  53.   turtle.turnRight()
  54.   scarica()
  55.   turtle.turnLeft()
  56.   turtle.turnLeft()
  57.   sleep(intervallo)
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement