Advertisement
Guest User

mtree

a guest
Oct 31st, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. os.loadAPI("mapi")
  2. dir = true
  3. count = 1
  4. while true do
  5.   turtle.select(2)
  6.   while not turtle.compare() do
  7.     turtle.select(4)
  8.     turtle.place()
  9.     turtle.select(2)
  10.   end
  11.   if turtle.getFuelLevel() < 2000 then
  12.     turtle.select(1)
  13.     if turtle.getItemCount() < 64 then
  14.       for i=5,16 do
  15.         turtle.select(i)
  16.         turtle.transferTo(1)
  17.       end
  18.       for i=5,16 do
  19.         turtle.select(i)
  20.         turtle.transferTo(3)
  21.       end
  22.     end
  23.     turtle.select(1)
  24.     turtle.refuel(turtle.getItemCount()-1)
  25.   end
  26.   turtle.select(5)
  27.   mapi.forward(1,true)
  28.   up = mapi.clearUp()
  29.   mapi.down(up)
  30.   mapi.suck()
  31.   while not turtle.back() do end
  32.   turtle.select(3)
  33.   turtle.place()
  34.   if dir then
  35.     mapi.turnRight()
  36.     mapi.forward(6)
  37.     mapi.turnLeft()
  38.   else
  39.     mapi.turnLeft()
  40.     mapi.forward(6)
  41.     mapi.turnRight()
  42.   end
  43.   count = count + 1
  44.   if count % 3 == 0 then
  45.     dir = not dir
  46.     count = 1
  47.   end
  48.   if count == 1 and dir then
  49.     while not turtle.back() do end
  50.     mapi.turnRight(2)
  51.     for i=5,16 do
  52.       turtle.transferTo(1)
  53.     end
  54.     mapi.empty(4)
  55.     mapi.turnRight(2)
  56.     mapi.forward()
  57.   end
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement