SHARE
TWEET

tunnelbore.lua

a guest Jun 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. conf_x = 5
  2. conf_y = 5
  3.  
  4. function inc(arg)
  5.   return component.proxy(component.list(arg)())
  6. end
  7.  
  8. local r = inc("robot")
  9. local c = inc("computer")
  10. local ch = inc("chunkloader")
  11.  
  12. -- The bot also needs a chunkloader upgrade installed
  13. -- 4 Inventory Upgrades and an inventory controller upgrade is recommended
  14.  
  15. if not (result = ch.setActive(true)) then
  16.   c.beep(1000, 1)
  17.   c.beep(2000, 1)
  18.   c.stop()
  19. end
  20.  
  21. for x = 1, conf_x, 1 do
  22.   for y = 1, conf_y, 1 do  
  23.     r.swing(3)
  24.     if y < conf_y then
  25.       r.move(1)
  26.     end
  27.   end
  28.  
  29.   if x < conf_x then
  30.  
  31.     for d = 1, (conf_y - 1), 1 do
  32.       r.move(0)
  33.     end
  34.  
  35.     r.turn(true)
  36.     r.move(3)
  37.     r.turn(false)
  38.   end
  39. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top