Advertisement
Guest User

startup

a guest
Jul 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. z=0
  2. y=0
  3.  
  4. function up()
  5.   while turtle.up() == false do
  6.     turtle.digUp()
  7.     turtle.attackUp()
  8.   end
  9. end
  10.      
  11. while 1 do
  12.   turtle.select(1)
  13.   turtle.turnRight()
  14.   turtle.suck(64-turtle.getItemCount())
  15.   turtle.turnRight()
  16.   turtle.select(2)
  17.   turtle.suck(64-turtle.getItemCount())
  18.   turtle.turnRight()
  19.   turtle.select(3)
  20.   turtle.suck(64-turtle.getItemCount())
  21.   turtle.refuel(1)
  22.   turtle.turnRight()
  23.   turtle.forward()
  24.   turtle.forward()
  25.   turtle.forward()
  26.   turtle.select(1)
  27.   turtle.place()
  28.   turtle.select(2)
  29.   turtle.place()
  30.   turtle.place()
  31.   turtle.place()
  32.   turtle.up()
  33.   repeat
  34.     if turtle.detect() == false then
  35.       turtle.down()
  36.       if turtle.place() == false then
  37.         sleep(300)
  38.       end
  39.       turtle.up()
  40.     end
  41.     if turtle.detect() == true then
  42.       y=1
  43.     end  
  44.   until y==1  
  45.   y=0
  46.   turtle.down()
  47.   while turtle.detect() == true do
  48.     turtle.dig()
  49.     up()
  50.     z=z+1
  51.   end
  52.   for c=1,z do
  53.     turtle.down()
  54.   end
  55.   z=0
  56.   turtle.turnRight()
  57.   turtle.turnRight()
  58.   turtle.forward()
  59.   turtle.forward()
  60.   turtle.forward()
  61.   turtle.turnRight()
  62.   turtle.turnRight()
  63.   turtle.select(4)
  64.   turtle.dropUp()
  65.   turtle.select(5)
  66.   turtle.dropUp()
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement