Advertisement
jille_Jr

CC: Crafting script Mk.2

Sep 27th, 2012
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. while not turtle.detectDown() do
  2.   if not turtle.down() and turtle.getFuelLevel() <= 1 then
  3.     print("Out of fuel... :(")
  4.   end
  5. end
  6. turtle.up()
  7.  
  8. -- got 2 log in slot 1
  9. turtle.select(1)
  10. turtle.craft(2)
  11.  
  12. local runTimes = 0
  13. local runTimes2 = 1
  14.  
  15. while runTimes ~= 8 do
  16.   runTimes = runTimes + 1
  17.   runTimes2 = runTimes2 + 1
  18.   if runTimes2 == 4 or runTimes2 == 8 or runTimes2 == 6 then runTimes2 = runTimes2 + 1 end
  19.   if runTimes ~= 8 then turtle.dropDown(8 - runTimes) end
  20.   turtle.select(runTimes2)
  21.   if runTimes ~= 8 then turtle.suckDown() end
  22. end
  23.  
  24. turtle.select(1)
  25.  
  26. if not turtle.craft() then
  27.   print("Failed crafting!")
  28. else
  29.   print("Successful crafting!")
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement