Guest User

jack.lua

a guest
Apr 5th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. local robot = require("robot")
  2. --local sides = require("sides")
  3.  
  4. function hoe()
  5.   robot.select(3)
  6.     for i = 1 , 16 do
  7.     robot.place()
  8.     i=i+1
  9.    end
  10. end
  11.  
  12. function axe()
  13.   robot.swing()
  14. end
  15.  
  16. function tree()
  17.   robot.select(1)
  18.   robot.place()
  19. end
  20.  
  21. function unload()
  22.   for i = 1,2 do
  23.   robot.select(i)
  24.     if robot.count() > 32 then
  25.     robot.dropDown(16)
  26.     end
  27.   i = i+1
  28.   end
  29. end
  30.  
  31. function suck()
  32. i=0
  33.   for i = 1,2 do
  34.   robot.suckUp()
  35.   robot.suck()
  36.   i= i+1
  37.   end
  38. end
  39.    
  40. while true do
  41.   tree()
  42.   suck()
  43.   hoe()
  44.   axe()
  45.   suck()
  46.   unload()
  47.   os.sleep(0.5)
  48. end
Advertisement
Add Comment
Please, Sign In to add comment