Advertisement
Myros27

exp-via-ores

Jul 26th, 2022 (edited)
995
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. local robot = require("robot")
  2. local term = require("term")
  3. local computer = require("computer")
  4. local component = require("component")
  5. local sides = require("sides")
  6.  
  7. local function Sleepy()
  8.     while computer.energy() < 20000 do
  9.         os.sleep(20)
  10.     end
  11. end
  12.  
  13. local function DumpAll()
  14.     for i = 1, robot.inventorySize() do
  15.         robot.select(i)
  16.         robot.drop()
  17.     end
  18.     robot.select(1);
  19.     Sleepy()
  20. end
  21.  
  22. infront = true
  23. while (infront ~= "passable") do
  24.   useless, infront = robot.detect()
  25.   robot.turnRight()
  26. end
  27. robot.turnLeft()
  28.  
  29. while true do
  30.     DumpAll()
  31.     robot.turnAround()
  32.     robot.suck()
  33.     robot.turnRight()
  34.     for h=1,64 do
  35.         robot.place()
  36.         robot.swing()
  37.     end
  38.     robot.turnRight()
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement