Advertisement
ozraru

auto_energizing

May 17th, 2022 (edited)
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. -- blaze_rod, emerald, ice, blaze_powder
  2. -- iron_ingot, ender_eye, diamond, nether_star
  3. -- snow_ball, certus_quartz, uranite_ore, dielectric_casing
  4. -- capacitor_basic_tiny, redstone_block, blazing_crystal_block, gold_ingot
  5.  
  6. reader = peripheral.find("blockReader")
  7. chest = peripheral.wrap("front")
  8.  
  9. while true do
  10.     print("waiting complete craft")
  11.     while reader.getBlockData().contain_recipe == 1 do
  12.         sleep(0.1)
  13.     end
  14.     print("detected complete craft")
  15.     while #reader.getBlockData().Items > 0 do
  16.         sleep(0.1)
  17.     end
  18.     print("export done")
  19.     did = false
  20.     for i=1,11 do
  21.         if turtle.getItemCount(i) > 1 then
  22.             print("start crafting")
  23.             print(i)
  24.             turtle.select(i)
  25.             turtle.drop(1)
  26.             if i == 3 then
  27.                 turtle.drop(1)
  28.             elseif i == 4 then
  29.                 turtle.drop(3)
  30.             elseif i == 5 then
  31.                 turtle.select(16)
  32.                 turtle.drop(1)
  33.             elseif i == 6 then
  34.                 turtle.select(12)
  35.                 turtle.drop(1)
  36.                 turtle.select(13)
  37.                 turtle.drop(1)
  38.             elseif i == 8 then
  39.                 turtle.select(14)
  40.                 turtle.drop(2)
  41.                 turtle.select(15)
  42.                 turtle.drop(1)
  43.             end
  44.             print("waiting insert")
  45.             while #chest.list() > 0 do
  46.                 sleep(0.1)
  47.             end
  48.             print("insert done")
  49.             break
  50.         end
  51.     end
  52.     if not did then
  53.         sleep(1)
  54.     end
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement