Advertisement
jakikoske

jannis test3

Dec 15th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. function Dig()
  2.   while(turtle.detect()) do
  3.     turtle.dig()
  4.   end
  5. end
  6.  
  7. function PlaceChestUp()
  8.   turtle.select(2)
  9.   while turtle.placeUp() == false do
  10.     turtle.digUp()
  11.   end
  12. end
  13.  
  14. function DumpInventory()
  15.   if(turtle.getItemCount(12) > 0)then
  16.     PlaceChestUp()
  17.     for i = 3, 13 do
  18.       turtle.select(i)
  19.       turtle.dropUp()
  20.     end
  21.     turtle.select(2)
  22.     turtle.digUp()
  23.   end
  24. end
  25.  
  26.  
  27. function EmptyChest()
  28.   while(turtle.suck()) do
  29.     DumpInventory()
  30.   end
  31. end
  32.  
  33. function CheckForChestFront()
  34.   turtle.select(13)
  35.   if(turtle.compare())then
  36.     EmptyChest()
  37.   end
  38. end
  39.  
  40. EmptyChest()
  41. Dig()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement