jille_Jr icon

CC: Crafting script Mk.2

jille_Jr | PRO | 09/27/12 07:49:56 PM UTC | 0 ⭐ | 493 👁️ | Never ⏰ | []
Lua |

670 B

|

None

|

0 👍

/

0 👎

while not turtle.detectDown() do
  if not turtle.down() and turtle.getFuelLevel() <= 1 then
    print("Out of fuel... :(")
  end
end
turtle.up()
 
-- got 2 log in slot 1
turtle.select(1)
turtle.craft(2)
 
local runTimes = 0
local runTimes2 = 1
 
while runTimes ~= 8 do
  runTimes = runTimes + 1
  runTimes2 = runTimes2 + 1
  if runTimes2 == 4 or runTimes2 == 8 or runTimes2 == 6 then runTimes2 = runTimes2 + 1 end
  if runTimes ~= 8 then turtle.dropDown(8 - runTimes) end
  turtle.select(runTimes2)
  if runTimes ~= 8 then turtle.suckDown() end
end
 
turtle.select(1)
 
if not turtle.craft() then
  print("Failed crafting!")
else
  print("Successful crafting!")
end

Comments