Advertisement
Guest User

Minev2test

a guest
Mar 3rd, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. function digCross()
  2.   if turtle.detect()
  3.     then turtle.dig()
  4.      turtle.forward()
  5.     else turtle.forward()
  6.   end
  7.  turtle.digUp()
  8.  turtle.digDown()
  9.  turtle.turnLeft()
  10.  turtle.dig()
  11.  turtle.turnRight()
  12.  turtle.turnRight()
  13.  turtle.dig()
  14.  turtle.turnLeft()
  15. end
  16. function depositInv()
  17.   turtle.select(1)
  18.   if turtle.detect()
  19.     then turtle.dig()
  20.     turtle.place()
  21.     else turtle.place()
  22.   end
  23.     for i = 3, 16, 1 do
  24.      turtle.select(i)
  25.      turtle.drop()
  26.     end
  27.   turtle.select(1)      
  28.   turtle.dig()          
  29. end
  30. function checkInv()
  31.   if turtle.getItemCount(15) > 0
  32.     then depositInv()
  33.   end
  34. end
  35. function checkFuel()
  36.     if turtle.getFuelLevel() < 500
  37.         then turtle.select(2)
  38.         z=turtle.getItemCount(2)-1
  39.         turtle.refuel(z)
  40.     end
  41. end
  42. function checkEnderChest()
  43.     if turtle.getItemDetail(1)="EnderStorage:EnderChest"
  44.         then print "Ender Chest is safely at home."
  45.         else print "WHERE'S MY BABY?!"
  46.        
  47.     end
  48. end
  49.  
  50. checkEnderChest()
  51. while true do
  52. for i= 1, 64, 1 do
  53.  digCross()
  54.  checkInv()
  55. end
  56. checkFuel()
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement