Advertisement
Solomeister

minebot

Aug 31st, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. local component = require("component")
  2. local computer = require("computer")
  3. local inv = component.inventory_controller
  4. local robot = require("robot")
  5. local term = require("term")
  6.  
  7. local slot = 1
  8. robot.select(1)
  9. while true do
  10.  
  11. while robot.count() == 0 do
  12. slot = slot + 1
  13. robot.select(slot)
  14. if slot > robot.inventorySize()-1 then
  15. slot = 1
  16. robot.select(slot)
  17. end
  18. end
  19.  
  20. if inv.getStackInInternalSlot()['name'] == 'minecraft:redstone' then
  21. robot.drop()
  22. end
  23. if robot.place() == false then
  24. robot.drop()
  25. end
  26. while robot.swing() do
  27. robot.swing()
  28. end
  29.  
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement