SHARE
TWEET

ComputerCraft Tutorial : auto_craft0_1

hevohevo Dec 2nd, 2013 1,067 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- ###########################
  2. -- auto_craft
  3. -- version 0.1.1
  4. -- http://hevohevo.hatena.com/
  5.  
  6. -- ###########################
  7. -- functions
  8.  
  9. function dropItems(begin_slot, end_slot)
  10.   print('drop items: slots ',begin_slot,'-',end_slot)
  11.   for i=begin_slot, end_slot do
  12.     turtle.select(i)
  13.     turtle.dropDown()
  14.   end
  15.   turtle.select(1)
  16. end
  17.  
  18. -- ###########################
  19. -- main
  20. dropItems(1,16)
  21. while true do
  22.   turtle.select(1)
  23.   if turtle.suckUp() == false then break end
  24.   if turtle.craft() == false then break end
  25.   dropItems(1,2)
  26. end
  27. dropItems(1,16)
RAW Paste Data
Top