Advertisement
Guest User

rudorub.lua

a guest
Mar 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. local robot = require("robot")
  2.  
  3. function upload()
  4.  if robot.count(1)<1 then
  5.   robot.suckUp()
  6.  else
  7.   breackrud()
  8.  end
  9. end
  10.  
  11. function breackrud()
  12.  for i = 0, 10 do
  13.    if robot.detect() == false then
  14.      robot.place()
  15.    else
  16.      robot.swing()
  17.    end
  18.   end
  19. end
  20.  
  21.  
  22. function unload()
  23.   for c = 1, 15 do
  24.     robot.select(c)
  25.     if robot.count() > 0 then
  26.       robot.dropDown()
  27.     end
  28.   end
  29.   robot.select(1)
  30.   upload()
  31. end
  32.  
  33. while true do
  34.   upload()
  35.   os.sleep(5)
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement