Advertisement
jpreston84

Minecraft ME Crafty Turtle - 2 w/ Minium

Jul 10th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. function loadSlot(s)
  2.   print('Loading slot ' .. s )
  3.   turtle.select(s)
  4.   if not turtle.suck() then
  5.     abort()
  6.   end
  7. end
  8.  
  9. function abort()
  10.   for i = 2, 16 do
  11.     turtle.select(i)
  12.     turtle.drop()
  13.   end
  14.   os.sleep(5)
  15.   os.reboot()
  16. end
  17.  
  18. function makeItems()
  19.   turtle.select(16)
  20.   while turtle.craft() do
  21.     turtle.dropUp()
  22.     if turtle.getItemCount(2) < 1 then
  23.       abort()
  24.     end
  25.     if turtle.getItemCount(5) < 1 then
  26.       abort()
  27.     end
  28.   end
  29. end
  30.  
  31. loadSlot(2)
  32. loadSlot(5)
  33. makeItems()
  34. abort()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement