Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Pastebin: "9TBbzyfi"
- --A=Alpha, B=Beta, F=Finished
- --This version is: A1
- --This program requires the peripheral : turtle item analyzer (Someone 9999's) peripheral
- --It is just basic code, that you can add onto feks. make it drop Cobble into 1 chest
- --and dirt in the other (sorting purposes)
- --This program has alot of oppourtunities
- function CheckItem()
- local spruce = 0
- shell.run("clear")
- local analyzer = peripheral.wrap("right")
- turtle.select(1)
- A = print("I just identified: <" .. analyzer.getBlockName()..">")
- B = print("id #" .. analyzer.getBlockId()..":"..analyzer.getBlockMetadata())
- if analyzer.getBlockName() == "Cobblestone" then
- print("Cobblestone was found")
- end
- if analyzer.getBlockId() == 1 then
- print("Stone was found")
- end
- if analyzer.getBlockId() == 5 then
- spruce = spruce+1
- end
- if analyzer.getBlockMetadata() == 1 then
- spruce = spruce+1
- end
- if spruce == 2 then
- print("Spruce wood plank was found")
- sleep(1)
- spruce = spruce-spruce
- end
- end
- CheckItem()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement