HamBrick327

diorite.lua

Nov 29th, 2022
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. t = turtle
  2.  
  3. -- main loop
  4. while 1 do
  5.  
  6. t.craft(4)
  7.  
  8. item3 = t.getItemCount(3)
  9. item4 = t.getItemCount(4)
  10.  
  11. if (item3 > 0) then
  12.     item = t.getItemDetail(3).name
  13.  
  14.     if (item == "minecraft:quartz") then
  15.         t.select(3)
  16.         t.transferTo(6, item3)
  17.         print("quartz detected")
  18.     elseif (item == "minecraft:cobblestone") then
  19.         t.select(3)
  20.         t.transferTo(5, item3)
  21.         print("cobble detected")
  22.     elseif (item == "minecraft:diorite") then
  23.             print("diorite detected")
  24.             t.select(3)
  25.             t.dropDown()
  26.             t.select(1)
  27.     else
  28.         print("Error: cannot add L to var 'ratio'")
  29.     end    
  30.    
  31. end
  32.  
  33. if (item4 > 0) then
  34.     item = t.getItemDetail(4).name
  35.    
  36.     if (item == "minecraft:quartz") then
  37.         t.select(4)
  38.         t.transferTo(6, item4)
  39.         print("quartz detected")
  40.     elseif (item == "minecraft:cobblestone") then
  41.         t.select(4)
  42.         t.transferTo(5, item4)
  43.         print("cobble detected")
  44.     elseif (item == "minecraft:diorite") then
  45.         print("diorite detected")
  46.         t.select(4)
  47.         t.dropDown()
  48.         t.select(1)
  49.     else
  50.         print("Error: cannot add var 'L' to var 'ratio'")
  51.     end
  52.  
  53. end
  54. end
Add Comment
Please, Sign In to add comment