Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local success
- local data
- local wasEmpty = false
- while true do
- success, data = turtle.inspect()
- if success then
- wasEmpty = false
- if data.name=="ComputerCraft:CC-TurtleAdvanced" then
- print("it's a turtle !")
- elseif data.name=="ComputerCraft:CC-Turtle" then
- print("it's a turtle !")
- elseif data.name=="BuildCraft|Builders:machineBlock" then
- print("it's probably a quarry !")
- elseif data.name=="ThermalExpansion:Cell" then
- print("it's a thermal expansion cell !")
- elseif data.name=="EnderStorage:enderChest" then
- print("it's an ender chest !")
- else
- print("Block name: ", data.name)
- print("Block metadata: ", data.metadata)
- end
- elseif not wasEmpty then
- wasEmpty = true
- print("empty")
- end
- os.sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement